From fb42d183fb427d1f06f4eb427e992e61535103f9 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 25 Nov 2025 14:07:20 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 4 + .openapi-generator/VERSION | 2 +- README.md | 14 +- api/openapi.yaml | 2087 +++++++++-------- bandwidth.yml | 7 + build.gradle | 6 +- build.sbt | 11 +- docs/CallsApi.md | 30 +- docs/ConferencesApi.md | 54 +- docs/MediaApi.md | 24 +- docs/MessagesApi.md | 12 +- docs/MfaApi.md | 18 +- docs/MultiChannelApi.md | 6 +- docs/PhoneNumberLookupApi.md | 18 +- docs/RecordingsApi.md | 60 +- docs/StatisticsApi.md | 6 +- docs/StatusCallbackTypeEnum.md | 8 +- docs/TollFreeVerificationApi.md | 54 +- docs/TranscriptionsApi.md | 18 +- openapitools.json | 2 +- pom.xml | 5 + .../java/com/bandwidth/sdk/ApiClient.java | 198 +- .../java/com/bandwidth/sdk/ApiException.java | 5 +- .../java/com/bandwidth/sdk/Configuration.java | 68 +- src/main/java/com/bandwidth/sdk/JSON.java | 38 +- src/main/java/com/bandwidth/sdk/Pair.java | 52 +- .../bandwidth/sdk/ServerConfiguration.java | 2 +- .../com/bandwidth/sdk/ServerVariable.java | 2 +- .../java/com/bandwidth/sdk/StringUtil.java | 2 +- .../java/com/bandwidth/sdk/api/CallsApi.java | 60 +- .../com/bandwidth/sdk/api/ConferencesApi.java | 108 +- .../java/com/bandwidth/sdk/api/MediaApi.java | 48 +- .../com/bandwidth/sdk/api/MessagesApi.java | 24 +- .../java/com/bandwidth/sdk/api/MfaApi.java | 36 +- .../bandwidth/sdk/api/MultiChannelApi.java | 12 +- .../sdk/api/PhoneNumberLookupApi.java | 36 +- .../com/bandwidth/sdk/api/RecordingsApi.java | 120 +- .../com/bandwidth/sdk/api/StatisticsApi.java | 12 +- .../sdk/api/TollFreeVerificationApi.java | 98 +- .../bandwidth/sdk/api/TranscriptionsApi.java | 36 +- .../com/bandwidth/sdk/auth/ApiKeyAuth.java | 2 +- .../bandwidth/sdk/auth/Authentication.java | 1 - .../bandwidth/sdk/auth/HttpBearerAuth.java | 2 +- .../java/com/bandwidth/sdk/auth/OAuth.java | 42 + .../com/bandwidth/sdk/auth/OAuthFlow.java | 25 + .../bandwidth/sdk/auth/OAuthOkHttpClient.java | 82 + .../com/bandwidth/sdk/auth/RetryingOAuth.java | 223 ++ .../sdk/model/AbstractOpenApiSchema.java | 2 +- .../sdk/model/AccountStatistics.java | 14 +- .../sdk/model/AdditionalDenialReason.java | 22 +- .../java/com/bandwidth/sdk/model/Address.java | 41 +- .../bandwidth/sdk/model/AnswerCallback.java | 42 +- .../sdk/model/AsyncLookupRequest.java | 18 +- .../bandwidth/sdk/model/BlockedWebhook.java | 26 +- .../sdk/model/BridgeCompleteCallback.java | 50 +- .../model/BridgeTargetCompleteCallback.java | 41 +- .../sdk/model/BusinessEntityTypeEnum.java | 2 - .../model/BusinessRegistrationTypeEnum.java | 2 - .../sdk/model/CallDirectionEnum.java | 2 - .../sdk/model/CallRecordingMetadata.java | 57 +- .../com/bandwidth/sdk/model/CallState.java | 52 +- .../bandwidth/sdk/model/CallStateEnum.java | 2 - .../sdk/model/CallTranscription.java | 18 +- ...CallTranscriptionDetectedLanguageEnum.java | 2 - .../sdk/model/CallTranscriptionMetadata.java | 21 +- .../sdk/model/CallTranscriptionResponse.java | 24 +- .../sdk/model/CallTranscriptionTrackEnum.java | 2 - .../com/bandwidth/sdk/model/Callback.java | 26 +- .../sdk/model/CallbackMethodEnum.java | 2 - .../bandwidth/sdk/model/CardWidthEnum.java | 2 - .../com/bandwidth/sdk/model/CodeRequest.java | 35 +- .../sdk/model/CompletedLookupStatusEnum.java | 2 - .../com/bandwidth/sdk/model/Conference.java | 30 +- .../model/ConferenceCompletedCallback.java | 25 +- .../sdk/model/ConferenceCreatedCallback.java | 25 +- .../bandwidth/sdk/model/ConferenceMember.java | 26 +- .../model/ConferenceMemberExitCallback.java | 34 +- .../model/ConferenceMemberJoinCallback.java | 34 +- .../ConferenceRecordingAvailableCallback.java | 44 +- .../model/ConferenceRecordingMetadata.java | 40 +- .../sdk/model/ConferenceRedirectCallback.java | 25 +- .../sdk/model/ConferenceStateEnum.java | 2 - .../java/com/bandwidth/sdk/model/Contact.java | 30 +- .../model/CreateAsyncBulkLookupResponse.java | 19 +- .../CreateAsyncBulkLookupResponseData.java | 16 +- .../com/bandwidth/sdk/model/CreateCall.java | 65 +- .../sdk/model/CreateCallResponse.java | 72 +- .../sdk/model/CreateMessageRequestError.java | 25 +- .../CreateMultiChannelMessageResponse.java | 19 +- .../sdk/model/CreateSyncLookupResponse.java | 19 +- .../model/CreateSyncLookupResponseData.java | 19 +- .../sdk/model/DeactivationEventEnum.java | 2 - .../sdk/model/DisconnectCallback.java | 51 +- .../com/bandwidth/sdk/model/Diversion.java | 33 +- .../com/bandwidth/sdk/model/DtmfCallback.java | 53 +- .../java/com/bandwidth/sdk/model/Error.java | 19 +- .../com/bandwidth/sdk/model/ErrorObject.java | 24 +- .../com/bandwidth/sdk/model/ErrorSource.java | 24 +- .../bandwidth/sdk/model/FailureWebhook.java | 30 +- .../com/bandwidth/sdk/model/FieldError.java | 18 +- .../bandwidth/sdk/model/FileFormatEnum.java | 2 - .../bandwidth/sdk/model/GatherCallback.java | 56 +- .../sdk/model/GetAsyncBulkLookupResponse.java | 19 +- .../model/GetAsyncBulkLookupResponseData.java | 19 +- .../sdk/model/InProgressLookupStatusEnum.java | 2 - .../bandwidth/sdk/model/InboundCallback.java | 31 +- .../sdk/model/InboundCallbackMessage.java | 54 +- .../sdk/model/InboundCallbackTypeEnum.java | 2 - .../bandwidth/sdk/model/InitiateCallback.java | 41 +- .../LatestMessageDeliveryStatusEnum.java | 2 - .../com/bandwidth/sdk/model/LineTypeEnum.java | 2 - .../java/com/bandwidth/sdk/model/Link.java | 18 +- .../com/bandwidth/sdk/model/LinkSchema.java | 21 +- .../com/bandwidth/sdk/model/LinksObject.java | 24 +- .../sdk/model/ListMessageDirectionEnum.java | 2 - .../bandwidth/sdk/model/ListMessageItem.java | 57 +- .../sdk/model/LookupErrorResponse.java | 19 +- .../sdk/model/LookupErrorSchema.java | 22 +- .../sdk/model/LookupErrorSchemaMeta.java | 19 +- .../com/bandwidth/sdk/model/LookupResult.java | 35 +- .../MachineDetectionCompleteCallback.java | 42 +- .../model/MachineDetectionConfiguration.java | 39 +- .../sdk/model/MachineDetectionModeEnum.java | 2 - .../sdk/model/MachineDetectionResult.java | 18 +- .../java/com/bandwidth/sdk/model/Media.java | 19 +- .../java/com/bandwidth/sdk/model/Message.java | 41 +- .../sdk/model/MessageDirectionEnum.java | 2 - .../bandwidth/sdk/model/MessageRequest.java | 37 +- .../sdk/model/MessageStatusEnum.java | 2 - .../bandwidth/sdk/model/MessageTypeEnum.java | 2 - .../com/bandwidth/sdk/model/MessagesList.java | 17 +- .../sdk/model/MessagingCodeResponse.java | 15 +- .../sdk/model/MessagingRequestError.java | 22 +- .../sdk/model/MfaForbiddenRequestError.java | 15 +- .../bandwidth/sdk/model/MfaRequestError.java | 18 +- .../model/MfaUnauthorizedRequestError.java | 15 +- .../sdk/model/MmsMessageContent.java | 18 +- .../sdk/model/MmsMessageContentFile.java | 18 +- .../sdk/model/MultiChannelAction.java | 55 +- .../MultiChannelActionCalendarEvent.java | 33 +- .../MultiChannelChannelListMMSObject.java | 26 +- ...tiChannelChannelListMMSResponseObject.java | 30 +- .../MultiChannelChannelListObjectBase.java | 24 +- .../MultiChannelChannelListOwnerObject.java | 18 +- .../MultiChannelChannelListRBMObject.java | 26 +- ...annelChannelListRBMObjectAllOfContent.java | 20 +- ...tiChannelChannelListRBMResponseObject.java | 30 +- .../MultiChannelChannelListRequestObject.java | 35 +- ...MultiChannelChannelListResponseObject.java | 35 +- .../MultiChannelChannelListSMSObject.java | 26 +- ...tiChannelChannelListSMSResponseObject.java | 30 +- .../sdk/model/MultiChannelError.java | 19 +- .../model/MultiChannelMessageChannelEnum.java | 2 - .../sdk/model/MultiChannelMessageContent.java | 16 +- .../sdk/model/MultiChannelMessageRequest.java | 27 +- .../MultiChannelMessageResponseData.java | 35 +- .../bandwidth/sdk/model/OptInWorkflow.java | 25 +- .../com/bandwidth/sdk/model/PageInfo.java | 24 +- .../com/bandwidth/sdk/model/PriorityEnum.java | 2 - .../bandwidth/sdk/model/ProductTypeEnum.java | 2 - .../bandwidth/sdk/model/RbmActionBase.java | 22 +- .../bandwidth/sdk/model/RbmActionDial.java | 26 +- .../bandwidth/sdk/model/RbmActionOpenUrl.java | 26 +- .../sdk/model/RbmActionTypeEnum.java | 2 - .../sdk/model/RbmActionViewLocation.java | 33 +- .../bandwidth/sdk/model/RbmCardContent.java | 22 +- .../sdk/model/RbmCardContentMedia.java | 23 +- .../sdk/model/RbmLocationResponse.java | 18 +- .../sdk/model/RbmMediaHeightEnum.java | 2 - .../sdk/model/RbmMessageCarouselCard.java | 23 +- .../sdk/model/RbmMessageContentFile.java | 21 +- .../sdk/model/RbmMessageContentRichCard.java | 16 +- .../sdk/model/RbmMessageContentText.java | 21 +- .../bandwidth/sdk/model/RbmMessageMedia.java | 19 +- .../sdk/model/RbmStandaloneCard.java | 23 +- .../sdk/model/RbmSuggestionResponse.java | 16 +- .../sdk/model/RecordingAvailableCallback.java | 64 +- .../sdk/model/RecordingCompleteCallback.java | 62 +- .../sdk/model/RecordingStateEnum.java | 2 - .../model/RecordingTranscriptionMetadata.java | 22 +- .../sdk/model/RecordingTranscriptions.java | 15 +- .../bandwidth/sdk/model/RedirectCallback.java | 50 +- .../sdk/model/RedirectMethodEnum.java | 2 - .../sdk/model/SmsMessageContent.java | 18 +- .../model/StandaloneCardOrientationEnum.java | 2 - .../bandwidth/sdk/model/StatusCallback.java | 33 +- .../sdk/model/StatusCallbackMessage.java | 51 +- .../sdk/model/StatusCallbackTypeEnum.java | 10 +- .../com/bandwidth/sdk/model/StirShaken.java | 21 +- .../sdk/model/SyncLookupRequest.java | 18 +- .../bandwidth/sdk/model/TelephoneNumber.java | 15 +- .../sdk/model/TfvBasicAuthentication.java | 22 +- .../sdk/model/TfvCallbackStatusEnum.java | 2 - .../com/bandwidth/sdk/model/TfvError.java | 19 +- .../com/bandwidth/sdk/model/TfvStatus.java | 30 +- .../bandwidth/sdk/model/TfvStatusEnum.java | 2 - .../sdk/model/TfvSubmissionInfo.java | 45 +- .../sdk/model/TfvSubmissionWrapper.java | 13 +- .../sdk/model/ThumbnailAlignmentEnum.java | 2 - .../sdk/model/TranscribeRecording.java | 27 +- .../bandwidth/sdk/model/Transcription.java | 16 +- .../model/TranscriptionAvailableCallback.java | 61 +- .../sdk/model/TransferAnswerCallback.java | 47 +- .../sdk/model/TransferCompleteCallback.java | 56 +- .../sdk/model/TransferDisconnectCallback.java | 60 +- .../com/bandwidth/sdk/model/UpdateCall.java | 36 +- .../sdk/model/UpdateCallRecording.java | 16 +- .../bandwidth/sdk/model/UpdateConference.java | 33 +- .../sdk/model/UpdateConferenceMember.java | 17 +- .../sdk/model/VerificationDenialWebhook.java | 36 +- .../sdk/model/VerificationRequest.java | 62 +- .../sdk/model/VerificationUpdateRequest.java | 58 +- .../sdk/model/VerificationWebhook.java | 22 +- .../sdk/model/VerifyCodeRequest.java | 27 +- .../sdk/model/VerifyCodeResponse.java | 13 +- .../bandwidth/sdk/model/VoiceApiError.java | 21 +- .../sdk/model/VoiceCodeResponse.java | 15 +- .../sdk/model/WebhookSubscription.java | 28 +- ...ebhookSubscriptionBasicAuthentication.java | 22 +- .../WebhookSubscriptionRequestSchema.java | 22 +- .../model/WebhookSubscriptionTypeEnum.java | 2 - .../model/WebhookSubscriptionsListBody.java | 22 +- 222 files changed, 4725 insertions(+), 3266 deletions(-) create mode 100644 src/main/java/com/bandwidth/sdk/auth/OAuth.java create mode 100644 src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java create mode 100644 src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java create mode 100644 src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 33ee46ae..4a422647 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -225,6 +225,10 @@ src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java src/main/java/com/bandwidth/sdk/auth/Authentication.java src/main/java/com/bandwidth/sdk/auth/HttpBasicAuth.java src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +src/main/java/com/bandwidth/sdk/auth/OAuth.java +src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java +src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java +src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java src/main/java/com/bandwidth/sdk/model/AccountStatistics.java src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 6328c542..758bb9c8 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.17.0 +7.10.0 diff --git a/README.md b/README.md index 4edb5733..2921b911 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Generator version: 7.17.0 + - Generator version: 7.10.0 Bandwidth's Communication APIs @@ -98,6 +98,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call @@ -362,6 +366,14 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### OAuth2 + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: N/A + ## Recommendation diff --git a/api/openapi.yaml b/api/openapi.yaml index d981c4c6..e78881bc 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -11,6 +11,7 @@ servers: - url: / security: - Basic: [] +- OAuth2: [] tags: - name: Messages - name: Media @@ -53,7 +54,7 @@ paths: application/json: schema: items: - $ref: "#/components/schemas/media" + $ref: '#/components/schemas/media' type: array description: OK headers: @@ -67,49 +68,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "406": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: List Media tags: @@ -154,49 +155,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "406": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: Delete Media tags: @@ -238,49 +239,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "406": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: Get Media tags: @@ -335,7 +336,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/uploadMediaRequest" + $ref: '#/components/requestBodies/uploadMediaRequest' responses: "204": description: No Content @@ -343,49 +344,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "406": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: Upload Media tags: @@ -454,7 +455,7 @@ paths: name: messageStatus required: false schema: - $ref: "#/components/schemas/messageStatusEnum" + $ref: '#/components/schemas/messageStatusEnum' style: form - description: The direction of the message. One of INBOUND OUTBOUND. explode: true @@ -462,7 +463,7 @@ paths: name: messageDirection required: false schema: - $ref: "#/components/schemas/listMessageDirectionEnum" + $ref: '#/components/schemas/listMessageDirectionEnum' style: form - description: The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need @@ -481,7 +482,7 @@ paths: name: messageType required: false schema: - $ref: "#/components/schemas/messageTypeEnum" + $ref: '#/components/schemas/messageTypeEnum' style: form - description: The error code of the message. example: 9902 @@ -548,7 +549,7 @@ paths: name: product required: false schema: - $ref: "#/components/schemas/productTypeEnum" + $ref: '#/components/schemas/productTypeEnum' style: form - description: Location Id associated with the message. example: 123ABC @@ -682,49 +683,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/messagesList" + $ref: '#/components/schemas/messagesList' description: OK "400": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: List Messages tags: @@ -734,7 +735,7 @@ paths: post: callbacks: statusCallback: - $ref: "#/components/callbacks/statusCallback" + $ref: '#/components/callbacks/statusCallback' description: Endpoint for sending text messages and picture messages using V2 messaging. operationId: createMessage @@ -749,67 +750,67 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/createMessageRequest" + $ref: '#/components/requestBodies/createMessageRequest' responses: "202": content: application/json: schema: - $ref: "#/components/schemas/message" + $ref: '#/components/schemas/message' description: Accepted "400": content: application/json: schema: - $ref: "#/components/schemas/createMessageRequestError" + $ref: '#/components/schemas/createMessageRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden "404": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found "405": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Method Not Allowed "406": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable "415": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type "429": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error summary: Create Message tags: @@ -824,7 +825,7 @@ paths: post: callbacks: statusCallback: - $ref: "#/components/callbacks/statusCallback" + $ref: '#/components/callbacks/statusCallback' description: Endpoint for sending Multi-Channel messages. operationId: createMultiChannelMessage parameters: @@ -838,13 +839,13 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/createMultiChannelMessageRequest" + $ref: '#/components/requestBodies/createMultiChannelMessageRequest' responses: "202": content: application/json: schema: - $ref: "#/components/schemas/createMultiChannelMessageResponse" + $ref: '#/components/schemas/createMultiChannelMessageResponse' description: Accepted "400": content: @@ -859,7 +860,7 @@ paths: source: field: "channelList[0].from" schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Bad Request "401": content: @@ -872,7 +873,7 @@ paths: description: Authentication Failed source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Unauthorized "403": content: @@ -885,7 +886,7 @@ paths: description: Access Denied source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Forbidden "404": content: @@ -898,7 +899,7 @@ paths: description: Resource not found. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Not Found "405": content: @@ -911,7 +912,7 @@ paths: description: Method 'PUT' not supported for this resource. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Method Not Allowed "406": description: Not Acceptable @@ -928,7 +929,7 @@ paths: source: header: Content-Type schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Unsupported Media Type "429": content: @@ -942,7 +943,7 @@ paths: Please retry later. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Too Many Requests "500": content: @@ -955,14 +956,14 @@ paths: description: Internal server error. No further information available source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Internal Server Error summary: Create Multi-Channel Message tags: - Multi-Channel x-badges: - name: Beta - color: "#076EA8" + color: '#076EA8' x-content-type: application/json x-accepts: - application/json @@ -1064,7 +1065,7 @@ paths: application/json: schema: items: - $ref: "#/components/schemas/callState" + $ref: '#/components/schemas/callState' type: array description: OK "400": @@ -1072,63 +1073,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1142,9 +1143,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Calls tags: @@ -1170,16 +1171,16 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/createCallRequest" + $ref: '#/components/requestBodies/createCallRequest' responses: "201": content: application/json: examples: createCall Response: - $ref: "#/components/examples/createCallResponseExample" + $ref: '#/components/examples/createCallResponseExample' schema: - $ref: "#/components/schemas/createCallResponse" + $ref: '#/components/schemas/createCallResponse' description: Created headers: Location: @@ -1193,63 +1194,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1263,9 +1264,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Create Call tags: @@ -1307,70 +1308,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/callState" + $ref: '#/components/schemas/callState' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1384,9 +1385,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Call State Information tags: @@ -1417,7 +1418,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateCallRequest" + $ref: '#/components/requestBodies/updateCallRequest' responses: "200": description: OK @@ -1426,72 +1427,72 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "409": content: application/json: examples: conflictErrorExample: - $ref: "#/components/examples/voiceConflictErrorExample" + $ref: '#/components/examples/voiceConflictErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Conflict "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1505,9 +1506,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Call tags: @@ -1542,7 +1543,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateCallBxmlRequest" + $ref: '#/components/requestBodies/updateCallBxmlRequest' responses: "204": description: Call BXML was successfully replaced. @@ -1551,72 +1552,72 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "409": content: application/json: examples: conflictErrorExample: - $ref: "#/components/examples/voiceConflictErrorExample" + $ref: '#/components/examples/voiceConflictErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Conflict "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1630,9 +1631,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Call BXML tags: @@ -1719,10 +1720,10 @@ paths: application/json: examples: listConferences Response: - $ref: "#/components/examples/listConferencesResponseExample" + $ref: '#/components/examples/listConferencesResponseExample' schema: items: - $ref: "#/components/schemas/conference" + $ref: '#/components/schemas/conference' type: array description: OK "400": @@ -1730,63 +1731,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1800,9 +1801,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Conferences tags: @@ -1840,70 +1841,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/conference" + $ref: '#/components/schemas/conference' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -1917,9 +1918,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Conference Information tags: @@ -1949,7 +1950,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateConferenceRequest" + $ref: '#/components/requestBodies/updateConferenceRequest' responses: "204": description: Conference was successfully modified. @@ -1958,63 +1959,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2028,9 +2029,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Conference tags: @@ -2065,7 +2066,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateConferenceBxmlRequest" + $ref: '#/components/requestBodies/updateConferenceBxmlRequest' responses: "204": description: Conference successfully modified. @@ -2074,63 +2075,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2144,9 +2145,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Conference BXML tags: @@ -2194,70 +2195,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/conferenceMember" + $ref: '#/components/schemas/conferenceMember' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2271,9 +2272,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Conference Member tags: @@ -2312,7 +2313,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateConferenceMemberRequest" + $ref: '#/components/requestBodies/updateConferenceMemberRequest' responses: "204": description: Conference member was successfully modified. @@ -2321,63 +2322,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2391,9 +2392,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Conference Member tags: @@ -2434,7 +2435,7 @@ paths: application/json: schema: items: - $ref: "#/components/schemas/conferenceRecordingMetadata" + $ref: '#/components/schemas/conferenceRecordingMetadata' type: array description: OK "400": @@ -2442,63 +2443,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2512,9 +2513,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Conference Recordings tags: @@ -2561,70 +2562,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/conferenceRecordingMetadata" + $ref: '#/components/schemas/conferenceRecordingMetadata' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2638,9 +2639,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Conference Recording Information tags: @@ -2699,63 +2700,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2769,9 +2770,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Download Conference Recording tags: @@ -2845,7 +2846,7 @@ paths: application/json: schema: items: - $ref: "#/components/schemas/callRecordingMetadata" + $ref: '#/components/schemas/callRecordingMetadata' type: array description: OK "400": @@ -2853,63 +2854,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -2923,9 +2924,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Call Recordings tags: @@ -2959,7 +2960,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/updateCallRecordingRequest" + $ref: '#/components/requestBodies/updateCallRecordingRequest' responses: "200": description: OK @@ -2968,63 +2969,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3038,9 +3039,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Update Recording tags: @@ -3082,7 +3083,7 @@ paths: application/json: schema: items: - $ref: "#/components/schemas/callRecordingMetadata" + $ref: '#/components/schemas/callRecordingMetadata' type: array description: OK "400": @@ -3090,63 +3091,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3160,9 +3161,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: List Call Recordings tags: @@ -3215,63 +3216,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3285,9 +3286,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Delete Recording tags: @@ -3330,70 +3331,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/callRecordingMetadata" + $ref: '#/components/schemas/callRecordingMetadata' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3407,9 +3408,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Call Recording tags: @@ -3459,63 +3460,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3529,9 +3530,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Delete Recording Media tags: @@ -3586,63 +3587,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3656,9 +3657,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Download Recording tags: @@ -3713,63 +3714,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3783,9 +3784,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Delete Transcription tags: @@ -3832,70 +3833,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/recordingTranscriptions" + $ref: '#/components/schemas/recordingTranscriptions' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -3909,9 +3910,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Transcription tags: @@ -3953,7 +3954,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/transcribeRecordingRequest" + $ref: '#/components/requestBodies/transcribeRecordingRequest' responses: "204": description: Transcription was successfully requested. @@ -3962,63 +3963,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -4032,9 +4033,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Create Transcription Request tags: @@ -4064,70 +4065,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/accountStatistics" + $ref: '#/components/schemas/accountStatistics' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -4141,9 +4142,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Account Statistics tags: @@ -4181,70 +4182,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/callTranscriptionMetadataList" + $ref: '#/components/schemas/callTranscriptionMetadataList' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -4258,9 +4259,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: List Real-time Transcriptions tags: @@ -4313,63 +4314,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -4383,9 +4384,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Delete Real-time Transcription tags: @@ -4429,70 +4430,70 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/callTranscriptionResponse" + $ref: '#/components/schemas/callTranscriptionResponse' description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -4506,9 +4507,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error summary: Get Real-time Transcription tags: @@ -4533,37 +4534,37 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/codeRequest" + $ref: '#/components/requestBodies/codeRequest' responses: "200": content: application/json: schema: - $ref: "#/components/schemas/voiceCodeResponse" + $ref: '#/components/schemas/voiceCodeResponse' description: OK "400": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/mfaUnauthorizedRequestError" + $ref: '#/components/schemas/mfaUnauthorizedRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/mfaForbiddenRequestError" + $ref: '#/components/schemas/mfaForbiddenRequestError' description: Forbidden "500": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Internal Server Error summary: Voice Authentication Code tags: @@ -4589,37 +4590,37 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/codeRequest" + $ref: '#/components/requestBodies/codeRequest' responses: "200": content: application/json: schema: - $ref: "#/components/schemas/messagingCodeResponse" + $ref: '#/components/schemas/messagingCodeResponse' description: OK "400": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/mfaUnauthorizedRequestError" + $ref: '#/components/schemas/mfaUnauthorizedRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/mfaForbiddenRequestError" + $ref: '#/components/schemas/mfaForbiddenRequestError' description: Forbidden "500": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Internal Server Error summary: Messaging Authentication Code tags: @@ -4645,43 +4646,43 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/codeVerify" + $ref: '#/components/requestBodies/codeVerify' responses: "200": content: application/json: schema: - $ref: "#/components/schemas/verifyCodeResponse" + $ref: '#/components/schemas/verifyCodeResponse' description: OK "400": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Bad Request "401": content: application/json: schema: - $ref: "#/components/schemas/mfaUnauthorizedRequestError" + $ref: '#/components/schemas/mfaUnauthorizedRequestError' description: Unauthorized "403": content: application/json: schema: - $ref: "#/components/schemas/mfaForbiddenRequestError" + $ref: '#/components/schemas/mfaForbiddenRequestError' description: Forbidden "429": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Too Many Requests "500": content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Internal Server Error summary: Verify Authentication Code tags: @@ -4708,43 +4709,43 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/createSyncLookupRequest" + $ref: '#/components/requestBodies/createSyncLookupRequest' responses: "200": content: application/json: examples: lookupCompleteWithDniExample: - $ref: "#/components/examples/lookupCompleteWithDniExample" + $ref: '#/components/examples/lookupCompleteWithDniExample' lookupCompleteExample: - $ref: "#/components/examples/lookupCompleteExample" + $ref: '#/components/examples/lookupCompleteExample' lookupPartialExample: - $ref: "#/components/examples/lookupPartialExample" + $ref: '#/components/examples/lookupPartialExample' lookupFailedExample: - $ref: "#/components/examples/lookupFailedExample" + $ref: '#/components/examples/lookupFailedExample' schema: - $ref: "#/components/schemas/createSyncLookupResponse" + $ref: '#/components/schemas/createSyncLookupResponse' description: OK default: content: application/json: examples: badRequest: - $ref: "#/components/examples/badRequestExample" + $ref: '#/components/examples/badRequestExample' unauthorized: - $ref: "#/components/examples/unauthorizedExample" + $ref: '#/components/examples/unauthorizedExample' forbidden: - $ref: "#/components/examples/forbiddenExample" + $ref: '#/components/examples/forbiddenExample' mediaType: - $ref: "#/components/examples/unsupportedMediaTypeExample" + $ref: '#/components/examples/unsupportedMediaTypeExample' notFound: - $ref: "#/components/examples/notFoundExample" + $ref: '#/components/examples/notFoundExample' tooManyRequests: - $ref: "#/components/examples/tooManyRequestsExample" + $ref: '#/components/examples/tooManyRequestsExample' internalServer: - $ref: "#/components/examples/internalServerErrorExample" + $ref: '#/components/examples/internalServerErrorExample' schema: - $ref: "#/components/schemas/lookupErrorResponse" + $ref: '#/components/schemas/lookupErrorResponse' description: Bad Request summary: Create Synchronous Number Lookup tags: @@ -4773,37 +4774,37 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/createAsyncBulkLookupRequest" + $ref: '#/components/requestBodies/createAsyncBulkLookupRequest' responses: "202": content: application/json: examples: lookupInProgressExample: - $ref: "#/components/examples/lookupInProgressExample" + $ref: '#/components/examples/lookupInProgressExample' schema: - $ref: "#/components/schemas/createAsyncBulkLookupResponse" + $ref: '#/components/schemas/createAsyncBulkLookupResponse' description: Accepted default: content: application/json: examples: badRequest: - $ref: "#/components/examples/badRequestExample" + $ref: '#/components/examples/badRequestExample' unauthorized: - $ref: "#/components/examples/unauthorizedExample" + $ref: '#/components/examples/unauthorizedExample' forbidden: - $ref: "#/components/examples/forbiddenExample" + $ref: '#/components/examples/forbiddenExample' mediaType: - $ref: "#/components/examples/unsupportedMediaTypeExample" + $ref: '#/components/examples/unsupportedMediaTypeExample' notFound: - $ref: "#/components/examples/notFoundExample" + $ref: '#/components/examples/notFoundExample' tooManyRequests: - $ref: "#/components/examples/tooManyRequestsExample" + $ref: '#/components/examples/tooManyRequestsExample' internalServer: - $ref: "#/components/examples/internalServerErrorExample" + $ref: '#/components/examples/internalServerErrorExample' schema: - $ref: "#/components/schemas/lookupErrorResponse" + $ref: '#/components/schemas/lookupErrorResponse' description: Bad Request summary: Create Asynchronous Bulk Number Lookup tags: @@ -4845,38 +4846,38 @@ paths: application/json: examples: lookupCompleteWithDniExample: - $ref: "#/components/examples/lookupCompleteWithDniExample" + $ref: '#/components/examples/lookupCompleteWithDniExample' lookupCompleteExample: - $ref: "#/components/examples/lookupCompleteExample" + $ref: '#/components/examples/lookupCompleteExample' lookupInProgressExample: - $ref: "#/components/examples/lookupInProgressExample" + $ref: '#/components/examples/lookupInProgressExample' lookupPartialExample: - $ref: "#/components/examples/lookupPartialExample" + $ref: '#/components/examples/lookupPartialExample' lookupFailedExample: - $ref: "#/components/examples/lookupFailedExample" + $ref: '#/components/examples/lookupFailedExample' schema: - $ref: "#/components/schemas/getAsyncBulkLookupResponse" + $ref: '#/components/schemas/getAsyncBulkLookupResponse' description: OK default: content: application/json: examples: badRequest: - $ref: "#/components/examples/badRequestExample" + $ref: '#/components/examples/badRequestExample' unauthorized: - $ref: "#/components/examples/unauthorizedExample" + $ref: '#/components/examples/unauthorizedExample' forbidden: - $ref: "#/components/examples/forbiddenExample" + $ref: '#/components/examples/forbiddenExample' mediaType: - $ref: "#/components/examples/unsupportedMediaTypeExample" + $ref: '#/components/examples/unsupportedMediaTypeExample' notFound: - $ref: "#/components/examples/notFoundExample" + $ref: '#/components/examples/notFoundExample' tooManyRequests: - $ref: "#/components/examples/tooManyRequestsExample" + $ref: '#/components/examples/tooManyRequestsExample' internalServer: - $ref: "#/components/examples/internalServerErrorExample" + $ref: '#/components/examples/internalServerErrorExample' schema: - $ref: "#/components/schemas/lookupErrorResponse" + $ref: '#/components/schemas/lookupErrorResponse' description: Bad Request summary: Get Asynchronous Bulk Number Lookup tags: @@ -4890,7 +4891,7 @@ paths: post: callbacks: tfVerificationStatus: - $ref: "#/components/callbacks/tfVerificationStatus" + $ref: '#/components/callbacks/tfVerificationStatus' description: Submit a request for verification of a toll-free phone number. operationId: requestTollFreeVerification parameters: @@ -4904,7 +4905,7 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/requestTollFreeVerificationRequest" + $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' responses: "202": description: Accepted @@ -4919,7 +4920,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -4928,7 +4929,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -4937,7 +4938,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "405": content: @@ -4946,7 +4947,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -4955,7 +4956,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -4964,7 +4965,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -4973,7 +4974,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Request Toll-Free Verification tags: @@ -5005,7 +5006,7 @@ paths: name: phoneNumber required: true schema: - $ref: "#/components/schemas/tfPhoneNumber" + $ref: '#/components/schemas/tfPhoneNumber' style: simple responses: "204": @@ -5017,7 +5018,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5026,7 +5027,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5035,7 +5036,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5044,7 +5045,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5053,7 +5054,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5062,7 +5063,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5071,7 +5072,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5080,7 +5081,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Delete a Toll-Free Verification Submission tags: @@ -5109,14 +5110,14 @@ paths: name: phoneNumber required: true schema: - $ref: "#/components/schemas/tfPhoneNumber" + $ref: '#/components/schemas/tfPhoneNumber' style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/tfvStatus" + $ref: '#/components/schemas/tfvStatus' description: OK "400": content: @@ -5125,7 +5126,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5134,7 +5135,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5143,7 +5144,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5152,7 +5153,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5161,7 +5162,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5170,7 +5171,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5179,7 +5180,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5188,7 +5189,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Get Toll-Free Verification Status tags: @@ -5198,7 +5199,7 @@ paths: put: callbacks: tfVerificationStatus: - $ref: "#/components/callbacks/tfVerificationStatus" + $ref: '#/components/callbacks/tfVerificationStatus' description: |- Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). @@ -5220,10 +5221,10 @@ paths: name: phoneNumber required: true schema: - $ref: "#/components/schemas/tfPhoneNumber" + $ref: '#/components/schemas/tfPhoneNumber' style: simple requestBody: - $ref: "#/components/requestBodies/updateTollFreeVerificationRequestRequest" + $ref: '#/components/requestBodies/updateTollFreeVerificationRequestRequest' responses: "202": description: Accepted @@ -5238,7 +5239,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5247,7 +5248,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5256,7 +5257,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "405": content: @@ -5265,7 +5266,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5274,7 +5275,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5283,7 +5284,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5292,7 +5293,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Update Toll-Free Verification Request tags: @@ -5324,7 +5325,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/webhookSubscriptionsListBody" + $ref: '#/components/schemas/webhookSubscriptionsListBody' description: OK "400": content: @@ -5337,7 +5338,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5346,7 +5347,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5355,7 +5356,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "405": content: @@ -5364,7 +5365,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5373,7 +5374,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5382,7 +5383,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5391,7 +5392,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: List Webhook Subscriptions tags: @@ -5415,13 +5416,13 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/webhookSubscriptionRequest" + $ref: '#/components/requestBodies/webhookSubscriptionRequest' responses: "201": content: application/json: schema: - $ref: "#/components/schemas/webhookSubscription" + $ref: '#/components/schemas/webhookSubscription' description: Created "400": content: @@ -5430,7 +5431,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5439,7 +5440,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5448,7 +5449,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5457,7 +5458,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5466,7 +5467,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5475,7 +5476,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5484,7 +5485,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5493,7 +5494,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Create Webhook Subscription tags: @@ -5537,7 +5538,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5546,7 +5547,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5555,7 +5556,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5564,7 +5565,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5573,7 +5574,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5582,7 +5583,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5591,7 +5592,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5600,7 +5601,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Delete Webhook Subscription tags: @@ -5631,13 +5632,13 @@ paths: type: string style: simple requestBody: - $ref: "#/components/requestBodies/webhookSubscriptionRequest" + $ref: '#/components/requestBodies/webhookSubscriptionRequest' responses: "200": content: application/json: schema: - $ref: "#/components/schemas/webhookSubscription" + $ref: '#/components/schemas/webhookSubscription' description: OK "400": content: @@ -5646,7 +5647,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5655,7 +5656,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5664,7 +5665,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5673,7 +5674,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5682,7 +5683,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5691,7 +5692,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5700,7 +5701,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5709,7 +5710,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: Update Webhook Subscription tags: @@ -5729,7 +5730,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/useCases" + $ref: '#/components/schemas/useCases' description: OK "400": content: @@ -5738,7 +5739,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5747,7 +5748,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5756,7 +5757,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5765,7 +5766,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5774,7 +5775,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5783,7 +5784,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5792,7 +5793,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5801,7 +5802,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: List Toll-Free Use Cases tags: @@ -5821,11 +5822,11 @@ components: application/json: examples: smsMessageReceivedCallback: - $ref: "#/components/examples/smsMessageReceivedCallbackExample" + $ref: '#/components/examples/smsMessageReceivedCallbackExample' mmsMessageReceivedCallback: - $ref: "#/components/examples/mmsMessageReceivedCallbackExample" + $ref: '#/components/examples/mmsMessageReceivedCallbackExample' schema: - $ref: "#/components/schemas/inboundCallback" + $ref: '#/components/schemas/inboundCallback' description: "

This Inbound Message Webhook is an envelope containing\ \ either a received (MO) message to your \nmessage-enabled Bandwidth\ \ telephone number or a multichannel client's response to a suggestion\ @@ -5849,17 +5850,17 @@ components: application/json: examples: messageSendingCallback: - $ref: "#/components/examples/messageSendingCallbackExample" + $ref: '#/components/examples/messageSendingCallbackExample' smsMessageDeliveredCallback: - $ref: "#/components/examples/smsMessageDeliveredCallbackExample" + $ref: '#/components/examples/smsMessageDeliveredCallbackExample' mmsMessageDeliveredCallback: - $ref: "#/components/examples/mmsMessageDeliveredCallbackExample" + $ref: '#/components/examples/mmsMessageDeliveredCallbackExample' groupMmsMessageDeliveredCallback: - $ref: "#/components/examples/groupMmsMessageDeliveredCallbackExample" + $ref: '#/components/examples/groupMmsMessageDeliveredCallbackExample' messageFailedCallback: - $ref: "#/components/examples/messageFailedCallbackExample" + $ref: '#/components/examples/messageFailedCallbackExample' schema: - $ref: "#/components/schemas/statusCallback" + $ref: '#/components/schemas/statusCallback' description: |-

This Outbound Message Webhook is an envelope containing status information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. @@ -5891,7 +5892,7 @@ components: type: string style: simple requestBody: - $ref: "#/components/requestBodies/verificationWebhookRequest" + $ref: '#/components/requestBodies/verificationWebhookRequest' responses: "204": description: No Content @@ -5902,7 +5903,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request "401": content: @@ -5911,7 +5912,7 @@ components: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized "403": content: @@ -5920,7 +5921,7 @@ components: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden "404": content: @@ -5929,7 +5930,7 @@ components: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. "405": content: @@ -5938,7 +5939,7 @@ components: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed "429": content: @@ -5947,7 +5948,7 @@ components: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests "500": content: @@ -5956,7 +5957,7 @@ components: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error "503": content: @@ -5965,7 +5966,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable summary: TFV status updates sent to customer's webhook URL. examples: @@ -6485,7 +6486,7 @@ components: name: messageStatus required: false schema: - $ref: "#/components/schemas/messageStatusEnum" + $ref: '#/components/schemas/messageStatusEnum' style: form messageDirection: description: The direction of the message. One of INBOUND OUTBOUND. @@ -6494,7 +6495,7 @@ components: name: messageDirection required: false schema: - $ref: "#/components/schemas/listMessageDirectionEnum" + $ref: '#/components/schemas/listMessageDirectionEnum' style: form carrierName: description: The name of the carrier used for this message. Possible values @@ -6515,7 +6516,7 @@ components: name: messageType required: false schema: - $ref: "#/components/schemas/messageTypeEnum" + $ref: '#/components/schemas/messageTypeEnum' style: form errorCode: description: The error code of the message. @@ -6589,7 +6590,7 @@ components: name: product required: false schema: - $ref: "#/components/schemas/productTypeEnum" + $ref: '#/components/schemas/productTypeEnum' style: form location: description: Location Id associated with the message. @@ -6955,7 +6956,7 @@ components: name: phoneNumber required: true schema: - $ref: "#/components/schemas/tfPhoneNumber" + $ref: '#/components/schemas/tfPhoneNumber' style: simple webhookSubscriptionIdPathParam: description: Webhook subscription ID @@ -6972,13 +6973,13 @@ components: content: application/json: schema: - $ref: "#/components/schemas/messageRequest" + $ref: '#/components/schemas/messageRequest' required: true createMultiChannelMessageRequest: content: application/json: schema: - $ref: "#/components/schemas/multiChannelMessageRequest" + $ref: '#/components/schemas/multiChannelMessageRequest' required: true uploadMediaRequest: content: @@ -7179,14 +7180,14 @@ components: content: application/json: schema: - $ref: "#/components/schemas/createCall" + $ref: '#/components/schemas/createCall' description: JSON object containing information to create an outbound call required: true updateCallRequest: content: application/json: schema: - $ref: "#/components/schemas/updateCall" + $ref: '#/components/schemas/updateCall' description: JSON object containing information to redirect an existing call to a new BXML document required: true @@ -7216,19 +7217,19 @@ components: content: application/json: schema: - $ref: "#/components/schemas/updateCallRecording" + $ref: '#/components/schemas/updateCallRecording' required: true transcribeRecordingRequest: content: application/json: schema: - $ref: "#/components/schemas/transcribeRecording" + $ref: '#/components/schemas/transcribeRecording' required: true updateConferenceRequest: content: application/json: schema: - $ref: "#/components/schemas/updateConference" + $ref: '#/components/schemas/updateConference' required: true updateConferenceBxmlRequest: content: @@ -7249,20 +7250,20 @@ components: content: application/json: schema: - $ref: "#/components/schemas/updateConferenceMember" + $ref: '#/components/schemas/updateConferenceMember' required: true codeRequest: content: application/json: schema: - $ref: "#/components/schemas/codeRequest" + $ref: '#/components/schemas/codeRequest' description: MFA code request body. required: true codeVerify: content: application/json: schema: - $ref: "#/components/schemas/verifyCodeRequest" + $ref: '#/components/schemas/verifyCodeRequest' description: MFA code verify request body. required: true createSyncLookupRequest: @@ -7270,11 +7271,11 @@ components: application/json: examples: singleNumberRequestExample: - $ref: "#/components/examples/singleNumberRequestExample" + $ref: '#/components/examples/singleNumberRequestExample' multipleNumberRequestExample: - $ref: "#/components/examples/multipleNumberRequestExample" + $ref: '#/components/examples/multipleNumberRequestExample' schema: - $ref: "#/components/schemas/syncLookupRequest" + $ref: '#/components/schemas/syncLookupRequest' description: Synchronous phone number lookup request. required: true createAsyncBulkLookupRequest: @@ -7282,23 +7283,23 @@ components: application/json: examples: multipleNumberRequestExample: - $ref: "#/components/examples/multipleNumberRequestExample" + $ref: '#/components/examples/multipleNumberRequestExample' schema: - $ref: "#/components/schemas/asyncLookupRequest" + $ref: '#/components/schemas/asyncLookupRequest' description: Asynchronous bulk phone number lookup request. required: true requestTollFreeVerificationRequest: content: application/json: schema: - $ref: "#/components/schemas/verificationRequest" + $ref: '#/components/schemas/verificationRequest' description: Request for verification of a toll-free phone number. required: true updateTollFreeVerificationRequestRequest: content: application/json: schema: - $ref: "#/components/schemas/tfvSubmissionWrapper" + $ref: '#/components/schemas/tfvSubmissionWrapper' description: Update a request for verification of a toll-free phone number. required: true verificationWebhookRequest: @@ -7306,17 +7307,17 @@ components: application/json: schema: oneOf: - - $ref: "#/components/schemas/verificationWebhook" - - $ref: "#/components/schemas/verificationDenialWebhook" - - $ref: "#/components/schemas/failureWebhook" - - $ref: "#/components/schemas/blockedWebhook" + - $ref: '#/components/schemas/verificationWebhook' + - $ref: '#/components/schemas/verificationDenialWebhook' + - $ref: '#/components/schemas/failureWebhook' + - $ref: '#/components/schemas/blockedWebhook' description: Verification callback status of a toll-free phone number. required: true webhookSubscriptionRequest: content: application/json: schema: - $ref: "#/components/schemas/webhookSubscriptionRequestSchema" + $ref: '#/components/schemas/webhookSubscriptionRequestSchema' description: Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. required: true @@ -7325,19 +7326,19 @@ components: content: application/json: schema: - $ref: "#/components/schemas/message" + $ref: '#/components/schemas/message' description: Accepted createMultiChannelMessageResponse: content: application/json: schema: - $ref: "#/components/schemas/createMultiChannelMessageResponse" + $ref: '#/components/schemas/createMultiChannelMessageResponse' description: Accepted listMessagesResponse: content: application/json: schema: - $ref: "#/components/schemas/messagesList" + $ref: '#/components/schemas/messagesList' description: OK getMediaResponse: content: @@ -7352,7 +7353,7 @@ components: application/json: schema: items: - $ref: "#/components/schemas/media" + $ref: '#/components/schemas/media' type: array description: OK headers: @@ -7366,61 +7367,61 @@ components: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Bad Request messagingNotAcceptableError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Acceptable createMessageBadRequestError: content: application/json: schema: - $ref: "#/components/schemas/createMessageRequestError" + $ref: '#/components/schemas/createMessageRequestError' description: Bad Request messagingUnauthorizedError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unauthorized messagingForbiddenError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Forbidden messagingNotFoundError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Not Found messagingMethodNotAllowedError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Method Not Allowed messagingInvalidMediaTypeError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Unsupported Media Type messagingTooManyRequestsError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Too Many Requests messagingInternalServerError: content: application/json: schema: - $ref: "#/components/schemas/messagingRequestError" + $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error multiChannelBadRequestError: content: @@ -7435,7 +7436,7 @@ components: source: field: "channelList[0].from" schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Bad Request multiChannelNotAcceptableError: description: Not Acceptable @@ -7450,7 +7451,7 @@ components: description: Authentication Failed source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Unauthorized multiChannelForbiddenError: content: @@ -7463,7 +7464,7 @@ components: description: Access Denied source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Forbidden multiChannelNotFoundError: content: @@ -7476,7 +7477,7 @@ components: description: Resource not found. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Not Found multiChannelMethodNotAllowedError: content: @@ -7489,7 +7490,7 @@ components: description: Method 'PUT' not supported for this resource. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Method Not Allowed multiChannelInvalidMediaTypeError: content: @@ -7504,7 +7505,7 @@ components: source: header: Content-Type schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Unsupported Media Type multiChannelTooManyRequestsError: content: @@ -7518,7 +7519,7 @@ components: retry later. source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Too Many Requests multiChannelInternalServerError: content: @@ -7531,16 +7532,16 @@ components: description: Internal server error. No further information available source: {} schema: - $ref: "#/components/schemas/multiChannelError" + $ref: '#/components/schemas/multiChannelError' description: Internal Server Error createCallResponse: content: application/json: examples: createCall Response: - $ref: "#/components/examples/createCallResponseExample" + $ref: '#/components/examples/createCallResponseExample' schema: - $ref: "#/components/schemas/createCallResponse" + $ref: '#/components/schemas/createCallResponse' description: Created headers: Location: @@ -7553,7 +7554,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/callState" + $ref: '#/components/schemas/callState' description: OK updateCallResponse: description: OK @@ -7562,14 +7563,14 @@ components: application/json: schema: items: - $ref: "#/components/schemas/callState" + $ref: '#/components/schemas/callState' type: array description: OK getStatisticsResponse: content: application/json: schema: - $ref: "#/components/schemas/accountStatistics" + $ref: '#/components/schemas/accountStatistics' description: OK updateRecordingResponse: description: OK @@ -7578,14 +7579,14 @@ components: application/json: schema: items: - $ref: "#/components/schemas/callRecordingMetadata" + $ref: '#/components/schemas/callRecordingMetadata' type: array description: OK getCallRecordingResponse: content: application/json: schema: - $ref: "#/components/schemas/callRecordingMetadata" + $ref: '#/components/schemas/callRecordingMetadata' description: OK downloadRecordingMediaResponse: content: @@ -7602,19 +7603,19 @@ components: content: application/json: schema: - $ref: "#/components/schemas/recordingTranscriptions" + $ref: '#/components/schemas/recordingTranscriptions' description: OK listTranscriptionsResponse: content: application/json: schema: - $ref: "#/components/schemas/callTranscriptionMetadataList" + $ref: '#/components/schemas/callTranscriptionMetadataList' description: OK getCallTranscriptionResponse: content: application/json: schema: - $ref: "#/components/schemas/callTranscriptionResponse" + $ref: '#/components/schemas/callTranscriptionResponse' description: OK deleteCallTranscriptionResponse: description: No Content @@ -7623,109 +7624,109 @@ components: application/json: examples: listConferences Response: - $ref: "#/components/examples/listConferencesResponseExample" + $ref: '#/components/examples/listConferencesResponseExample' schema: items: - $ref: "#/components/schemas/conference" + $ref: '#/components/schemas/conference' type: array description: OK getConferenceResponse: content: application/json: schema: - $ref: "#/components/schemas/conference" + $ref: '#/components/schemas/conference' description: OK getConferenceMemberResponse: content: application/json: schema: - $ref: "#/components/schemas/conferenceMember" + $ref: '#/components/schemas/conferenceMember' description: OK listConferenceRecordingsResponse: content: application/json: schema: items: - $ref: "#/components/schemas/conferenceRecordingMetadata" + $ref: '#/components/schemas/conferenceRecordingMetadata' type: array description: OK getConferenceRecordingResponse: content: application/json: schema: - $ref: "#/components/schemas/conferenceRecordingMetadata" + $ref: '#/components/schemas/conferenceRecordingMetadata' description: OK voiceBadRequestError: content: application/json: examples: badRequestErrorExample: - $ref: "#/components/examples/voiceBadRequestErrorExample" + $ref: '#/components/examples/voiceBadRequestErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Bad Request voiceUnauthorizedError: content: application/json: examples: unauthorizedErrorExample: - $ref: "#/components/examples/voiceUnauthorizedErrorExample" + $ref: '#/components/examples/voiceUnauthorizedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unauthorized voiceForbiddenError: content: application/json: examples: forbiddenErrorExample: - $ref: "#/components/examples/voiceForbiddenErrorExample" + $ref: '#/components/examples/voiceForbiddenErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Forbidden voiceNotFoundError: content: application/json: examples: notFoundErrorExample: - $ref: "#/components/examples/voiceNotFoundErrorExample" + $ref: '#/components/examples/voiceNotFoundErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Not Found voiceNotAllowedError: content: application/json: examples: notAllowedErrorExample: - $ref: "#/components/examples/voiceNotAllowedErrorExample" + $ref: '#/components/examples/voiceNotAllowedErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Method Not Allowed voiceConflictError: content: application/json: examples: conflictErrorExample: - $ref: "#/components/examples/voiceConflictErrorExample" + $ref: '#/components/examples/voiceConflictErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Conflict voiceUnsupportedMediaTypeError: content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Unsupported Media Type voiceTooManyRequestsError: content: application/json: examples: tooManyRequestsErrorExample: - $ref: "#/components/examples/voiceTooManyRequestsErrorExample" + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Too Many Requests headers: Retry-After: @@ -7739,149 +7740,149 @@ components: application/json: examples: internalServerErrorExample: - $ref: "#/components/examples/voiceInternalServerErrorExample" + $ref: '#/components/examples/voiceInternalServerErrorExample' schema: - $ref: "#/components/schemas/voiceApiError" + $ref: '#/components/schemas/voiceApiError' description: Internal Server Error voiceCodeResponse: content: application/json: schema: - $ref: "#/components/schemas/voiceCodeResponse" + $ref: '#/components/schemas/voiceCodeResponse' description: OK messagingCodeResponse: content: application/json: schema: - $ref: "#/components/schemas/messagingCodeResponse" + $ref: '#/components/schemas/messagingCodeResponse' description: OK verifyCodeResponse: content: application/json: schema: - $ref: "#/components/schemas/verifyCodeResponse" + $ref: '#/components/schemas/verifyCodeResponse' description: OK mfaBadRequestError: content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Bad Request mfaUnauthorizedError: content: application/json: schema: - $ref: "#/components/schemas/mfaUnauthorizedRequestError" + $ref: '#/components/schemas/mfaUnauthorizedRequestError' description: Unauthorized mfaForbiddenError: content: application/json: schema: - $ref: "#/components/schemas/mfaForbiddenRequestError" + $ref: '#/components/schemas/mfaForbiddenRequestError' description: Forbidden mfaTooManyRequestsError: content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Too Many Requests mfaInternalServerError: content: application/json: schema: - $ref: "#/components/schemas/mfaRequestError" + $ref: '#/components/schemas/mfaRequestError' description: Internal Server Error createSyncLookupResponse: content: application/json: examples: lookupCompleteWithDniExample: - $ref: "#/components/examples/lookupCompleteWithDniExample" + $ref: '#/components/examples/lookupCompleteWithDniExample' lookupCompleteExample: - $ref: "#/components/examples/lookupCompleteExample" + $ref: '#/components/examples/lookupCompleteExample' lookupPartialExample: - $ref: "#/components/examples/lookupPartialExample" + $ref: '#/components/examples/lookupPartialExample' lookupFailedExample: - $ref: "#/components/examples/lookupFailedExample" + $ref: '#/components/examples/lookupFailedExample' schema: - $ref: "#/components/schemas/createSyncLookupResponse" + $ref: '#/components/schemas/createSyncLookupResponse' description: OK createAsyncBulkLookupResponse: content: application/json: examples: lookupInProgressExample: - $ref: "#/components/examples/lookupInProgressExample" + $ref: '#/components/examples/lookupInProgressExample' schema: - $ref: "#/components/schemas/createAsyncBulkLookupResponse" + $ref: '#/components/schemas/createAsyncBulkLookupResponse' description: Accepted getAsyncBulkLookupResponse: content: application/json: examples: lookupCompleteWithDniExample: - $ref: "#/components/examples/lookupCompleteWithDniExample" + $ref: '#/components/examples/lookupCompleteWithDniExample' lookupCompleteExample: - $ref: "#/components/examples/lookupCompleteExample" + $ref: '#/components/examples/lookupCompleteExample' lookupInProgressExample: - $ref: "#/components/examples/lookupInProgressExample" + $ref: '#/components/examples/lookupInProgressExample' lookupPartialExample: - $ref: "#/components/examples/lookupPartialExample" + $ref: '#/components/examples/lookupPartialExample' lookupFailedExample: - $ref: "#/components/examples/lookupFailedExample" + $ref: '#/components/examples/lookupFailedExample' schema: - $ref: "#/components/schemas/getAsyncBulkLookupResponse" + $ref: '#/components/schemas/getAsyncBulkLookupResponse' description: OK tnLookupDefaultResponse: content: application/json: examples: badRequest: - $ref: "#/components/examples/badRequestExample" + $ref: '#/components/examples/badRequestExample' unauthorized: - $ref: "#/components/examples/unauthorizedExample" + $ref: '#/components/examples/unauthorizedExample' forbidden: - $ref: "#/components/examples/forbiddenExample" + $ref: '#/components/examples/forbiddenExample' mediaType: - $ref: "#/components/examples/unsupportedMediaTypeExample" + $ref: '#/components/examples/unsupportedMediaTypeExample' notFound: - $ref: "#/components/examples/notFoundExample" + $ref: '#/components/examples/notFoundExample' tooManyRequests: - $ref: "#/components/examples/tooManyRequestsExample" + $ref: '#/components/examples/tooManyRequestsExample' internalServer: - $ref: "#/components/examples/internalServerErrorExample" + $ref: '#/components/examples/internalServerErrorExample' schema: - $ref: "#/components/schemas/lookupErrorResponse" + $ref: '#/components/schemas/lookupErrorResponse' description: Bad Request getTollFreeVerificationStatusResponse: content: application/json: schema: - $ref: "#/components/schemas/tfvStatus" + $ref: '#/components/schemas/tfvStatus' description: OK listWebhookSubscriptionsResponse: content: application/json: schema: - $ref: "#/components/schemas/webhookSubscriptionsListBody" + $ref: '#/components/schemas/webhookSubscriptionsListBody' description: OK createWebhookSubscriptionResponse: content: application/json: schema: - $ref: "#/components/schemas/webhookSubscription" + $ref: '#/components/schemas/webhookSubscription' description: Created updateWebhookSubscriptionResponse: content: application/json: schema: - $ref: "#/components/schemas/webhookSubscription" + $ref: '#/components/schemas/webhookSubscription' description: OK listTollFreeUseCasesResponse: content: application/json: schema: - $ref: "#/components/schemas/useCases" + $ref: '#/components/schemas/useCases' description: OK tfvBadRequestResponse: content: @@ -7890,7 +7891,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request noContentResponse: description: No Content @@ -7904,7 +7905,7 @@ components: businessContactEmail: Business contact email is not a valid email address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Bad Request tfvUnauthorizedResponse: content: @@ -7913,7 +7914,7 @@ components: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Unauthorized tfvForbiddenResponse: content: @@ -7922,7 +7923,7 @@ components: description: Client is not authorized for the action. type: forbidden schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Forbidden tfvNotFoundResponse: content: @@ -7931,7 +7932,7 @@ components: description: Cannot find the requested resource. type: Not Found schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Cannot find the requested resource. tfvNotAllowedResponse: content: @@ -7940,7 +7941,7 @@ components: description: Method is not allowed. type: Method Not Allowed schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Method Not Allowed tfvTooManyRequestsResponse: content: @@ -7949,7 +7950,7 @@ components: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Too Many Requests tfvServerErrorResponse: content: @@ -7958,7 +7959,7 @@ components: description: Internal Server Error. type: Internal Server Error schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Internal Server Error tfvServiceUnavailableResponse: content: @@ -7967,7 +7968,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: "#/components/schemas/tfvError" + $ref: '#/components/schemas/tfvError' description: Service Unavailable schemas: applicationId: @@ -8112,10 +8113,10 @@ components: example: 100 type: integer pageInfo: - $ref: "#/components/schemas/pageInfo" + $ref: '#/components/schemas/pageInfo' messages: items: - $ref: "#/components/schemas/listMessageItem" + $ref: '#/components/schemas/listMessageItem' type: array title: MessagesList type: object @@ -8162,11 +8163,11 @@ components: example: "+15554442222" type: string messageStatus: - $ref: "#/components/schemas/messageStatusEnum" + $ref: '#/components/schemas/messageStatusEnum' messageDirection: - $ref: "#/components/schemas/listMessageDirectionEnum" + $ref: '#/components/schemas/listMessageDirectionEnum' messageType: - $ref: "#/components/schemas/messageTypeEnum" + $ref: '#/components/schemas/messageTypeEnum' segmentCount: description: The number of segments the user's message is broken into before sending over carrier networks. @@ -8308,7 +8309,7 @@ components: type: string fieldErrors: items: - $ref: "#/components/schemas/fieldError" + $ref: '#/components/schemas/fieldError' type: array required: - description @@ -8399,7 +8400,7 @@ components: example: 1 type: integer direction: - $ref: "#/components/schemas/messageDirectionEnum" + $ref: '#/components/schemas/messageDirectionEnum' to: description: The phone number recipients of the message. example: @@ -8434,7 +8435,7 @@ components: title: Tag type: string priority: - $ref: "#/components/schemas/priorityEnum" + $ref: '#/components/schemas/priorityEnum' expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -8495,7 +8496,7 @@ components: title: Tag type: string priority: - $ref: "#/components/schemas/priorityEnum" + $ref: '#/components/schemas/priorityEnum' expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -8652,14 +8653,14 @@ components: links: example: [] items: - $ref: "#/components/schemas/link" + $ref: '#/components/schemas/link' type: array data: - $ref: "#/components/schemas/multiChannelMessageResponseData" + $ref: '#/components/schemas/multiChannelMessageResponseData' errors: example: [] items: - $ref: "#/components/schemas/errorObject" + $ref: '#/components/schemas/errorObject' type: array type: object multiChannelError: @@ -8685,7 +8686,7 @@ components: links: example: [] items: - $ref: "#/components/schemas/link" + $ref: '#/components/schemas/link' type: array data: nullable: true @@ -8693,7 +8694,7 @@ components: example: null errors: items: - $ref: "#/components/schemas/errorObject" + $ref: '#/components/schemas/errorObject' type: array type: object link: @@ -8720,7 +8721,7 @@ components: description: A detailed explanation of the error. type: string source: - $ref: "#/components/schemas/errorSource" + $ref: '#/components/schemas/errorSource' required: - description - source @@ -8807,7 +8808,7 @@ components: suggestions: description: An array of suggested actions for the recipient. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 11 type: array required: @@ -8859,11 +8860,11 @@ components: rbmMessageMedia: properties: media: - $ref: "#/components/schemas/rbmMessageContentFile" + $ref: '#/components/schemas/rbmMessageContentFile' suggestions: description: An array of suggested actions for the recipient. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 11 type: array required: @@ -8883,27 +8884,27 @@ components: maxLength: 2000 type: string media: - $ref: "#/components/schemas/rbmCardContent_media" + $ref: '#/components/schemas/rbmCardContent_media' suggestions: description: An array of suggested actions for the recipient that will be displayed on the rich card. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 4 type: array type: object rbmStandaloneCard: properties: orientation: - $ref: "#/components/schemas/standaloneCardOrientationEnum" + $ref: '#/components/schemas/standaloneCardOrientationEnum' thumbnailImageAlignment: - $ref: "#/components/schemas/thumbnailAlignmentEnum" + $ref: '#/components/schemas/thumbnailAlignmentEnum' cardContent: - $ref: "#/components/schemas/rbmCardContent" + $ref: '#/components/schemas/rbmCardContent' suggestions: description: An array of suggested actions for the recipient. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 11 type: array required: @@ -8929,16 +8930,16 @@ components: rbmMessageCarouselCard: properties: cardWidth: - $ref: "#/components/schemas/cardWidthEnum" + $ref: '#/components/schemas/cardWidthEnum' cardContents: items: - $ref: "#/components/schemas/rbmCardContent" + $ref: '#/components/schemas/rbmCardContent' maxItems: 10 type: array suggestions: description: An array of suggested actions for the recipient. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 11 type: array required: @@ -8974,14 +8975,14 @@ components: type: string media: items: - $ref: "#/components/schemas/mmsMessageContentFile" + $ref: '#/components/schemas/mmsMessageContentFile' type: array title: MMS Message type: object rbmMessageContentRichCard: oneOf: - - $ref: "#/components/schemas/rbmStandaloneCard" - - $ref: "#/components/schemas/rbmMessageCarouselCard" + - $ref: '#/components/schemas/rbmStandaloneCard' + - $ref: '#/components/schemas/rbmMessageCarouselCard' title: RBM Rich Card rbmActionTypeEnum: enum: @@ -9015,7 +9016,7 @@ components: type: REPLY properties: type: - $ref: "#/components/schemas/rbmActionTypeEnum" + $ref: '#/components/schemas/rbmActionTypeEnum' text: description: Displayed text for user to click example: Hello world @@ -9037,7 +9038,7 @@ components: type: object rbmActionDial: allOf: - - $ref: "#/components/schemas/rbmActionBase" + - $ref: '#/components/schemas/rbmActionBase' - properties: phoneNumber: description: The phone number to dial. Must be E164 format. @@ -9049,7 +9050,7 @@ components: type: object rbmActionViewLocation: allOf: - - $ref: "#/components/schemas/rbmActionBase" + - $ref: '#/components/schemas/rbmActionBase' - properties: latitude: description: The latitude of the location. @@ -9073,7 +9074,7 @@ components: type: object multiChannelActionCalendarEvent: allOf: - - $ref: "#/components/schemas/rbmActionBase" + - $ref: '#/components/schemas/rbmActionBase' - properties: title: description: The title of the event. @@ -9103,7 +9104,7 @@ components: type: object rbmActionOpenUrl: allOf: - - $ref: "#/components/schemas/rbmActionBase" + - $ref: '#/components/schemas/rbmActionBase' - properties: url: description: The URL to open in browser. @@ -9118,24 +9119,24 @@ components: multiChannelFullActions: description: An array of suggested actions for the recipient. items: - $ref: "#/components/schemas/multiChannelAction" + $ref: '#/components/schemas/multiChannelAction' maxItems: 11 type: array multiChannelAction: anyOf: - - $ref: "#/components/schemas/rbmActionBase" - - $ref: "#/components/schemas/rbmActionDial" - - $ref: "#/components/schemas/rbmActionViewLocation" - - $ref: "#/components/schemas/multiChannelActionCalendarEvent" - - $ref: "#/components/schemas/rbmActionOpenUrl" + - $ref: '#/components/schemas/rbmActionBase' + - $ref: '#/components/schemas/rbmActionDial' + - $ref: '#/components/schemas/rbmActionViewLocation' + - $ref: '#/components/schemas/multiChannelActionCalendarEvent' + - $ref: '#/components/schemas/rbmActionOpenUrl' discriminator: mapping: - REPLY: "#/components/schemas/rbmActionBase" - DIAL_PHONE: "#/components/schemas/rbmActionDial" - SHOW_LOCATION: "#/components/schemas/rbmActionViewLocation" - CREATE_CALENDAR_EVENT: "#/components/schemas/multiChannelActionCalendarEvent" - OPEN_URL: "#/components/schemas/rbmActionOpenUrl" - REQUEST_LOCATION: "#/components/schemas/rbmActionBase" + REPLY: '#/components/schemas/rbmActionBase' + DIAL_PHONE: '#/components/schemas/rbmActionDial' + SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' + CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' + OPEN_URL: '#/components/schemas/rbmActionOpenUrl' + REQUEST_LOCATION: '#/components/schemas/rbmActionBase' propertyName: type multiChannelChannelListObjectBase: properties: @@ -9150,7 +9151,7 @@ components: example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string channel: - $ref: "#/components/schemas/multiChannelMessageChannelEnum" + $ref: '#/components/schemas/multiChannelMessageChannelEnum' required: - applicationId - channel @@ -9158,35 +9159,35 @@ components: type: object multiChannelChannelListRBMObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' - properties: content: - $ref: "#/components/schemas/multiChannelChannelListRBMObject_allOf_content" + $ref: '#/components/schemas/multiChannelChannelListRBMObject_allOf_content' type: object required: - content multiChannelChannelListSMSObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' - properties: content: - $ref: "#/components/schemas/smsMessageContent" + $ref: '#/components/schemas/smsMessageContent' type: object required: - content multiChannelChannelListMMSObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' - properties: content: - $ref: "#/components/schemas/mmsMessageContent" + $ref: '#/components/schemas/mmsMessageContent' type: object required: - content multiChannelChannelListRBMResponseObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListRBMObject" - - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' example: owner: owner channel: RBM @@ -9217,22 +9218,22 @@ components: text: Hello world multiChannelChannelListSMSResponseObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListSMSObject" - - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' multiChannelChannelListMMSResponseObject: allOf: - - $ref: "#/components/schemas/multiChannelChannelListMMSObject" - - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' multiChannelChannelListRequestObject: anyOf: - - $ref: "#/components/schemas/multiChannelChannelListRBMObject" - - $ref: "#/components/schemas/multiChannelChannelListSMSObject" - - $ref: "#/components/schemas/multiChannelChannelListMMSObject" + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' discriminator: mapping: - RBM: "#/components/schemas/multiChannelChannelListRBMObject" - SMS: "#/components/schemas/multiChannelChannelListSMSObject" - MMS: "#/components/schemas/multiChannelChannelListMMSObject" + RBM: '#/components/schemas/multiChannelChannelListRBMObject' + SMS: '#/components/schemas/multiChannelChannelListSMSObject' + MMS: '#/components/schemas/multiChannelChannelListMMSObject' propertyName: channel multiChannelChannelListOwnerObject: properties: @@ -9245,14 +9246,14 @@ components: type: object multiChannelChannelListResponseObject: anyOf: - - $ref: "#/components/schemas/multiChannelChannelListRBMResponseObject" - - $ref: "#/components/schemas/multiChannelChannelListSMSResponseObject" - - $ref: "#/components/schemas/multiChannelChannelListMMSResponseObject" + - $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject' discriminator: mapping: - RBM: "#/components/schemas/multiChannelChannelListRBMResponseObject" - SMS: "#/components/schemas/multiChannelChannelListSMSResponseObject" - MMS: "#/components/schemas/multiChannelChannelListMMSResponseObject" + RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject' + SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject' + MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject' propertyName: channel multiChannelMessageRequest: description: Multi-Channel Message Request @@ -9266,7 +9267,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: "#/components/schemas/multiChannelChannelListRequestObject" + $ref: '#/components/schemas/multiChannelChannelListRequestObject' maxItems: 4 type: array tag: @@ -9276,7 +9277,7 @@ components: title: Tag type: string priority: - $ref: "#/components/schemas/priorityEnum" + $ref: '#/components/schemas/priorityEnum' expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -9419,7 +9420,7 @@ components: format: date-time type: string direction: - $ref: "#/components/schemas/messageDirectionEnum" + $ref: '#/components/schemas/messageDirectionEnum' to: description: "The destination phone number(s) of the message, in E164 format." example: @@ -9433,7 +9434,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: "#/components/schemas/multiChannelChannelListResponseObject" + $ref: '#/components/schemas/multiChannelChannelListResponseObject' maxItems: 4 type: array tag: @@ -9443,7 +9444,7 @@ components: title: Tag type: string priority: - $ref: "#/components/schemas/priorityEnum" + $ref: '#/components/schemas/priorityEnum' expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -9464,7 +9465,7 @@ components: text: type: string media: - $ref: "#/components/schemas/rbmMessageContentFile" + $ref: '#/components/schemas/rbmMessageContentFile' type: object rbmSuggestionResponse: properties: @@ -9501,17 +9502,17 @@ components: - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. discriminator: mapping: - message-sent: "#/components/schemas/statusCallback" - message-delivered: "#/components/schemas/statusCallback" - message-failed: "#/components/schemas/statusCallback" - message-read: "#/components/schemas/statusCallback" - message-received: "#/components/schemas/inboundCallback" - request-location-response: "#/components/schemas/inboundCallback" - suggestion-response: "#/components/schemas/inboundCallback" + message-sent: '#/components/schemas/statusCallback' + message-delivered: '#/components/schemas/statusCallback' + message-failed: '#/components/schemas/statusCallback' + message-read: '#/components/schemas/statusCallback' + message-received: '#/components/schemas/inboundCallback' + request-location-response: '#/components/schemas/inboundCallback' + suggestion-response: '#/components/schemas/inboundCallback' propertyName: type oneOf: - - $ref: "#/components/schemas/statusCallback" - - $ref: "#/components/schemas/inboundCallback" + - $ref: '#/components/schemas/statusCallback' + - $ref: '#/components/schemas/inboundCallback' type: object statusCallback: description: Represents a status callback for an outbound MT SMS or MMS or RBM @@ -9528,7 +9529,7 @@ components: format: date-time type: string type: - $ref: "#/components/schemas/statusCallbackTypeEnum" + $ref: '#/components/schemas/statusCallbackTypeEnum' to: description: |- The destination phone number the message was sent to. @@ -9540,7 +9541,7 @@ components: example: Message delivered to carrier. type: string message: - $ref: "#/components/schemas/statusCallbackMessage" + $ref: '#/components/schemas/statusCallbackMessage' errorCode: description: "Optional error code, applicable only when type is `message-failed`." example: 4405 @@ -9567,7 +9568,7 @@ components: format: date-time type: string type: - $ref: "#/components/schemas/inboundCallbackTypeEnum" + $ref: '#/components/schemas/inboundCallbackTypeEnum' to: description: "The destination phone number the message was sent to. \nFor\ \ inbound callbacks, this is the Bandwidth number or alphanumeric identifier\ @@ -9579,7 +9580,7 @@ components: example: Incoming message received type: string message: - $ref: "#/components/schemas/inboundCallbackMessage" + $ref: '#/components/schemas/inboundCallbackMessage' carrierName: description: "The name of the Authorized Message Provider (AMP) that handled\ \ this message. \nIn the US, this is the carrier that the message was\ @@ -9649,7 +9650,7 @@ components: example: 1 type: integer direction: - $ref: "#/components/schemas/messageDirectionEnum" + $ref: '#/components/schemas/messageDirectionEnum' to: description: The phone number recipients of the message. example: @@ -9682,9 +9683,9 @@ components: type: string type: array priority: - $ref: "#/components/schemas/priorityEnum" + $ref: '#/components/schemas/priorityEnum' channel: - $ref: "#/components/schemas/multiChannelMessageChannelEnum" + $ref: '#/components/schemas/multiChannelMessageChannelEnum' required: - applicationId - direction @@ -9697,14 +9698,14 @@ components: type: object inboundCallbackMessage: allOf: - - $ref: "#/components/schemas/statusCallbackMessage" + - $ref: '#/components/schemas/statusCallbackMessage' - properties: content: - $ref: "#/components/schemas/multiChannelMessageContent" + $ref: '#/components/schemas/multiChannelMessageContent' suggestionResponse: - $ref: "#/components/schemas/rbmSuggestionResponse" + $ref: '#/components/schemas/rbmSuggestionResponse' locationResponse: - $ref: "#/components/schemas/rbmLocationResponse" + $ref: '#/components/schemas/rbmLocationResponse' type: object required: - applicationId @@ -9868,7 +9869,7 @@ components: maxLength: 2048 type: string answerMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' username: description: Basic auth username. example: mySecretUsername @@ -9893,7 +9894,7 @@ components: nullable: true type: string answerFallbackMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -9915,7 +9916,7 @@ components: nullable: true type: string disconnectMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' callTimeout: default: 30 description: |- @@ -9942,7 +9943,7 @@ components: nullable: true type: number machineDetection: - $ref: "#/components/schemas/machineDetectionConfiguration" + $ref: '#/components/schemas/machineDetectionConfiguration' priority: default: 5 description: |- @@ -10049,14 +10050,14 @@ components: nullable: true type: string answerMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' answerUrl: description: URL to deliver the `answer` event webhook. example: https://myServer.example/bandwidth/webhooks/answer format: uri type: string answerFallbackMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' answerFallbackUrl: description: Fallback URL to deliver the `answer` event webhook. example: https://myFallbackServer.example/bandwidth/webhooks/answer @@ -10064,7 +10065,7 @@ components: nullable: true type: string disconnectMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' disconnectUrl: description: URL to deliver the `disconnect` event webhook. example: https://myServer.example/bandwidth/webhooks/disconnect @@ -10164,7 +10165,7 @@ components: example: "+19195554321" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' state: description: |- The current state of the call. Current possible values are @@ -10271,7 +10272,7 @@ components: updateCall: properties: state: - $ref: "#/components/schemas/callStateEnum" + $ref: '#/components/schemas/callStateEnum' redirectUrl: description: |- The URL to send the [Redirect](/docs/voice/bxml/redirect) event @@ -10285,7 +10286,7 @@ components: nullable: true type: string redirectMethod: - $ref: "#/components/schemas/redirectMethodEnum" + $ref: '#/components/schemas/redirectMethodEnum' username: description: Basic auth username. example: mySecretUsername @@ -10307,7 +10308,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: "#/components/schemas/redirectMethodEnum" + $ref: '#/components/schemas/redirectMethodEnum' fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10339,7 +10340,7 @@ components: updateCallRecording: properties: state: - $ref: "#/components/schemas/recordingStateEnum" + $ref: '#/components/schemas/recordingStateEnum' required: - state type: object @@ -10431,7 +10432,7 @@ components: example: PT13.67S type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -10449,7 +10450,7 @@ components: format: date-time type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' status: description: "The current status of the process. For recording, current\ \ possible values are 'processing', 'partial', 'complete', 'deleted',\ @@ -10467,7 +10468,7 @@ components: nullable: true type: string transcription: - $ref: "#/components/schemas/recordingTranscriptionMetadata" + $ref: '#/components/schemas/recordingTranscriptionMetadata' recordingName: description: A name to identify this recording. example: my-recording-name @@ -10524,7 +10525,7 @@ components: nullable: true type: string conferenceEventMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' tag: description: The custom string attached to the conference that will be sent with callbacks. @@ -10536,14 +10537,14 @@ components: A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). items: - $ref: "#/components/schemas/conferenceMember" + $ref: '#/components/schemas/conferenceMember' nullable: true type: array type: object updateConference: properties: status: - $ref: "#/components/schemas/conferenceStateEnum" + $ref: '#/components/schemas/conferenceStateEnum' redirectUrl: description: |- The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) @@ -10554,7 +10555,7 @@ components: nullable: true type: string redirectMethod: - $ref: "#/components/schemas/redirectMethodEnum" + $ref: '#/components/schemas/redirectMethodEnum' username: description: Basic auth username. example: mySecretUsername @@ -10577,7 +10578,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: "#/components/schemas/redirectMethodEnum" + $ref: '#/components/schemas/redirectMethodEnum' fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10730,7 +10731,7 @@ components: format: date-time type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' status: description: "The current status of the process. For recording, current\ \ possible values are 'processing', 'partial', 'complete', 'deleted',\ @@ -10760,7 +10761,7 @@ components: \ need more information." properties: mode: - $ref: "#/components/schemas/machineDetectionModeEnum" + $ref: '#/components/schemas/machineDetectionModeEnum' detectionTimeout: default: 15 description: |- @@ -10827,7 +10828,7 @@ components: nullable: true type: string callbackMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' username: description: Basic auth username. example: mySecretUsername @@ -10851,7 +10852,7 @@ components: nullable: true type: string fallbackMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10877,7 +10878,7 @@ components: format: uri type: string callbackMethod: - $ref: "#/components/schemas/callbackMethodEnum" + $ref: '#/components/schemas/callbackMethodEnum' username: description: Basic auth username. example: mySecretUsername @@ -10928,7 +10929,7 @@ components: properties: transcripts: items: - $ref: "#/components/schemas/transcription" + $ref: '#/components/schemas/transcription' type: array type: object callTranscriptionMetadataList: @@ -10937,7 +10938,7 @@ components: transcriptionName: live_transcription transcriptionUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b items: - $ref: "#/components/schemas/callTranscriptionMetadata" + $ref: '#/components/schemas/callTranscriptionMetadata' type: array callTranscriptionMetadata: properties: @@ -10987,15 +10988,15 @@ components: transcript: Hello World! This is an example. confidence: 0.9 items: - $ref: "#/components/schemas/callTranscription" + $ref: '#/components/schemas/callTranscription' type: array type: object callTranscription: properties: detectedLanguage: - $ref: "#/components/schemas/callTranscriptionDetectedLanguageEnum" + $ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum' track: - $ref: "#/components/schemas/callTranscriptionTrackEnum" + $ref: '#/components/schemas/callTranscriptionTrackEnum' transcript: description: The transcription itself. example: Hello World! This is an example. @@ -11095,7 +11096,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11130,7 +11131,7 @@ components: nullable: true type: string machineDetectionResult: - $ref: "#/components/schemas/machineDetectionResult" + $ref: '#/components/schemas/machineDetectionResult' type: object bridgeCompleteCallback: description: "If the target call leaves the , then this callback is\ @@ -11174,7 +11175,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11268,7 +11269,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11591,7 +11592,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' mediaUrl: description: The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. @@ -11657,7 +11658,7 @@ components: example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' 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 @@ -11754,7 +11755,7 @@ components: example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' digit: description: The digit collected in the call. example: "2" @@ -11844,7 +11845,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11887,7 +11888,7 @@ components: terminatingDigit: description: (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. - example: "#" + example: '#' type: string transferCallerId: description: "The phone number used as the from field of the B-leg call,\ @@ -11947,7 +11948,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11963,9 +11964,9 @@ components: format: date-time type: string diversion: - $ref: "#/components/schemas/diversion" + $ref: '#/components/schemas/diversion' stirShaken: - $ref: "#/components/schemas/stirShaken" + $ref: '#/components/schemas/stirShaken' uui: description: "The value of the `User-To-User` header to send within the\ \ initial `INVITE`. Must include the encoding parameter as specified in\ @@ -12016,7 +12017,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12051,7 +12052,7 @@ components: nullable: true type: string machineDetectionResult: - $ref: "#/components/schemas/machineDetectionResult" + $ref: '#/components/schemas/machineDetectionResult' type: object recordingCompleteCallback: description: "The Record Complete event is sent after a verb has executed\ @@ -12094,7 +12095,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12149,7 +12150,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -12212,7 +12213,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12261,7 +12262,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -12333,7 +12334,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12423,7 +12424,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12472,7 +12473,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: "#/components/schemas/fileFormatEnum" + $ref: '#/components/schemas/fileFormatEnum' 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." @@ -12480,7 +12481,7 @@ components: nullable: true type: string transcription: - $ref: "#/components/schemas/transcription" + $ref: '#/components/schemas/transcription' transferCallerId: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555)." @@ -12536,7 +12537,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12623,7 +12624,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12729,7 +12730,7 @@ components: example: "+15555555555" type: string direction: - $ref: "#/components/schemas/callDirectionEnum" + $ref: '#/components/schemas/callDirectionEnum' callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12873,7 +12874,7 @@ components: terminatingDigit: description: (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. - example: "#" + example: '#' type: string startTime: description: "Time the call was started, in ISO 8601 format." @@ -13292,7 +13293,7 @@ components: example: NumberInventory type: string meta: - $ref: "#/components/schemas/lookupErrorSchema_meta" + $ref: '#/components/schemas/lookupErrorSchema_meta' type: object syncLookupRequest: properties: @@ -13372,13 +13373,13 @@ components: links: example: [] items: - $ref: "#/components/schemas/linkSchema" + $ref: '#/components/schemas/linkSchema' type: array data: - $ref: "#/components/schemas/createSyncLookupResponse_data" + $ref: '#/components/schemas/createSyncLookupResponse_data' errors: items: - $ref: "#/components/schemas/lookupErrorSchema" + $ref: '#/components/schemas/lookupErrorSchema' type: array type: object createAsyncBulkLookupResponse: @@ -13416,13 +13417,13 @@ components: links: description: Links for pagination (if applicable) items: - $ref: "#/components/schemas/linkSchema" + $ref: '#/components/schemas/linkSchema' type: array data: - $ref: "#/components/schemas/createAsyncBulkLookupResponse_data" + $ref: '#/components/schemas/createAsyncBulkLookupResponse_data' errors: items: - $ref: "#/components/schemas/lookupErrorSchema" + $ref: '#/components/schemas/lookupErrorSchema' type: array type: object getAsyncBulkLookupResponse: @@ -13477,13 +13478,13 @@ components: links: example: [] items: - $ref: "#/components/schemas/linkSchema" + $ref: '#/components/schemas/linkSchema' type: array data: - $ref: "#/components/schemas/getAsyncBulkLookupResponse_data" + $ref: '#/components/schemas/getAsyncBulkLookupResponse_data' errors: items: - $ref: "#/components/schemas/lookupErrorSchema" + $ref: '#/components/schemas/lookupErrorSchema' type: array type: object lookupErrorResponse: @@ -13513,14 +13514,14 @@ components: links: example: [] items: - $ref: "#/components/schemas/linkSchema" + $ref: '#/components/schemas/linkSchema' type: array data: description: The phone number lookup response data type: object errors: items: - $ref: "#/components/schemas/lookupErrorSchema" + $ref: '#/components/schemas/lookupErrorSchema' type: array type: object lookupResult: @@ -13543,7 +13544,7 @@ components: example: "+10072904498" type: string lineType: - $ref: "#/components/schemas/lineTypeEnum" + $ref: '#/components/schemas/lineTypeEnum' messagingProvider: description: The messaging service provider of the telephone number. example: Verizon Wireless @@ -13569,9 +13570,9 @@ components: format: date-time-local type: string deactivationEvent: - $ref: "#/components/schemas/deactivationEventEnum" + $ref: '#/components/schemas/deactivationEventEnum' latestMessageDeliveryStatus: - $ref: "#/components/schemas/latestMessageDeliveryStatusEnum" + $ref: '#/components/schemas/latestMessageDeliveryStatusEnum' initialMessageDeliveryStatusDate: description: "[DNI-Only](#section/DNI-Only). The date the phone number entered\ \ the status described in `latestMessageDeliveryStatus`. \nThink of this\ @@ -13741,9 +13742,9 @@ components: verificationRequest: properties: businessAddress: - $ref: "#/components/schemas/address" + $ref: '#/components/schemas/address' businessContact: - $ref: "#/components/schemas/contact" + $ref: '#/components/schemas/contact' messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -13752,7 +13753,7 @@ components: type: integer phoneNumbers: items: - $ref: "#/components/schemas/tfPhoneNumber" + $ref: '#/components/schemas/tfPhoneNumber' maxItems: 10 minItems: 1 type: array @@ -13777,7 +13778,7 @@ components: nullable: false type: string optInWorkflow: - $ref: "#/components/schemas/optInWorkflow" + $ref: '#/components/schemas/optInWorkflow' additionalInformation: description: Any additional information. example: Any additional information @@ -13815,9 +13816,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: "#/components/schemas/businessRegistrationTypeEnum" + $ref: '#/components/schemas/businessRegistrationTypeEnum' businessEntityType: - $ref: "#/components/schemas/businessEntityTypeEnum" + $ref: '#/components/schemas/businessEntityTypeEnum' helpMessageResponse: description: A message that gets sent to users requesting help. example: Please contact support for assistance. @@ -13841,9 +13842,9 @@ components: verificationUpdateRequest: properties: businessAddress: - $ref: "#/components/schemas/address" + $ref: '#/components/schemas/address' businessContact: - $ref: "#/components/schemas/contact" + $ref: '#/components/schemas/contact' messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -13871,7 +13872,7 @@ components: nullable: false type: string optInWorkflow: - $ref: "#/components/schemas/optInWorkflow" + $ref: '#/components/schemas/optInWorkflow' additionalInformation: description: Any additional information. example: Any additional information @@ -13909,9 +13910,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: "#/components/schemas/businessRegistrationTypeEnum" + $ref: '#/components/schemas/businessRegistrationTypeEnum' businessEntityType: - $ref: "#/components/schemas/businessEntityTypeEnum" + $ref: '#/components/schemas/businessEntityTypeEnum' helpMessageResponse: description: A message that gets sent to users requesting help. example: Please contact support for assistance. @@ -13948,7 +13949,7 @@ components: webhookSubscriptionRequestSchema: properties: basicAuthentication: - $ref: "#/components/schemas/tfvBasicAuthentication" + $ref: '#/components/schemas/tfvBasicAuthentication' callbackUrl: description: "Callback URL to receive status updates from Bandwidth. When\ \ a webhook subscription is registered with Bandwidth under a given account\ @@ -14029,7 +14030,7 @@ components: reason: Reason B resubmitAllowed: true items: - $ref: "#/components/schemas/additionalDenialReason" + $ref: '#/components/schemas/additionalDenialReason' type: array declineReasonDescription: description: Explanation for why a verification request was declined. @@ -14090,7 +14091,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: "#/components/schemas/tfvCallbackStatusEnum" + $ref: '#/components/schemas/tfvCallbackStatusEnum' internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. @@ -14113,7 +14114,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: "#/components/schemas/tfvCallbackStatusEnum" + $ref: '#/components/schemas/tfvCallbackStatusEnum' internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. @@ -14134,7 +14135,7 @@ components: tfvSubmissionWrapper: properties: submission: - $ref: "#/components/schemas/verificationUpdateRequest" + $ref: '#/components/schemas/verificationUpdateRequest' type: object address: example: @@ -14392,14 +14393,14 @@ components: description: description properties: links: - $ref: "#/components/schemas/linksObject" + $ref: '#/components/schemas/linksObject' errors: items: - $ref: "#/components/schemas/error" + $ref: '#/components/schemas/error' type: array data: items: - $ref: "#/components/schemas/webhookSubscription" + $ref: '#/components/schemas/webhookSubscription' type: array required: - data @@ -14441,7 +14442,7 @@ components: type: string telephoneNumbers: items: - $ref: "#/components/schemas/telephoneNumber" + $ref: '#/components/schemas/telephoneNumber' type: array type: object telephoneNumber: @@ -14492,9 +14493,9 @@ components: b([-a-zA-Z0-9@:%_\\+.~#()?&//=]*)" type: string type: - $ref: "#/components/schemas/webhookSubscriptionTypeEnum" + $ref: '#/components/schemas/webhookSubscriptionTypeEnum' basicAuthentication: - $ref: "#/components/schemas/webhookSubscription_basicAuthentication" + $ref: '#/components/schemas/webhookSubscription_basicAuthentication' createdDate: example: 2023-05-15T13:56:39.965Z format: date-time @@ -14595,7 +14596,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: "#/components/schemas/tfvStatusEnum" + $ref: '#/components/schemas/tfvStatusEnum' internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all @@ -14625,7 +14626,7 @@ components: format: date-time type: string submission: - $ref: "#/components/schemas/tfvSubmissionInfo" + $ref: '#/components/schemas/tfvSubmissionInfo' blocked: description: Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. @@ -14672,9 +14673,9 @@ components: useCaseSummary: Text summarizing the use case for the toll-free number properties: businessAddress: - $ref: "#/components/schemas/address" + $ref: '#/components/schemas/address' businessContact: - $ref: "#/components/schemas/contact" + $ref: '#/components/schemas/contact' messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -14702,7 +14703,7 @@ components: nullable: false type: string optInWorkflow: - $ref: "#/components/schemas/optInWorkflow" + $ref: '#/components/schemas/optInWorkflow' additionalInformation: description: Any additional information. example: Any additional information @@ -14740,9 +14741,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: "#/components/schemas/businessRegistrationTypeEnum" + $ref: '#/components/schemas/businessRegistrationTypeEnum' businessEntityType: - $ref: "#/components/schemas/businessEntityTypeEnum" + $ref: '#/components/schemas/businessEntityTypeEnum' type: object tfvStatusEnum: enum: @@ -14762,19 +14763,19 @@ components: type: string rbmCardContent_media: allOf: - - $ref: "#/components/schemas/rbmMessageContentFile" + - $ref: '#/components/schemas/rbmMessageContentFile' - properties: height: - $ref: "#/components/schemas/rbmMediaHeightEnum" + $ref: '#/components/schemas/rbmMediaHeightEnum' type: object required: - height multiChannelChannelListRBMObject_allOf_content: description: The content of the message. oneOf: - - $ref: "#/components/schemas/rbmMessageContentText" - - $ref: "#/components/schemas/rbmMessageMedia" - - $ref: "#/components/schemas/rbmMessageContentRichCard" + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' lookupErrorSchema_meta: example: code: 1001 @@ -14835,12 +14836,12 @@ components: format: uuid type: string status: - $ref: "#/components/schemas/completedLookupStatusEnum" + $ref: '#/components/schemas/completedLookupStatusEnum' results: description: The carrier information results for the specified telephone numbers. items: - $ref: "#/components/schemas/lookupResult" + $ref: '#/components/schemas/lookupResult' type: array type: object createAsyncBulkLookupResponse_data: @@ -14855,7 +14856,7 @@ components: format: uuid type: string status: - $ref: "#/components/schemas/inProgressLookupStatusEnum" + $ref: '#/components/schemas/inProgressLookupStatusEnum' type: object getAsyncBulkLookupResponse_data: description: The phone number lookup response data @@ -14892,12 +14893,12 @@ components: format: uuid type: string status: - $ref: "#/components/schemas/inProgressLookupStatusEnum" + $ref: '#/components/schemas/inProgressLookupStatusEnum' results: description: The carrier information results for the specified telephone number. items: - $ref: "#/components/schemas/lookupResult" + $ref: '#/components/schemas/lookupResult' type: array type: object webhookSubscription_basicAuthentication: @@ -14925,4 +14926,10 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` scheme: basic type: http + OAuth2: + flows: + clientCredentials: + scopes: {} + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + type: oauth2 diff --git a/bandwidth.yml b/bandwidth.yml index 6ee15ae1..9ab77fd9 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -9,6 +9,7 @@ info: version: 1.0.0 security: - Basic: [] + - OAuth2: [] tags: - name: Messages - name: Media @@ -8427,6 +8428,12 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + OAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + scopes: {} callbacks: inboundCallback: '{inboundCallbackUrl}': diff --git a/build.gradle b/build.gradle index d39f1d72..02579df4 100644 --- a/build.gradle +++ b/build.gradle @@ -106,14 +106,16 @@ ext { } dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" implementation 'com.squareup.okhttp3:okhttp:4.12.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' - implementation 'org.openapitools:jackson-databind-nullable:0.2.8' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/build.sbt b/build.sbt index 0bf06872..2711b389 100644 --- a/build.sbt +++ b/build.sbt @@ -3,19 +3,20 @@ lazy val root = (project in file(".")). organization := "com.bandwidth.sdk", name := "bandwidth-sdk", version := "1.0.0", - scalaVersion := "2.11.12", + scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), - compile / javacOptions ++= Seq("-Xlint:deprecation"), - Compile / packageDoc / publishArtifact := false, + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.18.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", - "org.openapitools" % "jackson-databind-nullable" % "0.2.8", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", diff --git a/docs/CallsApi.md b/docs/CallsApi.md index 19512af8..2e9fd55f 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -39,6 +39,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call @@ -69,7 +73,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -117,6 +121,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -147,7 +155,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -195,6 +203,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String to = "%2b19195551234"; // String | Filter results by the `to` field. @@ -237,7 +249,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -285,6 +297,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -316,7 +332,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -365,6 +381,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -399,7 +419,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md index 74750e16..65124019 100644 --- a/docs/ConferencesApi.md +++ b/docs/ConferencesApi.md @@ -43,6 +43,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -75,7 +79,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -123,6 +127,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -153,7 +161,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -201,6 +209,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -233,7 +245,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -281,6 +293,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -313,7 +329,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -361,6 +377,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -391,7 +411,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -439,6 +459,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String name = "my-custom-name"; // String | Filter results by the `name` field. @@ -477,7 +501,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -525,6 +549,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -556,7 +584,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -604,6 +632,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -638,7 +670,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -686,6 +718,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -719,7 +755,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 427119ae..4a378ea0 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -38,6 +38,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -67,7 +71,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -115,6 +119,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -145,7 +153,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -193,6 +201,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String continuationToken = "1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39"; // String | Continuation token used to retrieve subsequent media. @@ -223,7 +235,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -271,6 +283,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -306,7 +322,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 84135448..d10cc290 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -36,6 +36,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MessagesApi apiInstance = new MessagesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. MessageRequest messageRequest = new MessageRequest(); // MessageRequest | @@ -66,7 +70,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -115,6 +119,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MessagesApi apiInstance = new MessagesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String messageId = "9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6"; // String | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. @@ -197,7 +205,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MfaApi.md b/docs/MfaApi.md index 34b407d2..ee184f93 100644 --- a/docs/MfaApi.md +++ b/docs/MfaApi.md @@ -37,6 +37,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. @@ -67,7 +71,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -111,6 +115,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. @@ -141,7 +149,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -185,6 +193,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. VerifyCodeRequest verifyCodeRequest = new VerifyCodeRequest(); // VerifyCodeRequest | MFA code verify request body. @@ -215,7 +227,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md index 5a6e5307..39d4040b 100644 --- a/docs/MultiChannelApi.md +++ b/docs/MultiChannelApi.md @@ -35,6 +35,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MultiChannelApi apiInstance = new MultiChannelApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. MultiChannelMessageRequest multiChannelMessageRequest = new MultiChannelMessageRequest(); // MultiChannelMessageRequest | @@ -65,7 +69,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index 698d9856..38c0c987 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -37,6 +37,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | AsyncLookupRequest asyncLookupRequest = new AsyncLookupRequest(); // AsyncLookupRequest | Asynchronous bulk phone number lookup request. @@ -67,7 +71,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -108,6 +112,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | SyncLookupRequest syncLookupRequest = new SyncLookupRequest(); // SyncLookupRequest | Synchronous phone number lookup request. @@ -138,7 +146,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -179,6 +187,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | UUID requestId = UUID.fromString("004223a0-8b17-41b1-bf81-20732adf5590"); // UUID | @@ -209,7 +221,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md index 42131b80..a4d479a5 100644 --- a/docs/RecordingsApi.md +++ b/docs/RecordingsApi.md @@ -44,6 +44,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -75,7 +79,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -123,6 +127,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -154,7 +162,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -202,6 +210,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -233,7 +245,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -281,6 +293,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -313,7 +329,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -361,6 +377,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -393,7 +413,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -441,6 +461,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -473,7 +497,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -521,6 +545,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String to = "%2b19195551234"; // String | Filter results by the `to` field. @@ -557,7 +585,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -605,6 +633,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -635,7 +667,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -683,6 +715,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -716,7 +752,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -764,6 +800,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -795,7 +835,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index be38dbc8..269b3c12 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -35,6 +35,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + StatisticsApi apiInstance = new StatisticsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. try { @@ -63,7 +67,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index 0b626836..6323da6f 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -5,13 +5,13 @@ ## Enum -* `MESSAGE_SENDING` (value: `"message-sending"`) +* `SENDING` (value: `"message-sending"`) -* `MESSAGE_DELIVERED` (value: `"message-delivered"`) +* `DELIVERED` (value: `"message-delivered"`) -* `MESSAGE_FAILED` (value: `"message-failed"`) +* `FAILED` (value: `"message-failed"`) -* `MESSAGE_READ` (value: `"message-read"`) +* `READ` (value: `"message-read"`) diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 5f187578..b0e000f7 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -43,6 +43,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema = new WebhookSubscriptionRequestSchema(); // WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. @@ -73,7 +77,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -121,6 +125,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -150,7 +158,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -198,6 +206,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String id = "7bt57JcsVYJrN9K1OcV1Nu"; // String | Webhook subscription ID @@ -227,7 +239,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -275,6 +287,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -305,7 +321,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -353,6 +369,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); try { List result = apiInstance.listTollFreeUseCases(); @@ -377,7 +397,7 @@ This endpoint does not need any parameter. ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -425,6 +445,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. try { @@ -453,7 +477,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -500,6 +524,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. VerificationRequest verificationRequest = new VerificationRequest(); // VerificationRequest | Request for verification of a toll-free phone number. @@ -529,7 +557,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -576,6 +604,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -607,7 +639,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -654,6 +686,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String id = "7bt57JcsVYJrN9K1OcV1Nu"; // String | Webhook subscription ID @@ -686,7 +722,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md index ec633266..35f434ef 100644 --- a/docs/TranscriptionsApi.md +++ b/docs/TranscriptionsApi.md @@ -37,6 +37,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -68,7 +72,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -116,6 +120,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -148,7 +156,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -196,6 +204,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -226,7 +238,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/openapitools.json b/openapitools.json index f052220d..f8d07ce1 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.17.0" + "version": "7.10.0" } } diff --git a/pom.xml b/pom.xml index 1f42da35..98896dea 100644 --- a/pom.xml +++ b/pom.xml @@ -361,6 +361,11 @@ gson-fire ${gson-fire-version} + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.2 + org.apache.commons commons-lang3 diff --git a/src/main/java/com/bandwidth/sdk/ApiClient.java b/src/main/java/com/bandwidth/sdk/ApiClient.java index 63401aa2..85a1fde6 100644 --- a/src/main/java/com/bandwidth/sdk/ApiClient.java +++ b/src/main/java/com/bandwidth/sdk/ApiClient.java @@ -21,6 +21,8 @@ import okio.Buffer; import okio.BufferedSink; import okio.Okio; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.common.message.types.GrantType; import javax.net.ssl.*; import java.io.File; @@ -55,13 +57,16 @@ import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.auth.HttpBearerAuth; import com.bandwidth.sdk.auth.ApiKeyAuth; +import com.bandwidth.sdk.auth.OAuth; +import com.bandwidth.sdk.auth.RetryingOAuth; +import com.bandwidth.sdk.auth.OAuthFlow; /** *

ApiClient class.

*/ public class ApiClient { - protected String basePath = "http://localhost"; + private String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( "", @@ -71,26 +76,26 @@ public class ApiClient { )); protected Integer serverIndex = 0; protected Map serverVariables = null; - protected boolean debugging = false; - protected Map defaultHeaderMap = new HashMap(); - protected Map defaultCookieMap = new HashMap(); - protected String tempFolderPath = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; - protected Map authentications; + private Map authentications; - protected DateFormat dateFormat; - protected DateFormat datetimeFormat; - protected boolean lenientDatetimeFormat; - protected int dateLength; + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; - protected InputStream sslCaCert; - protected boolean verifyingSsl; - protected KeyManager[] keyManagers; + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; - protected OkHttpClient httpClient; - protected JSON json; + private OkHttpClient httpClient; + private JSON json; - protected HttpLoggingInterceptor loggingInterceptor; + private HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient @@ -101,6 +106,7 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("Basic", new HttpBasicAuth()); + authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -117,15 +123,83 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("Basic", new HttpBasicAuth()); + authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } - protected void initHttpClient() { + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID + * + * @param clientId client ID + */ + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + * + * @param clientId client ID + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + * + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { + this(null, clientId, clientSecret, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with base path, client ID, secret, and additional parameters + * + * @param basePath base path + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String basePath, String clientId, String clientSecret, Map parameters) { + init(); + if (basePath != null) { + this.basePath = basePath; + } + + String tokenUrl = "https://api.bandwidth.com/api/v1/oauth2/token"; + if (!"".equals(tokenUrl) && !URI.create(tokenUrl).isAbsolute()) { + URI uri = URI.create(getBasePath()); + tokenUrl = uri.getScheme() + ":" + + (uri.getAuthority() != null ? "//" + uri.getAuthority() : "") + + tokenUrl; + if (!URI.create(tokenUrl).isAbsolute()) { + throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); + } + } + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.APPLICATION, clientSecret, parameters); + authentications.put( + "OAuth2", + retryingOAuth + ); + initHttpClient(Collections.singletonList(retryingOAuth)); + // Setup authentications (key: authentication name, value: authentication). + authentications.put("Basic", new HttpBasicAuth()); + + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { initHttpClient(Collections.emptyList()); } - protected void initHttpClient(List interceptors) { + private void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); for (Interceptor interceptor: interceptors) { @@ -135,7 +209,7 @@ protected void initHttpClient(List interceptors) { httpClient = builder.build(); } - protected void init() { + private void init() { verifyingSsl = true; json = new JSON(); @@ -158,8 +232,8 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g http://localhost) - * @return An instance of ApiClient + * @param basePath Base path of the URL (e.g http://localhost + * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; @@ -207,7 +281,7 @@ public OkHttpClient getHttpClient() { * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient - * @return ApiClient + * @return Api Client * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { @@ -452,6 +526,12 @@ public void setApiKeyPrefix(String apiKeyPrefix) { * @param accessToken Access token */ public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } throw new RuntimeException("No OAuth2 authentication configured!"); } @@ -636,6 +716,20 @@ public ApiClient setWriteTimeout(int writeTimeout) { return this; } + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for (Authentication apiAuth : authentications.values()) { + if (apiAuth instanceof RetryingOAuth) { + RetryingOAuth retryingOAuth = (RetryingOAuth) apiAuth; + return retryingOAuth.getTokenRequestBuilder(); + } + } + return null; + } /** * Format the given parameter object into string. @@ -695,7 +789,7 @@ public List parameterToPair(String name, Object value) { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -802,7 +896,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceFirst("^.*[/\\\\]", ""); + return filename.replaceAll(".*[/\\\\]", ""); } /** @@ -912,8 +1006,17 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - ResponseBody respBody = response.body(); - if (respBody == null) { + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { return null; } @@ -922,25 +1025,17 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - try { - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody.byteStream(), returnType); - } else if (returnType.equals(String.class)) { - String respBodyString = respBody.string(); - if (respBodyString.isEmpty()) { - return null; - } - // Expecting string, return the raw response body. - return (T) respBodyString; - } else { - throw new ApiException( + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - response.body().string()); - } - } catch (IOException e) { - throw new ApiException(e); + respBody); } } @@ -1267,8 +1362,7 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { throw new ArrayIndexOutOfBoundsException(String.format( - Locale.ROOT, - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); @@ -1340,11 +1434,11 @@ public void processHeaderParams(Map headerParams, Request.Builde */ public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } } } @@ -1437,7 +1531,7 @@ public String guessContentTypeFromFile(File file) { * @param key The key of the Header element * @param file The file to add to the Header */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); @@ -1450,7 +1544,7 @@ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String * @param key The key of the Header element * @param obj The complex object to add to the Header */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); @@ -1472,7 +1566,7 @@ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ - protected Interceptor getProgressInterceptor() { + private Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1493,7 +1587,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException { * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ - protected void applySslSettings() { + private void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; @@ -1555,7 +1649,7 @@ public boolean verify(String hostname, SSLSession session) { } } - protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1572,7 +1666,7 @@ protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcep * @return The string representation of the HTTP request body * @throws com.bandwidth.sdk.ApiException If fail to serialize the request body object into a string */ - protected String requestBodyToString(RequestBody requestBody) throws ApiException { + private String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); diff --git a/src/main/java/com/bandwidth/sdk/ApiException.java b/src/main/java/com/bandwidth/sdk/ApiException.java index c3e60582..1bb97746 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -15,14 +15,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -162,7 +161,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format(Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + return String.format("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 3070c62d..57fcf592 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -13,51 +13,29 @@ package com.bandwidth.sdk; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Configuration { - public static final String VERSION = "1.0.0"; - - private static final AtomicReference defaultApiClient = new AtomicReference<>(); - private static volatile Supplier apiClientFactory = ApiClient::new; - - /** - * Get the default API client, which would be used when creating API instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - ApiClient client = defaultApiClient.get(); - if (client == null) { - client = defaultApiClient.updateAndGet(val -> { - if (val != null) { // changed by another thread - return val; - } - return apiClientFactory.get(); - }); + public static final String VERSION = "1.0.0"; + + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; } - return client; - } - /** - * Set the default API client, which would be used when creating API instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient.set(apiClient); - } - - /** - * set the callback used to create new ApiClient objects - */ - public static void setApiClientFactory(Supplier factory) { - apiClientFactory = Objects.requireNonNull(factory); - } - - private Configuration() { - } -} \ No newline at end of file + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 518e07dd..866104b3 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -27,11 +27,8 @@ import okio.ByteString; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.StringReader; import java.lang.reflect.Type; -import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; @@ -72,6 +69,8 @@ public Class getClassForElement(Json classByDiscriminatorValue.put("message-sent", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("request-location-response", com.bandwidth.sdk.model.InboundCallback.class); classByDiscriminatorValue.put("suggestion-response", com.bandwidth.sdk.model.InboundCallback.class); + classByDiscriminatorValue.put("inboundCallback", com.bandwidth.sdk.model.InboundCallback.class); + classByDiscriminatorValue.put("statusCallback", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("callback", com.bandwidth.sdk.model.Callback.class); return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); @@ -87,6 +86,11 @@ public Class getClassForEl classByDiscriminatorValue.put("REPLY", com.bandwidth.sdk.model.RbmActionBase.class); classByDiscriminatorValue.put("REQUEST_LOCATION", com.bandwidth.sdk.model.RbmActionBase.class); classByDiscriminatorValue.put("SHOW_LOCATION", com.bandwidth.sdk.model.RbmActionViewLocation.class); + classByDiscriminatorValue.put("multiChannelActionCalendarEvent", com.bandwidth.sdk.model.MultiChannelActionCalendarEvent.class); + classByDiscriminatorValue.put("rbmActionBase", com.bandwidth.sdk.model.RbmActionBase.class); + classByDiscriminatorValue.put("rbmActionDial", com.bandwidth.sdk.model.RbmActionDial.class); + classByDiscriminatorValue.put("rbmActionOpenUrl", com.bandwidth.sdk.model.RbmActionOpenUrl.class); + classByDiscriminatorValue.put("rbmActionViewLocation", com.bandwidth.sdk.model.RbmActionViewLocation.class); classByDiscriminatorValue.put("multiChannelAction", com.bandwidth.sdk.model.MultiChannelAction.class); return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); @@ -99,6 +103,9 @@ public Class T deserialize(String body, Type returnType) { } } - /** - * Deserialize the given JSON InputStream to a Java object. - * - * @param Type - * @param inputStream The JSON InputStream - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(InputStream inputStream, Type returnType) throws IOException { - try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - if (isLenientOnJson) { - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - JsonReader jsonReader = new JsonReader(reader); - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(reader, returnType); - } - } - } - /** * Gson TypeAdapter for Byte Array type */ diff --git a/src/main/java/com/bandwidth/sdk/Pair.java b/src/main/java/com/bandwidth/sdk/Pair.java index c2dfaf95..a04697ce 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,25 +13,45 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Pair { - private final String name; - private final String value; + private String name = ""; + private String value = ""; - public Pair(String name, String value) { - this.name = isValidString(name) ? name : ""; - this.value = isValidString(value) ? value : ""; - } + public Pair (String name, String value) { + setName(name); + setValue(value); + } - public String getName() { - return this.name; - } + private void setName(String name) { + if (!isValidString(name)) { + return; + } - public String getValue() { - return this.value; - } + this.name = name; + } - private static boolean isValidString(String arg) { - return arg != null; - } + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } } diff --git a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java index f8a16f7e..c74fbd03 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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 37ac39a2..beaab482 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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 81afa101..6ef9eb8c 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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/api/CallsApi.java b/src/main/java/com/bandwidth/sdk/api/CallsApi.java index fbf70f46..43ef95b3 100644 --- a/src/main/java/com/bandwidth/sdk/api/CallsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/CallsApi.java @@ -98,7 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallCall(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -140,12 +140,12 @@ public okhttp3.Call createCallCall(@javax.annotation.Nonnull String accountId, @ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createCall(Async)"); @@ -182,7 +182,7 @@ private okhttp3.Call createCallValidateBeforeCall(@javax.annotation.Nonnull Stri 500 Internal Server Error - */ - public CreateCallResponse createCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall) throws ApiException { + public CreateCallResponse createCall(String accountId, CreateCall createCall) throws ApiException { ApiResponse localVarResp = createCallWithHttpInfo(accountId, createCall); return localVarResp.getData(); } @@ -209,7 +209,7 @@ public CreateCallResponse createCall(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public ApiResponse createCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall) throws ApiException { + public ApiResponse createCallWithHttpInfo(String accountId, CreateCall createCall) throws ApiException { okhttp3.Call localVarCall = createCallValidateBeforeCall(accountId, createCall, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -238,7 +238,7 @@ public ApiResponse createCallWithHttpInfo(@javax.annotation. 500 Internal Server Error - */ - public okhttp3.Call createCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createCallValidateBeforeCall(accountId, createCall, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -267,7 +267,7 @@ public okhttp3.Call createCallAsync(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public okhttp3.Call getCallStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -309,12 +309,12 @@ public okhttp3.Call getCallStateCall(@javax.annotation.Nonnull String accountId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getCallState(Async)"); @@ -351,7 +351,7 @@ private okhttp3.Call getCallStateValidateBeforeCall(@javax.annotation.Nonnull St 500 Internal Server Error - */ - public CallState getCallState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public CallState getCallState(String accountId, String callId) throws ApiException { ApiResponse localVarResp = getCallStateWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -378,7 +378,7 @@ public CallState getCallState(@javax.annotation.Nonnull String accountId, @javax 500 Internal Server Error - */ - public ApiResponse getCallStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public ApiResponse getCallStateWithHttpInfo(String accountId, String callId) throws ApiException { okhttp3.Call localVarCall = getCallStateValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -407,7 +407,7 @@ public ApiResponse getCallStateWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call getCallStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateAsync(String accountId, String callId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCallStateValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -442,7 +442,7 @@ public okhttp3.Call getCallStateAsync(@javax.annotation.Nonnull String accountId 500 Internal Server Error - */ - public okhttp3.Call listCallsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listCallsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -511,12 +511,12 @@ public okhttp3.Call listCallsCall(@javax.annotation.Nonnull String accountId, @j localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listCallsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listCallsValidateBeforeCall(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listCalls(Async)"); @@ -554,7 +554,7 @@ private okhttp3.Call listCallsValidateBeforeCall(@javax.annotation.Nonnull Strin 500 Internal Server Error - */ - public List listCalls(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { + public List listCalls(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { ApiResponse> localVarResp = listCallsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken); return localVarResp.getData(); } @@ -587,7 +587,7 @@ public List listCalls(@javax.annotation.Nonnull String accountId, @ja 500 Internal Server Error - */ - public ApiResponse> listCallsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { + public ApiResponse> listCallsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { okhttp3.Call localVarCall = listCallsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -622,7 +622,7 @@ public ApiResponse> listCallsWithHttpInfo(@javax.annotation.Nonn 500 Internal Server Error - */ - public okhttp3.Call listCallsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listCallsAsync(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listCallsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -653,7 +653,7 @@ public okhttp3.Call listCallsAsync(@javax.annotation.Nonnull String accountId, @ 500 Internal Server Error - */ - public okhttp3.Call updateCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -696,12 +696,12 @@ public okhttp3.Call updateCallCall(@javax.annotation.Nonnull String accountId, @ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCall(Async)"); @@ -744,7 +744,7 @@ private okhttp3.Call updateCallValidateBeforeCall(@javax.annotation.Nonnull Stri 500 Internal Server Error - */ - public void updateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { + public void updateCall(String accountId, String callId, UpdateCall updateCall) throws ApiException { updateCallWithHttpInfo(accountId, callId, updateCall); } @@ -772,7 +772,7 @@ public void updateCall(@javax.annotation.Nonnull String accountId, @javax.annota 500 Internal Server Error - */ - public ApiResponse updateCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { + public ApiResponse updateCallWithHttpInfo(String accountId, String callId, UpdateCall updateCall) throws ApiException { okhttp3.Call localVarCall = updateCallValidateBeforeCall(accountId, callId, updateCall, null); return localVarApiClient.execute(localVarCall); } @@ -802,7 +802,7 @@ public ApiResponse updateCallWithHttpInfo(@javax.annotation.Nonnull String 500 Internal Server Error - */ - public okhttp3.Call updateCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallValidateBeforeCall(accountId, callId, updateCall, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -832,7 +832,7 @@ public okhttp3.Call updateCallAsync(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -875,12 +875,12 @@ public okhttp3.Call updateCallBxmlCall(@javax.annotation.Nonnull String accountI localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCallBxml(Async)"); @@ -923,7 +923,7 @@ private okhttp3.Call updateCallBxmlValidateBeforeCall(@javax.annotation.Nonnull 500 Internal Server Error - */ - public void updateCallBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { + public void updateCallBxml(String accountId, String callId, String body) throws ApiException { updateCallBxmlWithHttpInfo(accountId, callId, body); } @@ -951,7 +951,7 @@ public void updateCallBxml(@javax.annotation.Nonnull String accountId, @javax.an 500 Internal Server Error - */ - public ApiResponse updateCallBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { + public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String callId, String body) throws ApiException { okhttp3.Call localVarCall = updateCallBxmlValidateBeforeCall(accountId, callId, body, null); return localVarApiClient.execute(localVarCall); } @@ -981,7 +981,7 @@ public ApiResponse updateCallBxmlWithHttpInfo(@javax.annotation.Nonnull St 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlAsync(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallBxmlValidateBeforeCall(accountId, callId, body, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java index 02951333..b41289a6 100644 --- a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java @@ -101,7 +101,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call downloadConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -146,12 +146,12 @@ public okhttp3.Call downloadConferenceRecordingCall(@javax.annotation.Nonnull St localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling downloadConferenceRecording(Async)"); @@ -194,7 +194,7 @@ private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(@javax.annota 500 Internal Server Error - */ - public File downloadConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public File downloadConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { ApiResponse localVarResp = downloadConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -222,7 +222,7 @@ public File downloadConferenceRecording(@javax.annotation.Nonnull String account 500 Internal Server Error - */ - public ApiResponse downloadConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { okhttp3.Call localVarCall = downloadConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -252,7 +252,7 @@ public ApiResponse downloadConferenceRecordingWithHttpInfo(@javax.annotati 500 Internal Server Error - */ - public okhttp3.Call downloadConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -281,7 +281,7 @@ public okhttp3.Call downloadConferenceRecordingAsync(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public okhttp3.Call getConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -323,12 +323,12 @@ public okhttp3.Call getConferenceCall(@javax.annotation.Nonnull String accountId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConference(Async)"); @@ -365,7 +365,7 @@ private okhttp3.Call getConferenceValidateBeforeCall(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public Conference getConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { + public Conference getConference(String accountId, String conferenceId) throws ApiException { ApiResponse localVarResp = getConferenceWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -392,7 +392,7 @@ public Conference getConference(@javax.annotation.Nonnull String accountId, @jav 500 Internal Server Error - */ - public ApiResponse getConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { + public ApiResponse getConferenceWithHttpInfo(String accountId, String conferenceId) throws ApiException { okhttp3.Call localVarCall = getConferenceValidateBeforeCall(accountId, conferenceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -421,7 +421,7 @@ public ApiResponse getConferenceWithHttpInfo(@javax.annotation.Nonnu 500 Internal Server Error - */ - public okhttp3.Call getConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceValidateBeforeCall(accountId, conferenceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -451,7 +451,7 @@ public okhttp3.Call getConferenceAsync(@javax.annotation.Nonnull String accountI 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -494,12 +494,12 @@ public okhttp3.Call getConferenceMemberCall(@javax.annotation.Nonnull String acc localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceMemberValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConferenceMember(Async)"); @@ -542,7 +542,7 @@ private okhttp3.Call getConferenceMemberValidateBeforeCall(@javax.annotation.Non 500 Internal Server Error - */ - public ConferenceMember getConferenceMember(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId) throws ApiException { + public ConferenceMember getConferenceMember(String accountId, String conferenceId, String memberId) throws ApiException { ApiResponse localVarResp = getConferenceMemberWithHttpInfo(accountId, conferenceId, memberId); return localVarResp.getData(); } @@ -570,7 +570,7 @@ public ConferenceMember getConferenceMember(@javax.annotation.Nonnull String acc 500 Internal Server Error - */ - public ApiResponse getConferenceMemberWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId) throws ApiException { + public ApiResponse getConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId) throws ApiException { okhttp3.Call localVarCall = getConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -600,7 +600,7 @@ public ApiResponse getConferenceMemberWithHttpInfo(@javax.anno 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberAsync(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -630,7 +630,7 @@ public okhttp3.Call getConferenceMemberAsync(@javax.annotation.Nonnull String ac 500 Internal Server Error - */ - public okhttp3.Call getConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -673,12 +673,12 @@ public okhttp3.Call getConferenceRecordingCall(@javax.annotation.Nonnull String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConferenceRecording(Async)"); @@ -721,7 +721,7 @@ private okhttp3.Call getConferenceRecordingValidateBeforeCall(@javax.annotation. 500 Internal Server Error - */ - public ConferenceRecordingMetadata getConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ConferenceRecordingMetadata getConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { ApiResponse localVarResp = getConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -749,7 +749,7 @@ public ConferenceRecordingMetadata getConferenceRecording(@javax.annotation.Nonn 500 Internal Server Error - */ - public ApiResponse getConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse getConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { okhttp3.Call localVarCall = getConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -779,7 +779,7 @@ public ApiResponse getConferenceRecordingWithHttpIn 500 Internal Server Error - */ - public okhttp3.Call getConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingAsync(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -808,7 +808,7 @@ public okhttp3.Call getConferenceRecordingAsync(@javax.annotation.Nonnull String 500 Internal Server Error - */ - public okhttp3.Call listConferenceRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -850,12 +850,12 @@ public okhttp3.Call listConferenceRecordingsCall(@javax.annotation.Nonnull Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferenceRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listConferenceRecordings(Async)"); @@ -892,7 +892,7 @@ private okhttp3.Call listConferenceRecordingsValidateBeforeCall(@javax.annotatio 500 Internal Server Error - */ - public List listConferenceRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { + public List listConferenceRecordings(String accountId, String conferenceId) throws ApiException { ApiResponse> localVarResp = listConferenceRecordingsWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -919,7 +919,7 @@ public List listConferenceRecordings(@javax.annotat 500 Internal Server Error - */ - public ApiResponse> listConferenceRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { + public ApiResponse> listConferenceRecordingsWithHttpInfo(String accountId, String conferenceId) throws ApiException { okhttp3.Call localVarCall = listConferenceRecordingsValidateBeforeCall(accountId, conferenceId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -948,7 +948,7 @@ public ApiResponse> listConferenceRecordingsWi 500 Internal Server Error - */ - public okhttp3.Call listConferenceRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsAsync(String accountId, String conferenceId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listConferenceRecordingsValidateBeforeCall(accountId, conferenceId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -981,7 +981,7 @@ public okhttp3.Call listConferenceRecordingsAsync(@javax.annotation.Nonnull Stri 500 Internal Server Error - */ - public okhttp3.Call listConferencesCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listConferencesCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1042,12 +1042,12 @@ public okhttp3.Call listConferencesCall(@javax.annotation.Nonnull String account localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferencesValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listConferences(Async)"); @@ -1083,7 +1083,7 @@ private okhttp3.Call listConferencesValidateBeforeCall(@javax.annotation.Nonnull 500 Internal Server Error - */ - public List listConferences(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { + public List listConferences(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { ApiResponse> localVarResp = listConferencesWithHttpInfo(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken); return localVarResp.getData(); } @@ -1114,7 +1114,7 @@ public List listConferences(@javax.annotation.Nonnull String account 500 Internal Server Error - */ - public ApiResponse> listConferencesWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { + public ApiResponse> listConferencesWithHttpInfo(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { okhttp3.Call localVarCall = listConferencesValidateBeforeCall(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1147,7 +1147,7 @@ public ApiResponse> listConferencesWithHttpInfo(@javax.annotati 500 Internal Server Error - */ - public okhttp3.Call listConferencesAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listConferencesAsync(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listConferencesValidateBeforeCall(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1177,7 +1177,7 @@ public okhttp3.Call listConferencesAsync(@javax.annotation.Nonnull String accoun 500 Internal Server Error - */ - public okhttp3.Call updateConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1220,12 +1220,12 @@ public okhttp3.Call updateConferenceCall(@javax.annotation.Nonnull String accoun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceValidateBeforeCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConference(Async)"); @@ -1267,7 +1267,7 @@ private okhttp3.Call updateConferenceValidateBeforeCall(@javax.annotation.Nonnul 500 Internal Server Error - */ - public void updateConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { + public void updateConference(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { updateConferenceWithHttpInfo(accountId, conferenceId, updateConference); } @@ -1294,7 +1294,7 @@ public void updateConference(@javax.annotation.Nonnull String accountId, @javax. 500 Internal Server Error - */ - public ApiResponse updateConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { + public ApiResponse updateConferenceWithHttpInfo(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { okhttp3.Call localVarCall = updateConferenceValidateBeforeCall(accountId, conferenceId, updateConference, null); return localVarApiClient.execute(localVarCall); } @@ -1323,7 +1323,7 @@ public ApiResponse updateConferenceWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call updateConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceValidateBeforeCall(accountId, conferenceId, updateConference, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1352,7 +1352,7 @@ public okhttp3.Call updateConferenceAsync(@javax.annotation.Nonnull String accou 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1395,12 +1395,12 @@ public okhttp3.Call updateConferenceBxmlCall(@javax.annotation.Nonnull String ac localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceBxmlValidateBeforeCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConferenceBxml(Async)"); @@ -1442,7 +1442,7 @@ private okhttp3.Call updateConferenceBxmlValidateBeforeCall(@javax.annotation.No 500 Internal Server Error - */ - public void updateConferenceBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { + public void updateConferenceBxml(String accountId, String conferenceId, String body) throws ApiException { updateConferenceBxmlWithHttpInfo(accountId, conferenceId, body); } @@ -1469,7 +1469,7 @@ public void updateConferenceBxml(@javax.annotation.Nonnull String accountId, @ja 500 Internal Server Error - */ - public ApiResponse updateConferenceBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { + public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, String conferenceId, String body) throws ApiException { okhttp3.Call localVarCall = updateConferenceBxmlValidateBeforeCall(accountId, conferenceId, body, null); return localVarApiClient.execute(localVarCall); } @@ -1498,7 +1498,7 @@ public ApiResponse updateConferenceBxmlWithHttpInfo(@javax.annotation.Nonn 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceBxmlValidateBeforeCall(accountId, conferenceId, body, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1528,7 +1528,7 @@ public okhttp3.Call updateConferenceBxmlAsync(@javax.annotation.Nonnull String a 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceMemberCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1572,12 +1572,12 @@ public okhttp3.Call updateConferenceMemberCall(@javax.annotation.Nonnull String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceMemberValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConferenceMember(Async)"); @@ -1625,7 +1625,7 @@ private okhttp3.Call updateConferenceMemberValidateBeforeCall(@javax.annotation. 500 Internal Server Error - */ - public void updateConferenceMember(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember) throws ApiException { + public void updateConferenceMember(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { updateConferenceMemberWithHttpInfo(accountId, conferenceId, memberId, updateConferenceMember); } @@ -1653,7 +1653,7 @@ public void updateConferenceMember(@javax.annotation.Nonnull String accountId, @ 500 Internal Server Error - */ - public ApiResponse updateConferenceMemberWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember) throws ApiException { + public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { okhttp3.Call localVarCall = updateConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, updateConferenceMember, null); return localVarApiClient.execute(localVarCall); } @@ -1683,7 +1683,7 @@ public ApiResponse updateConferenceMemberWithHttpInfo(@javax.annotation.No 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceMemberAsync(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, updateConferenceMember, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/MediaApi.java b/src/main/java/com/bandwidth/sdk/api/MediaApi.java index d0e2cf9d..2d66e1f0 100644 --- a/src/main/java/com/bandwidth/sdk/api/MediaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MediaApi.java @@ -96,7 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -138,12 +138,12 @@ public okhttp3.Call deleteMediaCall(@javax.annotation.Nonnull String accountId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteMedia(Async)"); @@ -179,7 +179,7 @@ private okhttp3.Call deleteMediaValidateBeforeCall(@javax.annotation.Nonnull Str 500 Internal Server Error - */ - public void deleteMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { + public void deleteMedia(String accountId, String mediaId) throws ApiException { deleteMediaWithHttpInfo(accountId, mediaId); } @@ -205,7 +205,7 @@ public void deleteMedia(@javax.annotation.Nonnull String accountId, @javax.annot 500 Internal Server Error - */ - public ApiResponse deleteMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { + public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { okhttp3.Call localVarCall = deleteMediaValidateBeforeCall(accountId, mediaId, null); return localVarApiClient.execute(localVarCall); } @@ -233,7 +233,7 @@ public ApiResponse deleteMediaWithHttpInfo(@javax.annotation.Nonnull Strin 500 Internal Server Error - */ - public okhttp3.Call deleteMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteMediaValidateBeforeCall(accountId, mediaId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -261,7 +261,7 @@ public okhttp3.Call deleteMediaAsync(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public okhttp3.Call getMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -304,12 +304,12 @@ public okhttp3.Call getMediaCall(@javax.annotation.Nonnull String accountId, @ja localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getMedia(Async)"); @@ -346,7 +346,7 @@ private okhttp3.Call getMediaValidateBeforeCall(@javax.annotation.Nonnull String 500 Internal Server Error - */ - public File getMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { + public File getMedia(String accountId, String mediaId) throws ApiException { ApiResponse localVarResp = getMediaWithHttpInfo(accountId, mediaId); return localVarResp.getData(); } @@ -373,7 +373,7 @@ public File getMedia(@javax.annotation.Nonnull String accountId, @javax.annotati 500 Internal Server Error - */ - public ApiResponse getMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { + public ApiResponse getMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { okhttp3.Call localVarCall = getMediaValidateBeforeCall(accountId, mediaId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -402,7 +402,7 @@ public ApiResponse getMediaWithHttpInfo(@javax.annotation.Nonnull String a 500 Internal Server Error - */ - public okhttp3.Call getMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMediaValidateBeforeCall(accountId, mediaId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -431,7 +431,7 @@ public okhttp3.Call getMediaAsync(@javax.annotation.Nonnull String accountId, @j 500 Internal Server Error - */ - public okhttp3.Call listMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMediaCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -477,12 +477,12 @@ public okhttp3.Call listMediaCall(@javax.annotation.Nonnull String accountId, @j } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMediaValidateBeforeCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMedia(Async)"); @@ -514,7 +514,7 @@ private okhttp3.Call listMediaValidateBeforeCall(@javax.annotation.Nonnull Strin 500 Internal Server Error - */ - public List listMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken) throws ApiException { + public List listMedia(String accountId, String continuationToken) throws ApiException { ApiResponse> localVarResp = listMediaWithHttpInfo(accountId, continuationToken); return localVarResp.getData(); } @@ -541,7 +541,7 @@ public List listMedia(@javax.annotation.Nonnull String accountId, @javax. 500 Internal Server Error - */ - public ApiResponse> listMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken) throws ApiException { + public ApiResponse> listMediaWithHttpInfo(String accountId, String continuationToken) throws ApiException { okhttp3.Call localVarCall = listMediaValidateBeforeCall(accountId, continuationToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -570,7 +570,7 @@ public ApiResponse> listMediaWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call listMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listMediaAsync(String accountId, String continuationToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listMediaValidateBeforeCall(accountId, continuationToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -602,7 +602,7 @@ public okhttp3.Call listMediaAsync(@javax.annotation.Nonnull String accountId, @ 500 Internal Server Error - */ - public okhttp3.Call uploadMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -702,12 +702,12 @@ public okhttp3.Call uploadMediaCall(@javax.annotation.Nonnull String accountId, } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadMediaValidateBeforeCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling uploadMedia(Async)"); @@ -751,7 +751,7 @@ private okhttp3.Call uploadMediaValidateBeforeCall(@javax.annotation.Nonnull Str 500 Internal Server Error - */ - public void uploadMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl) throws ApiException { + public void uploadMedia(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { uploadMediaWithHttpInfo(accountId, mediaId, body, contentType, cacheControl); } @@ -780,7 +780,7 @@ public void uploadMedia(@javax.annotation.Nonnull String accountId, @javax.annot 500 Internal Server Error - */ - public ApiResponse uploadMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl) throws ApiException { + public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(accountId, mediaId, body, contentType, cacheControl, null); return localVarApiClient.execute(localVarCall); } @@ -811,7 +811,7 @@ public ApiResponse uploadMediaWithHttpInfo(@javax.annotation.Nonnull Strin 500 Internal Server Error - */ - public okhttp3.Call uploadMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadMediaAsync(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(accountId, mediaId, body, contentType, cacheControl, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java index 3f438b59..0a0e2f99 100644 --- a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java @@ -103,7 +103,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageCall(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -145,12 +145,12 @@ public okhttp3.Call createMessageCall(@javax.annotation.Nonnull String accountId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMessageValidateBeforeCall(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createMessage(Async)"); @@ -188,7 +188,7 @@ private okhttp3.Call createMessageValidateBeforeCall(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public Message createMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest) throws ApiException { + public Message createMessage(String accountId, MessageRequest messageRequest) throws ApiException { ApiResponse localVarResp = createMessageWithHttpInfo(accountId, messageRequest); return localVarResp.getData(); } @@ -216,7 +216,7 @@ public Message createMessage(@javax.annotation.Nonnull String accountId, @javax. 500 Internal Server Error - */ - public ApiResponse createMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest) throws ApiException { + public ApiResponse createMessageWithHttpInfo(String accountId, MessageRequest messageRequest) throws ApiException { okhttp3.Call localVarCall = createMessageValidateBeforeCall(accountId, messageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -246,7 +246,7 @@ public ApiResponse createMessageWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call createMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createMessageValidateBeforeCall(accountId, messageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -300,7 +300,7 @@ public okhttp3.Call createMessageAsync(@javax.annotation.Nonnull String accountI 500 Internal Server Error - */ - public okhttp3.Call listMessagesCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -449,12 +449,12 @@ public okhttp3.Call listMessagesCall(@javax.annotation.Nonnull String accountId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listMessagesValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMessages(Async)"); @@ -511,7 +511,7 @@ private okhttp3.Call listMessagesValidateBeforeCall(@javax.annotation.Nonnull St 500 Internal Server Error - */ - public MessagesList listMessages(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount) throws ApiException { + public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount); return localVarResp.getData(); } @@ -563,7 +563,7 @@ public MessagesList listMessages(@javax.annotation.Nonnull String accountId, @ja 500 Internal Server Error - */ - public ApiResponse listMessagesWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount) throws ApiException { + public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -617,7 +617,7 @@ public ApiResponse listMessagesWithHttpInfo(@javax.annotation.Nonn 500 Internal Server Error - */ - public okhttp3.Call listMessagesAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/MfaApi.java b/src/main/java/com/bandwidth/sdk/api/MfaApi.java index 453d09d4..d2d85f50 100644 --- a/src/main/java/com/bandwidth/sdk/api/MfaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MfaApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call generateMessagingCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -139,12 +139,12 @@ public okhttp3.Call generateMessagingCodeCall(@javax.annotation.Nonnull String a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateMessagingCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateMessagingCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling generateMessagingCode(Async)"); @@ -177,7 +177,7 @@ private okhttp3.Call generateMessagingCodeValidateBeforeCall(@javax.annotation.N 500 Internal Server Error - */ - public MessagingCodeResponse generateMessagingCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { + public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateMessagingCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -200,7 +200,7 @@ public MessagingCodeResponse generateMessagingCode(@javax.annotation.Nonnull Str 500 Internal Server Error - */ - public ApiResponse generateMessagingCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { + public ApiResponse generateMessagingCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { okhttp3.Call localVarCall = generateMessagingCodeValidateBeforeCall(accountId, codeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -225,7 +225,7 @@ public ApiResponse generateMessagingCodeWithHttpInfo(@jav 500 Internal Server Error - */ - public okhttp3.Call generateMessagingCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateMessagingCodeValidateBeforeCall(accountId, codeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -250,7 +250,7 @@ public okhttp3.Call generateMessagingCodeAsync(@javax.annotation.Nonnull String 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -292,12 +292,12 @@ public okhttp3.Call generateVoiceCodeCall(@javax.annotation.Nonnull String accou localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateVoiceCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateVoiceCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling generateVoiceCode(Async)"); @@ -330,7 +330,7 @@ private okhttp3.Call generateVoiceCodeValidateBeforeCall(@javax.annotation.Nonnu 500 Internal Server Error - */ - public VoiceCodeResponse generateVoiceCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { + public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateVoiceCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -353,7 +353,7 @@ public VoiceCodeResponse generateVoiceCode(@javax.annotation.Nonnull String acco 500 Internal Server Error - */ - public ApiResponse generateVoiceCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { + public ApiResponse generateVoiceCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { okhttp3.Call localVarCall = generateVoiceCodeValidateBeforeCall(accountId, codeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -378,7 +378,7 @@ public ApiResponse generateVoiceCodeWithHttpInfo(@javax.annot 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateVoiceCodeValidateBeforeCall(accountId, codeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -404,7 +404,7 @@ public okhttp3.Call generateVoiceCodeAsync(@javax.annotation.Nonnull String acco 500 Internal Server Error - */ - public okhttp3.Call verifyCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -446,12 +446,12 @@ public okhttp3.Call verifyCodeCall(@javax.annotation.Nonnull String accountId, @ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyCodeValidateBeforeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling verifyCode(Async)"); @@ -485,7 +485,7 @@ private okhttp3.Call verifyCodeValidateBeforeCall(@javax.annotation.Nonnull Stri 500 Internal Server Error - */ - public VerifyCodeResponse verifyCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest) throws ApiException { + public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { ApiResponse localVarResp = verifyCodeWithHttpInfo(accountId, verifyCodeRequest); return localVarResp.getData(); } @@ -509,7 +509,7 @@ public VerifyCodeResponse verifyCode(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public ApiResponse verifyCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest) throws ApiException { + public ApiResponse verifyCodeWithHttpInfo(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { okhttp3.Call localVarCall = verifyCodeValidateBeforeCall(accountId, verifyCodeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -535,7 +535,7 @@ public ApiResponse verifyCodeWithHttpInfo(@javax.annotation. 500 Internal Server Error - */ - public okhttp3.Call verifyCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeAsync(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyCodeValidateBeforeCall(accountId, verifyCodeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java index 7ac63f0f..96f33409 100644 --- a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createMultiChannelMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageCall(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -139,12 +139,12 @@ public okhttp3.Call createMultiChannelMessageCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createMultiChannelMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMultiChannelMessageValidateBeforeCall(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createMultiChannelMessage(Async)"); @@ -182,7 +182,7 @@ private okhttp3.Call createMultiChannelMessageValidateBeforeCall(@javax.annotati 500 Internal Server Error - */ - public CreateMultiChannelMessageResponse createMultiChannelMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public CreateMultiChannelMessageResponse createMultiChannelMessage(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { ApiResponse localVarResp = createMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); return localVarResp.getData(); } @@ -210,7 +210,7 @@ public CreateMultiChannelMessageResponse createMultiChannelMessage(@javax.annota 500 Internal Server Error - */ - public ApiResponse createMultiChannelMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public ApiResponse createMultiChannelMessageWithHttpInfo(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { okhttp3.Call localVarCall = createMultiChannelMessageValidateBeforeCall(accountId, multiChannelMessageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -240,7 +240,7 @@ public ApiResponse createMultiChannelMessageW 500 Internal Server Error - */ - public okhttp3.Call createMultiChannelMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageAsync(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createMultiChannelMessageValidateBeforeCall(accountId, multiChannelMessageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java index c018f821..2c6d5df4 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -93,7 +93,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 0 Bad Request - */ - public okhttp3.Call createAsyncBulkLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAsyncBulkLookupCall(String accountId, AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; @@ -135,12 +135,12 @@ public okhttp3.Call createAsyncBulkLookupCall(@javax.annotation.Nonnull String a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createAsyncBulkLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createAsyncBulkLookupValidateBeforeCall(String accountId, AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createAsyncBulkLookup(Async)"); @@ -170,7 +170,7 @@ private okhttp3.Call createAsyncBulkLookupValidateBeforeCall(@javax.annotation.N 0 Bad Request - */ - public CreateAsyncBulkLookupResponse createAsyncBulkLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest) throws ApiException { + public CreateAsyncBulkLookupResponse createAsyncBulkLookup(String accountId, AsyncLookupRequest asyncLookupRequest) throws ApiException { ApiResponse localVarResp = createAsyncBulkLookupWithHttpInfo(accountId, asyncLookupRequest); return localVarResp.getData(); } @@ -190,7 +190,7 @@ public CreateAsyncBulkLookupResponse createAsyncBulkLookup(@javax.annotation.Non 0 Bad Request - */ - public ApiResponse createAsyncBulkLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest) throws ApiException { + public ApiResponse createAsyncBulkLookupWithHttpInfo(String accountId, AsyncLookupRequest asyncLookupRequest) throws ApiException { okhttp3.Call localVarCall = createAsyncBulkLookupValidateBeforeCall(accountId, asyncLookupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -212,7 +212,7 @@ public ApiResponse createAsyncBulkLookupWithHttpI 0 Bad Request - */ - public okhttp3.Call createAsyncBulkLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAsyncBulkLookupAsync(String accountId, AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createAsyncBulkLookupValidateBeforeCall(accountId, asyncLookupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -234,7 +234,7 @@ public okhttp3.Call createAsyncBulkLookupAsync(@javax.annotation.Nonnull String 0 Bad Request - */ - public okhttp3.Call createSyncLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createSyncLookupCall(String accountId, SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; @@ -276,12 +276,12 @@ public okhttp3.Call createSyncLookupCall(@javax.annotation.Nonnull String accoun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createSyncLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createSyncLookupValidateBeforeCall(String accountId, SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createSyncLookup(Async)"); @@ -311,7 +311,7 @@ private okhttp3.Call createSyncLookupValidateBeforeCall(@javax.annotation.Nonnul 0 Bad Request - */ - public CreateSyncLookupResponse createSyncLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest) throws ApiException { + public CreateSyncLookupResponse createSyncLookup(String accountId, SyncLookupRequest syncLookupRequest) throws ApiException { ApiResponse localVarResp = createSyncLookupWithHttpInfo(accountId, syncLookupRequest); return localVarResp.getData(); } @@ -331,7 +331,7 @@ public CreateSyncLookupResponse createSyncLookup(@javax.annotation.Nonnull Strin 0 Bad Request - */ - public ApiResponse createSyncLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest) throws ApiException { + public ApiResponse createSyncLookupWithHttpInfo(String accountId, SyncLookupRequest syncLookupRequest) throws ApiException { okhttp3.Call localVarCall = createSyncLookupValidateBeforeCall(accountId, syncLookupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -353,7 +353,7 @@ public ApiResponse createSyncLookupWithHttpInfo(@javax 0 Bad Request - */ - public okhttp3.Call createSyncLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createSyncLookupAsync(String accountId, SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createSyncLookupValidateBeforeCall(accountId, syncLookupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -375,7 +375,7 @@ public okhttp3.Call createSyncLookupAsync(@javax.annotation.Nonnull String accou 0 Bad Request - */ - public okhttp3.Call getAsyncBulkLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAsyncBulkLookupCall(String accountId, UUID requestId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; @@ -417,12 +417,12 @@ public okhttp3.Call getAsyncBulkLookupCall(@javax.annotation.Nonnull String acco localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getAsyncBulkLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAsyncBulkLookupValidateBeforeCall(String accountId, UUID requestId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getAsyncBulkLookup(Async)"); @@ -452,7 +452,7 @@ private okhttp3.Call getAsyncBulkLookupValidateBeforeCall(@javax.annotation.Nonn 0 Bad Request - */ - public GetAsyncBulkLookupResponse getAsyncBulkLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId) throws ApiException { + public GetAsyncBulkLookupResponse getAsyncBulkLookup(String accountId, UUID requestId) throws ApiException { ApiResponse localVarResp = getAsyncBulkLookupWithHttpInfo(accountId, requestId); return localVarResp.getData(); } @@ -472,7 +472,7 @@ public GetAsyncBulkLookupResponse getAsyncBulkLookup(@javax.annotation.Nonnull S 0 Bad Request - */ - public ApiResponse getAsyncBulkLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId) throws ApiException { + public ApiResponse getAsyncBulkLookupWithHttpInfo(String accountId, UUID requestId) throws ApiException { okhttp3.Call localVarCall = getAsyncBulkLookupValidateBeforeCall(accountId, requestId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -494,7 +494,7 @@ public ApiResponse getAsyncBulkLookupWithHttpInfo(@j 0 Bad Request - */ - public okhttp3.Call getAsyncBulkLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAsyncBulkLookupAsync(String accountId, UUID requestId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAsyncBulkLookupValidateBeforeCall(accountId, requestId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java index 894bc284..68b3866b 100644 --- a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -143,12 +143,12 @@ public okhttp3.Call deleteRecordingCall(@javax.annotation.Nonnull String account localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecording(Async)"); @@ -190,7 +190,7 @@ private okhttp3.Call deleteRecordingValidateBeforeCall(@javax.annotation.Nonnull 500 Internal Server Error - */ - public void deleteRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public void deleteRecording(String accountId, String callId, String recordingId) throws ApiException { deleteRecordingWithHttpInfo(accountId, callId, recordingId); } @@ -217,7 +217,7 @@ public void deleteRecording(@javax.annotation.Nonnull String accountId, @javax.a 500 Internal Server Error - */ - public ApiResponse deleteRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse deleteRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -246,7 +246,7 @@ public ApiResponse deleteRecordingWithHttpInfo(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -275,7 +275,7 @@ public okhttp3.Call deleteRecordingAsync(@javax.annotation.Nonnull String accoun 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -318,12 +318,12 @@ public okhttp3.Call deleteRecordingMediaCall(@javax.annotation.Nonnull String ac localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingMediaValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecordingMedia(Async)"); @@ -365,7 +365,7 @@ private okhttp3.Call deleteRecordingMediaValidateBeforeCall(@javax.annotation.No 500 Internal Server Error - */ - public void deleteRecordingMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public void deleteRecordingMedia(String accountId, String callId, String recordingId) throws ApiException { deleteRecordingMediaWithHttpInfo(accountId, callId, recordingId); } @@ -392,7 +392,7 @@ public void deleteRecordingMedia(@javax.annotation.Nonnull String accountId, @ja 500 Internal Server Error - */ - public ApiResponse deleteRecordingMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingMediaValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -421,7 +421,7 @@ public ApiResponse deleteRecordingMediaWithHttpInfo(@javax.annotation.Nonn 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingMediaValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -450,7 +450,7 @@ public okhttp3.Call deleteRecordingMediaAsync(@javax.annotation.Nonnull String a 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -493,12 +493,12 @@ public okhttp3.Call deleteRecordingTranscriptionCall(@javax.annotation.Nonnull S localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecordingTranscription(Async)"); @@ -540,7 +540,7 @@ private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(@javax.annot 500 Internal Server Error - */ - public void deleteRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public void deleteRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { deleteRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); } @@ -567,7 +567,7 @@ public void deleteRecordingTranscription(@javax.annotation.Nonnull String accoun 500 Internal Server Error - */ - public ApiResponse deleteRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse deleteRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -596,7 +596,7 @@ public ApiResponse deleteRecordingTranscriptionWithHttpInfo(@javax.annotat 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -625,7 +625,7 @@ public okhttp3.Call deleteRecordingTranscriptionAsync(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -670,12 +670,12 @@ public okhttp3.Call downloadCallRecordingCall(@javax.annotation.Nonnull String a localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling downloadCallRecording(Async)"); @@ -718,7 +718,7 @@ private okhttp3.Call downloadCallRecordingValidateBeforeCall(@javax.annotation.N 500 Internal Server Error - */ - public File downloadCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public File downloadCallRecording(String accountId, String callId, String recordingId) throws ApiException { ApiResponse localVarResp = downloadCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -746,7 +746,7 @@ public File downloadCallRecording(@javax.annotation.Nonnull String accountId, @j 500 Internal Server Error - */ - public ApiResponse downloadCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = downloadCallRecordingValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -776,7 +776,7 @@ public ApiResponse downloadCallRecordingWithHttpInfo(@javax.annotation.Non 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadCallRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -806,7 +806,7 @@ public okhttp3.Call downloadCallRecordingAsync(@javax.annotation.Nonnull String 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -849,12 +849,12 @@ public okhttp3.Call getCallRecordingCall(@javax.annotation.Nonnull String accoun localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getCallRecording(Async)"); @@ -897,7 +897,7 @@ private okhttp3.Call getCallRecordingValidateBeforeCall(@javax.annotation.Nonnul 500 Internal Server Error - */ - public CallRecordingMetadata getCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public CallRecordingMetadata getCallRecording(String accountId, String callId, String recordingId) throws ApiException { ApiResponse localVarResp = getCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -925,7 +925,7 @@ public CallRecordingMetadata getCallRecording(@javax.annotation.Nonnull String a 500 Internal Server Error - */ - public ApiResponse getCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse getCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = getCallRecordingValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -955,7 +955,7 @@ public ApiResponse getCallRecordingWithHttpInfo(@javax.an 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCallRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -985,7 +985,7 @@ public okhttp3.Call getCallRecordingAsync(@javax.annotation.Nonnull String accou 500 Internal Server Error - */ - public okhttp3.Call getRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1028,12 +1028,12 @@ public okhttp3.Call getRecordingTranscriptionCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getRecordingTranscription(Async)"); @@ -1076,7 +1076,7 @@ private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(@javax.annotati 500 Internal Server Error - */ - public RecordingTranscriptions getRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public RecordingTranscriptions getRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { ApiResponse localVarResp = getRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -1104,7 +1104,7 @@ public RecordingTranscriptions getRecordingTranscription(@javax.annotation.Nonnu 500 Internal Server Error - */ - public ApiResponse getRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { + public ApiResponse getRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { okhttp3.Call localVarCall = getRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1134,7 +1134,7 @@ public ApiResponse getRecordingTranscriptionWithHttpInf 500 Internal Server Error - */ - public okhttp3.Call getRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1166,7 +1166,7 @@ public okhttp3.Call getRecordingTranscriptionAsync(@javax.annotation.Nonnull Str 500 Internal Server Error - */ - public okhttp3.Call listAccountCallRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listAccountCallRecordingsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1223,12 +1223,12 @@ public okhttp3.Call listAccountCallRecordingsCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listAccountCallRecordings(Async)"); @@ -1263,7 +1263,7 @@ private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(@javax.annotati 500 Internal Server Error - */ - public List listAccountCallRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime) throws ApiException { + public List listAccountCallRecordings(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { ApiResponse> localVarResp = listAccountCallRecordingsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime); return localVarResp.getData(); } @@ -1293,7 +1293,7 @@ public List listAccountCallRecordings(@javax.annotation.N 500 Internal Server Error - */ - public ApiResponse> listAccountCallRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime) throws ApiException { + public ApiResponse> listAccountCallRecordingsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { okhttp3.Call localVarCall = listAccountCallRecordingsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1325,7 +1325,7 @@ public ApiResponse> listAccountCallRecordingsWithHtt 500 Internal Server Error - */ - public okhttp3.Call listAccountCallRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listAccountCallRecordingsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1354,7 +1354,7 @@ public okhttp3.Call listAccountCallRecordingsAsync(@javax.annotation.Nonnull Str 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listCallRecordingsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1396,12 +1396,12 @@ public okhttp3.Call listCallRecordingsCall(@javax.annotation.Nonnull String acco localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listCallRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listCallRecordings(Async)"); @@ -1438,7 +1438,7 @@ private okhttp3.Call listCallRecordingsValidateBeforeCall(@javax.annotation.Nonn 500 Internal Server Error - */ - public List listCallRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public List listCallRecordings(String accountId, String callId) throws ApiException { ApiResponse> localVarResp = listCallRecordingsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -1465,7 +1465,7 @@ public List listCallRecordings(@javax.annotation.Nonnull 500 Internal Server Error - */ - public ApiResponse> listCallRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public ApiResponse> listCallRecordingsWithHttpInfo(String accountId, String callId) throws ApiException { okhttp3.Call localVarCall = listCallRecordingsValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1494,7 +1494,7 @@ public ApiResponse> listCallRecordingsWithHttpInfo(@ 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listCallRecordingsValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1525,7 +1525,7 @@ public okhttp3.Call listCallRecordingsAsync(@javax.annotation.Nonnull String acc 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call transcribeCallRecordingCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1569,12 +1569,12 @@ public okhttp3.Call transcribeCallRecordingCall(@javax.annotation.Nonnull String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call transcribeCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + private okhttp3.Call transcribeCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling transcribeCallRecording(Async)"); @@ -1622,7 +1622,7 @@ private okhttp3.Call transcribeCallRecordingValidateBeforeCall(@javax.annotation 500 Internal Server Error - */ - public void transcribeCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording) throws ApiException { + public void transcribeCallRecording(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { transcribeCallRecordingWithHttpInfo(accountId, callId, recordingId, transcribeRecording); } @@ -1650,7 +1650,7 @@ public void transcribeCallRecording(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public ApiResponse transcribeCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording) throws ApiException { + public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1680,7 +1680,7 @@ public ApiResponse transcribeCallRecordingWithHttpInfo(@javax.annotation.N 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1709,7 +1709,7 @@ public okhttp3.Call transcribeCallRecordingAsync(@javax.annotation.Nonnull Strin 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1752,12 +1752,12 @@ public okhttp3.Call updateCallRecordingStateCall(@javax.annotation.Nonnull Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallRecordingStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallRecordingStateValidateBeforeCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCallRecordingState(Async)"); @@ -1799,7 +1799,7 @@ private okhttp3.Call updateCallRecordingStateValidateBeforeCall(@javax.annotatio 500 Internal Server Error - */ - public void updateCallRecordingState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { + public void updateCallRecordingState(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { updateCallRecordingStateWithHttpInfo(accountId, callId, updateCallRecording); } @@ -1826,7 +1826,7 @@ public void updateCallRecordingState(@javax.annotation.Nonnull String accountId, 500 Internal Server Error - */ - public ApiResponse updateCallRecordingStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { + public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { okhttp3.Call localVarCall = updateCallRecordingStateValidateBeforeCall(accountId, callId, updateCallRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1855,7 +1855,7 @@ public ApiResponse updateCallRecordingStateWithHttpInfo(@javax.annotation. 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateAsync(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallRecordingStateValidateBeforeCall(accountId, callId, updateCallRecording, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java index f03cdf75..4a9a1e86 100644 --- a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java @@ -94,7 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call getStatisticsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsCall(String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -135,12 +135,12 @@ public okhttp3.Call getStatisticsCall(@javax.annotation.Nonnull String accountId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getStatisticsValidateBeforeCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getStatistics(Async)"); @@ -171,7 +171,7 @@ private okhttp3.Call getStatisticsValidateBeforeCall(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public AccountStatistics getStatistics(@javax.annotation.Nonnull String accountId) throws ApiException { + public AccountStatistics getStatistics(String accountId) throws ApiException { ApiResponse localVarResp = getStatisticsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -197,7 +197,7 @@ public AccountStatistics getStatistics(@javax.annotation.Nonnull String accountI 500 Internal Server Error - */ - public ApiResponse getStatisticsWithHttpInfo(@javax.annotation.Nonnull String accountId) throws ApiException { + public ApiResponse getStatisticsWithHttpInfo(String accountId) throws ApiException { okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(accountId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -225,7 +225,7 @@ public ApiResponse getStatisticsWithHttpInfo(@javax.annotatio 500 Internal Server Error - */ - public okhttp3.Call getStatisticsAsync(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsAsync(String accountId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(accountId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java index 5241ddc4..f0bc198a 100644 --- a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 503 Service Unavailable - */ - public okhttp3.Call createWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionCall(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -142,12 +142,12 @@ public okhttp3.Call createWebhookSubscriptionCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createWebhookSubscription(Async)"); @@ -184,7 +184,7 @@ private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(@javax.annotati 503 Service Unavailable - */ - public WebhookSubscription createWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription createWebhookSubscription(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(accountId, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -211,7 +211,7 @@ public WebhookSubscription createWebhookSubscription(@javax.annotation.Nonnull S 503 Service Unavailable - */ - public ApiResponse createWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse createWebhookSubscriptionWithHttpInfo(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(accountId, webhookSubscriptionRequestSchema, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -240,7 +240,7 @@ public ApiResponse createWebhookSubscriptionWithHttpInfo(@j 503 Service Unavailable - */ - public okhttp3.Call createWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionAsync(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(accountId, webhookSubscriptionRequestSchema, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -269,7 +269,7 @@ public okhttp3.Call createWebhookSubscriptionAsync(@javax.annotation.Nonnull Str 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -311,12 +311,12 @@ public okhttp3.Call deleteVerificationRequestCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteVerificationRequest(Async)"); @@ -352,7 +352,7 @@ private okhttp3.Call deleteVerificationRequestValidateBeforeCall(@javax.annotati 503 Service Unavailable - */ - public void deleteVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { + public void deleteVerificationRequest(String accountId, String phoneNumber) throws ApiException { deleteVerificationRequestWithHttpInfo(accountId, phoneNumber); } @@ -378,7 +378,7 @@ public void deleteVerificationRequest(@javax.annotation.Nonnull String accountId 503 Service Unavailable - */ - public ApiResponse deleteVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { + public ApiResponse deleteVerificationRequestWithHttpInfo(String accountId, String phoneNumber) throws ApiException { okhttp3.Call localVarCall = deleteVerificationRequestValidateBeforeCall(accountId, phoneNumber, null); return localVarApiClient.execute(localVarCall); } @@ -406,7 +406,7 @@ public ApiResponse deleteVerificationRequestWithHttpInfo(@javax.annotation 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteVerificationRequestValidateBeforeCall(accountId, phoneNumber, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -434,7 +434,7 @@ public okhttp3.Call deleteVerificationRequestAsync(@javax.annotation.Nonnull Str 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionCall(String accountId, String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -476,12 +476,12 @@ public okhttp3.Call deleteWebhookSubscriptionCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(String accountId, String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteWebhookSubscription(Async)"); @@ -517,7 +517,7 @@ private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(@javax.annotati 503 Service Unavailable - */ - public void deleteWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { + public void deleteWebhookSubscription(String accountId, String id) throws ApiException { deleteWebhookSubscriptionWithHttpInfo(accountId, id); } @@ -543,7 +543,7 @@ public void deleteWebhookSubscription(@javax.annotation.Nonnull String accountId 503 Service Unavailable - */ - public ApiResponse deleteWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { + public ApiResponse deleteWebhookSubscriptionWithHttpInfo(String accountId, String id) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(accountId, id, null); return localVarApiClient.execute(localVarCall); } @@ -571,7 +571,7 @@ public ApiResponse deleteWebhookSubscriptionWithHttpInfo(@javax.annotation 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionAsync(String accountId, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(accountId, id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -599,7 +599,7 @@ public okhttp3.Call deleteWebhookSubscriptionAsync(@javax.annotation.Nonnull Str 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -641,12 +641,12 @@ public okhttp3.Call getTollFreeVerificationStatusCall(@javax.annotation.Nonnull localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getTollFreeVerificationStatus(Async)"); @@ -683,7 +683,7 @@ private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(@javax.anno 503 Service Unavailable - */ - public TfvStatus getTollFreeVerificationStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { + public TfvStatus getTollFreeVerificationStatus(String accountId, String phoneNumber) throws ApiException { ApiResponse localVarResp = getTollFreeVerificationStatusWithHttpInfo(accountId, phoneNumber); return localVarResp.getData(); } @@ -710,7 +710,7 @@ public TfvStatus getTollFreeVerificationStatus(@javax.annotation.Nonnull String 503 Service Unavailable - */ - public ApiResponse getTollFreeVerificationStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { + public ApiResponse getTollFreeVerificationStatusWithHttpInfo(String accountId, String phoneNumber) throws ApiException { okhttp3.Call localVarCall = getTollFreeVerificationStatusValidateBeforeCall(accountId, phoneNumber, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -739,7 +739,7 @@ public ApiResponse getTollFreeVerificationStatusWithHttpInfo(@javax.a 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTollFreeVerificationStatusValidateBeforeCall(accountId, phoneNumber, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -806,7 +806,7 @@ public okhttp3.Call listTollFreeUseCasesCall(final ApiCallback _callback) throws localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -915,7 +915,7 @@ public okhttp3.Call listTollFreeUseCasesAsync(final ApiCallback> _c 503 Service Unavailable - */ - public okhttp3.Call listWebhookSubscriptionsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsCall(String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -956,12 +956,12 @@ public okhttp3.Call listWebhookSubscriptionsCall(@javax.annotation.Nonnull Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listWebhookSubscriptions(Async)"); @@ -991,7 +991,7 @@ private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(@javax.annotatio 503 Service Unavailable - */ - public WebhookSubscriptionsListBody listWebhookSubscriptions(@javax.annotation.Nonnull String accountId) throws ApiException { + public WebhookSubscriptionsListBody listWebhookSubscriptions(String accountId) throws ApiException { ApiResponse localVarResp = listWebhookSubscriptionsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -1016,7 +1016,7 @@ public WebhookSubscriptionsListBody listWebhookSubscriptions(@javax.annotation.N 503 Service Unavailable - */ - public ApiResponse listWebhookSubscriptionsWithHttpInfo(@javax.annotation.Nonnull String accountId) throws ApiException { + public ApiResponse listWebhookSubscriptionsWithHttpInfo(String accountId) throws ApiException { okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(accountId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1043,7 +1043,7 @@ public ApiResponse listWebhookSubscriptionsWithHtt 503 Service Unavailable - */ - public okhttp3.Call listWebhookSubscriptionsAsync(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsAsync(String accountId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(accountId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1071,7 +1071,7 @@ public okhttp3.Call listWebhookSubscriptionsAsync(@javax.annotation.Nonnull Stri 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1113,12 +1113,12 @@ public okhttp3.Call requestTollFreeVerificationCall(@javax.annotation.Nonnull St localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling requestTollFreeVerification(Async)"); @@ -1153,7 +1153,7 @@ private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(@javax.annota 503 Service Unavailable - */ - public void requestTollFreeVerification(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { + public void requestTollFreeVerification(String accountId, VerificationRequest verificationRequest) throws ApiException { requestTollFreeVerificationWithHttpInfo(accountId, verificationRequest); } @@ -1178,7 +1178,7 @@ public void requestTollFreeVerification(@javax.annotation.Nonnull String account 503 Service Unavailable - */ - public ApiResponse requestTollFreeVerificationWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { + public ApiResponse requestTollFreeVerificationWithHttpInfo(String accountId, VerificationRequest verificationRequest) throws ApiException { okhttp3.Call localVarCall = requestTollFreeVerificationValidateBeforeCall(accountId, verificationRequest, null); return localVarApiClient.execute(localVarCall); } @@ -1205,7 +1205,7 @@ public ApiResponse requestTollFreeVerificationWithHttpInfo(@javax.annotati 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationAsync(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = requestTollFreeVerificationValidateBeforeCall(accountId, verificationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1233,7 +1233,7 @@ public okhttp3.Call requestTollFreeVerificationAsync(@javax.annotation.Nonnull S 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1276,12 +1276,12 @@ public okhttp3.Call updateTollFreeVerificationRequestCall(@javax.annotation.Nonn localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateTollFreeVerificationRequest(Async)"); @@ -1322,7 +1322,7 @@ private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(@javax. 503 Service Unavailable - */ - public void updateTollFreeVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public void updateTollFreeVerificationRequest(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { updateTollFreeVerificationRequestWithHttpInfo(accountId, phoneNumber, tfvSubmissionWrapper); } @@ -1348,7 +1348,7 @@ public void updateTollFreeVerificationRequest(@javax.annotation.Nonnull String a 503 Service Unavailable - */ - public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { okhttp3.Call localVarCall = updateTollFreeVerificationRequestValidateBeforeCall(accountId, phoneNumber, tfvSubmissionWrapper, null); return localVarApiClient.execute(localVarCall); } @@ -1376,7 +1376,7 @@ public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(@javax.an 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestAsync(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateTollFreeVerificationRequestValidateBeforeCall(accountId, phoneNumber, tfvSubmissionWrapper, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1405,7 +1405,7 @@ public okhttp3.Call updateTollFreeVerificationRequestAsync(@javax.annotation.Non 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1448,12 +1448,12 @@ public okhttp3.Call updateWebhookSubscriptionCall(@javax.annotation.Nonnull Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateWebhookSubscription(Async)"); @@ -1496,7 +1496,7 @@ private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(@javax.annotati 503 Service Unavailable - */ - public WebhookSubscription updateWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription updateWebhookSubscription(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = updateWebhookSubscriptionWithHttpInfo(accountId, id, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -1524,7 +1524,7 @@ public WebhookSubscription updateWebhookSubscription(@javax.annotation.Nonnull S 503 Service Unavailable - */ - public ApiResponse updateWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse updateWebhookSubscriptionWithHttpInfo(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(accountId, id, webhookSubscriptionRequestSchema, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1554,7 +1554,7 @@ public ApiResponse updateWebhookSubscriptionWithHttpInfo(@j 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionAsync(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(accountId, id, webhookSubscriptionRequestSchema, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java index acb29d91..1e26c197 100644 --- a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -140,12 +140,12 @@ public okhttp3.Call deleteRealTimeTranscriptionCall(@javax.annotation.Nonnull St localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRealTimeTranscription(Async)"); @@ -187,7 +187,7 @@ private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(@javax.annota 500 Internal Server Error - */ - public void deleteRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { + public void deleteRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { deleteRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); } @@ -214,7 +214,7 @@ public void deleteRealTimeTranscription(@javax.annotation.Nonnull String account 500 Internal Server Error - */ - public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { + public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { okhttp3.Call localVarCall = deleteRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, null); return localVarApiClient.execute(localVarCall); } @@ -243,7 +243,7 @@ public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(@javax.annotati 500 Internal Server Error - */ - public okhttp3.Call deleteRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionAsync(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -272,7 +272,7 @@ public okhttp3.Call deleteRealTimeTranscriptionAsync(@javax.annotation.Nonnull S 500 Internal Server Error - */ - public okhttp3.Call getRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -315,12 +315,12 @@ public okhttp3.Call getRealTimeTranscriptionCall(@javax.annotation.Nonnull Strin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getRealTimeTranscription(Async)"); @@ -363,7 +363,7 @@ private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(@javax.annotatio 500 Internal Server Error - */ - public CallTranscriptionResponse getRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { + public CallTranscriptionResponse getRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { ApiResponse localVarResp = getRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); return localVarResp.getData(); } @@ -391,7 +391,7 @@ public CallTranscriptionResponse getRealTimeTranscription(@javax.annotation.Nonn 500 Internal Server Error - */ - public ApiResponse getRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { + public ApiResponse getRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { okhttp3.Call localVarCall = getRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -421,7 +421,7 @@ public ApiResponse getRealTimeTranscriptionWithHttpIn 500 Internal Server Error - */ - public okhttp3.Call getRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionAsync(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -450,7 +450,7 @@ public okhttp3.Call getRealTimeTranscriptionAsync(@javax.annotation.Nonnull Stri 500 Internal Server Error - */ - public okhttp3.Call listRealTimeTranscriptionsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -492,12 +492,12 @@ public okhttp3.Call listRealTimeTranscriptionsCall(@javax.annotation.Nonnull Str localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listRealTimeTranscriptions(Async)"); @@ -534,7 +534,7 @@ private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(@javax.annotat 500 Internal Server Error - */ - public List listRealTimeTranscriptions(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public List listRealTimeTranscriptions(String accountId, String callId) throws ApiException { ApiResponse> localVarResp = listRealTimeTranscriptionsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -561,7 +561,7 @@ public List listRealTimeTranscriptions(@javax.annotat 500 Internal Server Error - */ - public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { + public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(String accountId, String callId) throws ApiException { okhttp3.Call localVarCall = listRealTimeTranscriptionsValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -590,7 +590,7 @@ public ApiResponse> listRealTimeTranscriptionsWi 500 Internal Server Error - */ - public okhttp3.Call listRealTimeTranscriptionsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsAsync(String accountId, String callId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listRealTimeTranscriptionsValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java index e13ff52b..61bbc92e 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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 79dcf08e..243865e9 100644 --- a/src/main/java/com/bandwidth/sdk/auth/Authentication.java +++ b/src/main/java/com/bandwidth/sdk/auth/Authentication.java @@ -20,7 +20,6 @@ import java.util.Map; import java.util.List; -@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 35683058..565d3c51 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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 new file mode 100644 index 00000000..87e76816 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuth.java @@ -0,0 +1,42 @@ +/* + * 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.auth; + +import com.bandwidth.sdk.Pair; +import com.bandwidth.sdk.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java new file mode 100644 index 00000000..cd0037b0 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java @@ -0,0 +1,25 @@ +/* + * 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.auth; + +/** + * OAuth flows that are supported by this client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +public enum OAuthFlow { + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 +} diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java new file mode 100644 index 00000000..d208453b --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java @@ -0,0 +1,82 @@ +/* + * 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.auth; + +import okhttp3.OkHttpClient; +import okhttp3.MediaType; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class OAuthOkHttpClient implements HttpClient { + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + @Override + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/json"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(request.getBody(), mediaType) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + response.headers().toMultimap(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + @Override + public void shutdown() { + // Nothing to do here + } +} diff --git a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java new file mode 100644 index 00000000..41b38438 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java @@ -0,0 +1,223 @@ +/* + * 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.auth; + +import com.bandwidth.sdk.ApiException; +import com.bandwidth.sdk.Pair; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.util.Map; +import java.util.List; + +public class RetryingOAuth extends OAuth implements Interceptor { + private OAuthClient oAuthClient; + + private TokenRequestBuilder tokenRequestBuilder; + + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { + this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = tokenRequestBuilder; + } + + /** + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { + this(new OkHttpClient(), tokenRequestBuilder); + } + + /** + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ + public RetryingOAuth( + String tokenUrl, + String clientId, + OAuthFlow flow, + String clientSecret, + Map parameters + ) { + this(OAuthClientRequest.tokenLocation(tokenUrl) + .setClientId(clientId) + .setClientSecret(clientSecret)); + setFlow(flow); + if (parameters != null) { + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) throws IOException { + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already has an authorization (e.g. Basic auth), proceed with the request as is + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // Get the token if it has not yet been acquired + if (getAccessToken() == null) { + updateAccessToken(null); + } + + OAuthClientRequest oAuthRequest; + if (getAccessToken() != null) { + // Build the request + Request.Builder requestBuilder = request.newBuilder(); + + String requestAccessToken = getAccessToken(); + try { + oAuthRequest = + new OAuthBearerClientRequest(request.url().toString()). + setAccessToken(requestAccessToken). + buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + Map headers = oAuthRequest.getHeaders(); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + requestBuilder.url(oAuthRequest.getLocationUri()); + + // Execute the request + Response response = chain.proceed(requestBuilder.build()); + + // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + if ( + response != null && + ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED || + response.code() == HttpURLConnection.HTTP_FORBIDDEN ) && + updateTokenAndRetryOnAuthorizationFailure + ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept(chain, false); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } + else { + return chain.proceed(chain.request()); + } + } + + /** + * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthJSONAccessTokenResponse accessTokenResponse = + oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + } + } catch (OAuthSystemException | OAuthProblemException e) { + throw new IOException(e); + } + } + return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); + } + + /** + * Gets the token request builder + * + * @return A token request builder + */ + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + // Applying authorization to parameters is performed in the retryingIntercept method + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + // No implementation necessary + } +} diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 7b2c12e8..3c487529 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java index f461dd2a..6068f9f0 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("currentCallQueueSize", "maxCallQueueSize")); + openapiFields = new HashSet(); + openapiFields.add("currentCallQueueSize"); + openapiFields.add("maxCallQueueSize"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -273,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c70f7d5f..e9c708b5 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class AdditionalDenialReason { public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) @@ -221,10 +219,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); + openapiFields = new HashSet(); + openapiFields.add("statusCode"); + openapiFields.add("reason"); + openapiFields.add("resubmitAllowed"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("statusCode"); + openapiRequiredFields.add("reason"); + openapiRequiredFields.add("resubmitAllowed"); } /** @@ -236,19 +240,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("reason").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } } @@ -309,7 +313,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 02b4ccb3..198c29b9 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Address { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -337,10 +335,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "addr1", "addr2", "city", "state", "zip", "url")); + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("addr1"); + openapiFields.add("addr2"); + openapiFields.add("city"); + openapiFields.add("state"); + openapiFields.add("zip"); + openapiFields.add("url"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "addr1", "city", "state", "zip", "url")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("addr1"); + openapiRequiredFields.add("city"); + openapiRequiredFields.add("state"); + openapiRequiredFields.add("zip"); + openapiRequiredFields.add("url"); } /** @@ -352,37 +363,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -443,7 +454,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 15b47454..1805765d 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -523,10 +521,24 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("machineDetectionResult"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -538,37 +550,37 @@ 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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -633,7 +645,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4dd2df37..ce159cd5 100644 --- a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class AsyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -179,10 +177,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("phoneNumbers")); + openapiFields = new HashSet(); + openapiFields.add("phoneNumbers"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("phoneNumbers")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("phoneNumbers"); } /** @@ -194,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -209,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(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("Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } } @@ -270,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 12721ccd..805cd7d3 100644 --- a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class BlockedWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -301,10 +299,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber", "blocked", "blockedReason")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("phoneNumber"); + openapiFields.add("status"); + openapiFields.add("internalTicketNumber"); + openapiFields.add("blocked"); + openapiFields.add("blockedReason"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -316,25 +320,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(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("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(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("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(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("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(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("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(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("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -395,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c8e2bad1..1550d1f6 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -574,10 +572,26 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "cause", "errorMessage", "errorId")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("cause"); + openapiFields.add("errorMessage"); + openapiFields.add("errorId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -589,46 +603,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -689,7 +703,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 cfb25513..204d6cf8 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -496,10 +494,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -511,37 +522,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -602,7 +613,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 eb0a353d..f1b6f178 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java @@ -14,11 +14,9 @@ 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 391c263c..fd5bb5d0 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java @@ -14,11 +14,9 @@ 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 cbfa167d..ddf8bbde 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java @@ -14,11 +14,9 @@ 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 ba0a140f..6247baa9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -14,7 +14,6 @@ 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; @@ -49,14 +48,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -654,10 +652,29 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "recordingId", "to", "from", "transferCallerId", "transferTo", "duration", "direction", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "transcription", "recordingName")); + openapiFields = new HashSet(); + openapiFields.add("applicationId"); + openapiFields.add("accountId"); + openapiFields.add("callId"); + openapiFields.add("parentCallId"); + openapiFields.add("recordingId"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); + openapiFields.add("duration"); + openapiFields.add("direction"); + openapiFields.add("channels"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("fileFormat"); + openapiFields.add("status"); + openapiFields.add("mediaUrl"); + openapiFields.add("transcription"); + openapiFields.add("recordingName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -669,39 +686,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -712,17 +729,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(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("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(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("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(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("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -783,7 +800,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1b3e97f9..0d6d0396 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -635,10 +633,28 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "to", "from", "direction", "state", "stirShaken", "identity", "enqueuedTime", "startTime", "answerTime", "endTime", "disconnectCause", "errorMessage", "errorId", "lastUpdate")); + openapiFields = new HashSet(); + openapiFields.add("applicationId"); + openapiFields.add("accountId"); + openapiFields.add("callId"); + openapiFields.add("parentCallId"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("direction"); + openapiFields.add("state"); + openapiFields.add("stirShaken"); + openapiFields.add("identity"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("endTime"); + openapiFields.add("disconnectCause"); + openapiFields.add("errorMessage"); + openapiFields.add("errorId"); + openapiFields.add("lastUpdate"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -650,46 +666,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -750,7 +766,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6fcea9ee..64fd1045 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java @@ -14,11 +14,9 @@ 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 8f01d9d6..c166e71b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CallTranscription { public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) @@ -251,10 +249,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("detectedLanguage", "track", "transcript", "confidence")); + openapiFields = new HashSet(); + openapiFields.add("detectedLanguage"); + openapiFields.add("track"); + openapiFields.add("transcript"); + openapiFields.add("confidence"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -266,7 +268,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(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("The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -279,7 +281,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(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("Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); } } @@ -340,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4de2aca7..6295e064 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java @@ -14,11 +14,9 @@ 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 b6d70045..ca3e2a41 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CallTranscriptionMetadata { public static final String SERIALIZED_NAME_TRANSCRIPTION_ID = "transcriptionId"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTION_ID) @@ -221,10 +219,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("transcriptionId", "transcriptionName", "transcriptionUrl")); + openapiFields = new HashSet(); + openapiFields.add("transcriptionId"); + openapiFields.add("transcriptionName"); + openapiFields.add("transcriptionUrl"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -236,18 +237,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(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("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(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("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(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("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(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("Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); } } @@ -308,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6e69a1a9..d1c4603e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CallTranscriptionResponse { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -258,10 +256,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "callId", "transcriptionId", "tracks")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("callId"); + openapiFields.add("transcriptionId"); + openapiFields.add("tracks"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -273,25 +275,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(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("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(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("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(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("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(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("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(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("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) @@ -359,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6f18f069..0d0089a7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java @@ -14,11 +14,9 @@ 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 b5caca4d..df66f8d3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -14,7 +14,6 @@ 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; @@ -40,7 +39,6 @@ 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; @@ -64,7 +62,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Callback extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Callback.class.getName()); @@ -144,8 +142,16 @@ public Callback read(JsonReader in) throws IOException { deserialized = adapterInboundCallback.fromJsonTree(jsonObject); newCallback.setActualInstance(deserialized); return newCallback; + case "inboundCallback": + deserialized = adapterInboundCallback.fromJsonTree(jsonObject); + newCallback.setActualInstance(deserialized); + return newCallback; + case "statusCallback": + deserialized = adapterStatusCallback.fromJsonTree(jsonObject); + newCallback.setActualInstance(deserialized); + return newCallback; default: - 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-sent request-location-response suggestion-response", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for Callback. Possible values: message-delivered message-failed message-read message-received message-sent request-location-response suggestion-response inboundCallback statusCallback", jsonObject.get("type").getAsString())); } } @@ -162,7 +168,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(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'StatusCallback'", e); } // deserialize InboundCallback @@ -174,7 +180,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(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'InboundCallback'", e); } @@ -184,7 +190,7 @@ public Callback read(JsonReader in) throws IOException { return ret; } - 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())); + throw new IOException(String.format("Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -283,7 +289,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StatusCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with InboundCallback @@ -291,11 +297,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti InboundCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - 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())); + throw new IOException(String.format("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 5b608007..3e169433 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java @@ -14,11 +14,9 @@ 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 d86c8dfc..760212bf 100644 --- a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java @@ -14,11 +14,9 @@ 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 3899a638..06e06d9b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -301,10 +299,21 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("to", "from", "applicationId", "scope", "message", "digits")); + openapiFields = new HashSet(); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("scope"); + openapiFields.add("message"); + openapiFields.add("digits"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "message", "digits")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("message"); + openapiRequiredFields.add("digits"); } /** @@ -316,31 +325,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -401,7 +410,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4198e986..e44b4fad 100644 --- a/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java @@ -14,11 +14,9 @@ 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 190ebb1c..5522b692 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -14,7 +14,6 @@ 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; @@ -50,14 +49,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -377,10 +375,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "name", "createdTime", "completedTime", "conferenceEventUrl", "conferenceEventMethod", "tag", "activeMembers")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("createdTime"); + openapiFields.add("completedTime"); + openapiFields.add("conferenceEventUrl"); + openapiFields.add("conferenceEventMethod"); + openapiFields.add("tag"); + openapiFields.add("activeMembers"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -392,32 +398,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(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("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(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("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(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("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(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("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(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("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(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("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) @@ -485,7 +491,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 64f72b42..007d0144 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -286,10 +284,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -301,21 +304,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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -376,7 +379,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 3635dbca..30bf3e04 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -286,10 +284,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -301,21 +304,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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -376,7 +379,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 a2cdc12c..e74930a5 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -322,10 +320,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("callId", "conferenceId", "memberUrl", "mute", "hold", "callIdsToCoach")); + openapiFields = new HashSet(); + openapiFields.add("callId"); + openapiFields.add("conferenceId"); + openapiFields.add("memberUrl"); + openapiFields.add("mute"); + openapiFields.add("hold"); + openapiFields.add("callIdsToCoach"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -337,22 +341,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(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("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(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("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(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("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(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("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(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("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -413,7 +417,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6478cf56..82f93c9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -364,10 +362,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("callId"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -379,30 +385,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(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("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(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("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(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("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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -463,7 +469,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 e60d7ad3..780c9390 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -364,10 +362,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("callId"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -379,30 +385,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(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("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(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("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(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("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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -463,7 +469,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6397e9d2..84c96c4c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -522,10 +520,24 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "accountId", "recordingId", "channels", "startTime", "endTime", "duration", "fileFormat", "mediaUrl", "tag", "status")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("accountId"); + openapiFields.add("recordingId"); + openapiFields.add("channels"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("duration"); + openapiFields.add("fileFormat"); + openapiFields.add("mediaUrl"); + openapiFields.add("tag"); + openapiFields.add("status"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -537,40 +549,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -631,7 +643,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4242a033..64495284 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -470,10 +468,22 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "conferenceId", "name", "recordingId", "duration", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "recordingName")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("recordingId"); + openapiFields.add("duration"); + openapiFields.add("channels"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("fileFormat"); + openapiFields.add("status"); + openapiFields.add("mediaUrl"); + openapiFields.add("recordingName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -485,37 +495,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -576,7 +586,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 af69f833..77daf53b 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -286,10 +284,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("conferenceId"); + openapiFields.add("name"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -301,21 +304,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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -376,7 +379,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 2e183ec2..8f457611 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java @@ -14,11 +14,9 @@ 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 ca36f85d..bf293874 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Contact { public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) @@ -247,10 +245,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); + openapiFields = new HashSet(); + openapiFields.add("firstName"); + openapiFields.add("lastName"); + openapiFields.add("email"); + openapiFields.add("phoneNumber"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("firstName"); + openapiRequiredFields.add("lastName"); + openapiRequiredFields.add("email"); + openapiRequiredFields.add("phoneNumber"); } /** @@ -262,28 +268,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("firstName").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -344,7 +350,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8d64c970..1b6d4acc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -242,10 +240,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -257,7 +258,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(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("The required field(s) %s in CreateAsyncBulkLookupResponse is not found in the empty JSON string", CreateAsyncBulkLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -266,7 +267,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(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("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) @@ -284,7 +285,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(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("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) @@ -352,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 93688021..463ca33c 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -197,10 +195,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("requestId", "status")); + openapiFields = new HashSet(); + openapiFields.add("requestId"); + openapiFields.add("status"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -212,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(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("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(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("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()) { @@ -282,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 02905aa3..4735e05a 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -710,10 +708,35 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("to", "from", "privacy", "displayName", "uui", "applicationId", "answerUrl", "answerMethod", "username", "password", "answerFallbackUrl", "answerFallbackMethod", "fallbackUsername", "fallbackPassword", "disconnectUrl", "disconnectMethod", "callTimeout", "callbackTimeout", "machineDetection", "priority", "tag")); + openapiFields = new HashSet(); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("privacy"); + openapiFields.add("displayName"); + openapiFields.add("uui"); + openapiFields.add("applicationId"); + openapiFields.add("answerUrl"); + openapiFields.add("answerMethod"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("answerFallbackUrl"); + openapiFields.add("answerFallbackMethod"); + openapiFields.add("fallbackUsername"); + openapiFields.add("fallbackPassword"); + openapiFields.add("disconnectUrl"); + openapiFields.add("disconnectMethod"); + openapiFields.add("callTimeout"); + openapiFields.add("callbackTimeout"); + openapiFields.add("machineDetection"); + openapiFields.add("priority"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "answerUrl")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("answerUrl"); } /** @@ -725,60 +748,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -789,7 +812,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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -850,7 +873,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 21a9e61e..c8263e3b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -704,10 +702,40 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "to", "from", "enqueuedTime", "callUrl", "callTimeout", "callbackTimeout", "tag", "answerMethod", "answerUrl", "answerFallbackMethod", "answerFallbackUrl", "disconnectMethod", "disconnectUrl", "username", "password", "fallbackUsername", "fallbackPassword", "priority")); + openapiFields = new HashSet(); + openapiFields.add("applicationId"); + openapiFields.add("accountId"); + openapiFields.add("callId"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("enqueuedTime"); + openapiFields.add("callUrl"); + openapiFields.add("callTimeout"); + openapiFields.add("callbackTimeout"); + openapiFields.add("tag"); + openapiFields.add("answerMethod"); + openapiFields.add("answerUrl"); + openapiFields.add("answerFallbackMethod"); + openapiFields.add("answerFallbackUrl"); + openapiFields.add("disconnectMethod"); + openapiFields.add("disconnectUrl"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("fallbackUsername"); + openapiFields.add("fallbackPassword"); + openapiFields.add("priority"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "to", "from", "callUrl", "answerMethod", "answerUrl", "disconnectMethod")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("accountId"); + openapiRequiredFields.add("callId"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("callUrl"); + openapiRequiredFields.add("answerMethod"); + openapiRequiredFields.add("answerUrl"); + openapiRequiredFields.add("disconnectMethod"); } /** @@ -719,66 +747,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the required field `answerMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the required field `disconnectMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -839,7 +867,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 527c5ab6..b0dd177f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -232,10 +230,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "description", "fieldErrors")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("fieldErrors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("description"); } /** @@ -247,29 +250,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } 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(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("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) @@ -337,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6af56d35..b11b43ba 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateMultiChannelMessageResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -242,10 +240,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -257,7 +258,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(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("The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -266,7 +267,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(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("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) @@ -284,7 +285,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(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("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) @@ -352,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4a1a907f..ef9c6862 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateSyncLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -242,10 +240,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -257,7 +258,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(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("The required field(s) %s in CreateSyncLookupResponse is not found in the empty JSON string", CreateSyncLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -266,7 +267,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(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("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) @@ -284,7 +285,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(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("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) @@ -352,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 f74138fd..84112429 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class CreateSyncLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -234,10 +232,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("requestId", "status", "results")); + openapiFields = new HashSet(); + openapiFields.add("requestId"); + openapiFields.add("status"); + openapiFields.add("results"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -249,12 +250,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(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("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(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("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()) { @@ -265,7 +266,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(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("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) @@ -333,7 +334,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8f9d5571..3853fd79 100644 --- a/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java @@ -14,11 +14,9 @@ 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 fe8e1c31..c4756ba0 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -600,10 +598,27 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "callUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "cause", "errorMessage", "errorId", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("callId"); + openapiFields.add("direction"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("endTime"); + openapiFields.add("cause"); + openapiFields.add("errorMessage"); + openapiFields.add("errorId"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -615,46 +630,46 @@ 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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -715,7 +730,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 b2fd3820..61159811 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) @@ -325,10 +323,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("reason", "privacy", "screen", "counter", "limit", "unknown", "origTo")); + openapiFields = new HashSet(); + openapiFields.add("reason"); + openapiFields.add("privacy"); + openapiFields.add("screen"); + openapiFields.add("counter"); + openapiFields.add("limit"); + openapiFields.add("unknown"); + openapiFields.add("origTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -340,30 +345,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); } } @@ -424,7 +429,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 ecdde816..599cf1bd 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -600,10 +598,27 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "digit", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "transferCallerId", "transferTo", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("callId"); + openapiFields.add("direction"); + openapiFields.add("digit"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("parentCallId"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -615,49 +630,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("digit") != null && !jsonObj.get("digit").isJsonNull()) && !jsonObj.get("digit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -718,7 +733,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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/Error.java b/src/main/java/com/bandwidth/sdk/model/Error.java index 3df93d39..a6c081dc 100644 --- a/src/main/java/com/bandwidth/sdk/model/Error.java +++ b/src/main/java/com/bandwidth/sdk/model/Error.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Error { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -232,10 +230,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("code", "description", "telephoneNumbers")); + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("telephoneNumbers"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -247,19 +248,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } 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(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("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) @@ -327,7 +328,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8fbecde9..d15af07e 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ErrorObject { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -222,10 +220,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "description", "source")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("source"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "description", "source")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("source"); } /** @@ -237,22 +241,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `source` ErrorSource.validateJsonElement(jsonObj.get("source")); @@ -315,7 +319,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 18e6b6b5..dc26c1d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) @@ -247,10 +245,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("parameter", "field", "header", "reference")); + openapiFields = new HashSet(); + openapiFields.add("parameter"); + openapiFields.add("field"); + openapiFields.add("header"); + openapiFields.add("reference"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -262,21 +264,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(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("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(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("Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); } if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); + throw new IllegalArgumentException(String.format("Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); } if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); } } @@ -337,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d0655b93..d80aa85c 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -14,7 +14,6 @@ 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,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class FailureWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -310,10 +308,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("phoneNumber"); + openapiFields.add("errorCode"); + openapiFields.add("errorMessage"); + openapiFields.add("errors"); + openapiFields.add("internalTicketNumber"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -325,28 +329,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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -407,7 +411,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1f2eb746..b3aa98a4 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("fieldName", "description")); + openapiFields = new HashSet(); + openapiFields.add("fieldName"); + openapiFields.add("description"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("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(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("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(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("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -279,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 7c3e6137..1f27ba16 100644 --- a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java @@ -14,11 +14,9 @@ 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 2b7b5008..66a4eb37 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -626,10 +624,28 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "digits", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "terminatingDigit", "transferCallerId", "transferTo", "tag")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("digits"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("parentCallId"); + openapiFields.add("terminatingDigit"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -641,52 +657,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -747,7 +763,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4f1d2691..253c8d0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class GetAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -242,10 +240,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -257,7 +258,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(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("The required field(s) %s in GetAsyncBulkLookupResponse is not found in the empty JSON string", GetAsyncBulkLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -266,7 +267,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(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("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) @@ -284,7 +285,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(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("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) @@ -352,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 f07b7466..ecd92358 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class GetAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -234,10 +232,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("requestId", "status", "results")); + openapiFields = new HashSet(); + openapiFields.add("requestId"); + openapiFields.add("status"); + openapiFields.add("results"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -249,12 +250,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(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("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(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("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()) { @@ -265,7 +266,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(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("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) @@ -333,7 +334,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c1d98b0b..f9a535bf 100644 --- a/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java @@ -14,11 +14,9 @@ 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 bf27d076..e08a089c 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class InboundCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -302,10 +300,21 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message", "carrierName")); + openapiFields = new HashSet(); + openapiFields.add("time"); + openapiFields.add("type"); + openapiFields.add("to"); + openapiFields.add("description"); + openapiFields.add("message"); + openapiFields.add("carrierName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("time"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("message"); } /** @@ -317,29 +326,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -400,7 +409,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d9960f20..09b62d76 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -14,7 +14,6 @@ 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; @@ -55,14 +54,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class InboundCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -587,10 +585,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel", "content", "suggestionResponse", "locationResponse")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("owner"); + openapiFields.add("applicationId"); + openapiFields.add("time"); + openapiFields.add("segmentCount"); + openapiFields.add("direction"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("text"); + openapiFields.add("tag"); + openapiFields.add("media"); + openapiFields.add("priority"); + openapiFields.add("channel"); + openapiFields.add("content"); + openapiFields.add("suggestionResponse"); + openapiFields.add("locationResponse"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("owner"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("time"); + openapiRequiredFields.add("segmentCount"); + openapiRequiredFields.add("direction"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); } /** @@ -602,25 +624,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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")); @@ -628,20 +650,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(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("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(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("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(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("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(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("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(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("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()) { @@ -722,7 +744,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 cb3a5b64..fa8eeb3c 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java @@ -14,11 +14,9 @@ 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 871ac648..9d873d99 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -486,10 +484,23 @@ private String toIndentedString(Object o) { 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", "diversion", "stirShaken", "uui")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("startTime"); + openapiFields.add("diversion"); + openapiFields.add("stirShaken"); + openapiFields.add("uui"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -501,34 +512,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } // validate the optional field `diversion` if (jsonObj.get("diversion") != null && !jsonObj.get("diversion").isJsonNull()) { @@ -539,7 +550,7 @@ 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(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("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } } @@ -600,7 +611,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 613194fd..1593862f 100644 --- a/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java @@ -14,11 +14,9 @@ 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 5a3b331d..776f065d 100644 --- a/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java @@ -14,11 +14,9 @@ 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 24e990f7..fa027d22 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Link { public static final String SERIALIZED_NAME_REL = "rel"; @SerializedName(SERIALIZED_NAME_REL) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("rel", "href")); + openapiFields = new HashSet(); + openapiFields.add("rel"); + openapiFields.add("href"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("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(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("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(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("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } @@ -279,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 b61dae80..c4cc03db 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LinkSchema { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) @@ -221,10 +219,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("href", "rel", "method")); + openapiFields = new HashSet(); + openapiFields.add("href"); + openapiFields.add("rel"); + openapiFields.add("method"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -236,18 +237,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(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("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(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("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format("Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) && !jsonObj.get("method").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); + throw new IllegalArgumentException(String.format("Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); } } @@ -308,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4c1afbb1..630fec92 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LinksObject { public static final String SERIALIZED_NAME_FIRST = "first"; @SerializedName(SERIALIZED_NAME_FIRST) @@ -247,10 +245,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("first", "next", "previous", "last")); + openapiFields = new HashSet(); + openapiFields.add("first"); + openapiFields.add("next"); + openapiFields.add("previous"); + openapiFields.add("last"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -262,21 +264,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(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("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(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("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(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("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(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("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(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("Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); } } @@ -337,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 65fbd38a..f175c9cd 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java @@ -14,11 +14,9 @@ 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 c96dc940..d2356f36 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -757,10 +755,33 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("messageId", "accountId", "sourceTn", "destinationTn", "messageStatus", "messageDirection", "messageType", "segmentCount", "errorCode", "receiveTime", "carrierName", "messageSize", "messageLength", "attachmentCount", "recipientCount", "campaignClass", "campaignId", "bwLatency", "carrierLatency", "callingNumberCountryA3", "calledNumberCountryA3", "product", "location")); + openapiFields = new HashSet(); + openapiFields.add("messageId"); + openapiFields.add("accountId"); + openapiFields.add("sourceTn"); + openapiFields.add("destinationTn"); + openapiFields.add("messageStatus"); + openapiFields.add("messageDirection"); + openapiFields.add("messageType"); + openapiFields.add("segmentCount"); + openapiFields.add("errorCode"); + openapiFields.add("receiveTime"); + openapiFields.add("carrierName"); + openapiFields.add("messageSize"); + openapiFields.add("messageLength"); + openapiFields.add("attachmentCount"); + openapiFields.add("recipientCount"); + openapiFields.add("campaignClass"); + openapiFields.add("campaignId"); + openapiFields.add("bwLatency"); + openapiFields.add("carrierLatency"); + openapiFields.add("callingNumberCountryA3"); + openapiFields.add("calledNumberCountryA3"); + openapiFields.add("product"); + openapiFields.add("location"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -772,21 +793,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(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("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(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("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(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("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(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("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(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("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()) { @@ -801,25 +822,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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } } @@ -880,7 +901,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 316e6eb9..d39f5ac7 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LookupErrorResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -241,10 +239,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -256,7 +257,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(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("The required field(s) %s in LookupErrorResponse is not found in the empty JSON string", LookupErrorResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -265,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(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("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 +280,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(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("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 +348,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 ee0b3609..c56a0f32 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LookupErrorSchema { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -248,10 +246,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("code", "description", "type", "meta")); + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("description"); + openapiFields.add("type"); + openapiFields.add("meta"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -263,18 +265,18 @@ 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(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("The required field(s) %s in LookupErrorSchema is not found in the empty JSON string", LookupErrorSchema.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("code") != null && !jsonObj.get("code").isJsonNull()) && !jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } // validate the optional field `meta` if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { @@ -339,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 5c0c79e2..2c50322e 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LookupErrorSchemaMeta { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -231,10 +229,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("phoneNumbers", "message", "code")); + openapiFields = new HashSet(); + openapiFields.add("phoneNumbers"); + openapiFields.add("message"); + openapiFields.add("code"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -246,16 +247,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(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("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(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("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(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("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -316,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 eaec460e..ec3cf0c0 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class LookupResult { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -433,10 +431,21 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("phoneNumber", "lineType", "messagingProvider", "voiceProvider", "countryCodeA3", "deactivationReporter", "deactivationDate", "deactivationEvent", "latestMessageDeliveryStatus", "initialMessageDeliveryStatusDate", "latestMessageDeliveryStatusDate")); + openapiFields = new HashSet(); + openapiFields.add("phoneNumber"); + openapiFields.add("lineType"); + openapiFields.add("messagingProvider"); + openapiFields.add("voiceProvider"); + openapiFields.add("countryCodeA3"); + openapiFields.add("deactivationReporter"); + openapiFields.add("deactivationDate"); + openapiFields.add("deactivationEvent"); + openapiFields.add("latestMessageDeliveryStatus"); + openapiFields.add("initialMessageDeliveryStatusDate"); + openapiFields.add("latestMessageDeliveryStatusDate"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -448,31 +457,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -541,7 +550,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 39d43a74..0f3f0a98 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -523,10 +521,24 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("machineDetectionResult"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -538,37 +550,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -633,7 +645,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 0b46bbae..4b168f9f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -548,10 +546,25 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("mode", "detectionTimeout", "silenceTimeout", "speechThreshold", "speechEndThreshold", "machineSpeechEndThreshold", "delayResult", "callbackUrl", "callbackMethod", "username", "password", "fallbackUrl", "fallbackMethod", "fallbackUsername", "fallbackPassword")); + openapiFields = new HashSet(); + openapiFields.add("mode"); + openapiFields.add("detectionTimeout"); + openapiFields.add("silenceTimeout"); + openapiFields.add("speechThreshold"); + openapiFields.add("speechEndThreshold"); + openapiFields.add("machineSpeechEndThreshold"); + openapiFields.add("delayResult"); + openapiFields.add("callbackUrl"); + openapiFields.add("callbackMethod"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("fallbackUrl"); + openapiFields.add("fallbackMethod"); + openapiFields.add("fallbackUsername"); + openapiFields.add("fallbackPassword"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -563,7 +576,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(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("The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -572,30 +585,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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -656,7 +669,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 422a60db..633c38e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -14,11 +14,9 @@ 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 f0407ec7..a424bdfb 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("value", "duration")); + openapiFields = new HashSet(); + openapiFields.add("value"); + openapiFields.add("duration"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("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(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("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(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("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } } @@ -279,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 87f0e55e..551b9a39 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -221,10 +219,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("content", "contentLength", "mediaName")); + openapiFields = new HashSet(); + openapiFields.add("content"); + openapiFields.add("contentLength"); + openapiFields.add("mediaName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -236,15 +237,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(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("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(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("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(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("Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); } } @@ -305,7 +306,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 39b23fb3..33749830 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -502,10 +500,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "media", "text", "tag", "priority", "expiration")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("owner"); + openapiFields.add("applicationId"); + openapiFields.add("time"); + openapiFields.add("segmentCount"); + openapiFields.add("direction"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("media"); + openapiFields.add("text"); + openapiFields.add("tag"); + openapiFields.add("priority"); + openapiFields.add("expiration"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -517,18 +528,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(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("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(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("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(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("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(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("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()) { @@ -536,20 +547,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(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("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(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("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(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("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(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("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(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("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()) { @@ -614,7 +625,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 73efd53a..52886e8a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java @@ -14,11 +14,9 @@ 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 420bda03..592eabf5 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -14,7 +14,6 @@ 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; @@ -50,14 +49,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -374,10 +372,21 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("applicationId", "to", "from", "text", "media", "tag", "priority", "expiration")); + openapiFields = new HashSet(); + openapiFields.add("applicationId"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("text"); + openapiFields.add("media"); + openapiFields.add("tag"); + openapiFields.add("priority"); + openapiFields.add("expiration"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "to", "from")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); } /** @@ -389,38 +398,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -485,7 +494,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 743cb1b7..80760f09 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java @@ -14,11 +14,9 @@ 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 84010448..ba7ade9b 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -14,11 +14,9 @@ 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 0e0dbe0d..1f74bd1e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) @@ -233,10 +231,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("totalCount", "pageInfo", "messages")); + openapiFields = new HashSet(); + openapiFields.add("totalCount"); + openapiFields.add("pageInfo"); + openapiFields.add("messages"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -248,7 +249,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(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("The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -261,7 +262,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(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("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) @@ -329,7 +330,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 ef47dcf0..8fe89b02 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("messageId")); + openapiFields = new HashSet(); + openapiFields.add("messageId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,12 +183,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(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("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(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("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } } @@ -250,7 +249,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d5e0362c..b42f7150 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -195,10 +193,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "description")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("description"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("description"); } /** @@ -210,22 +212,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -286,7 +288,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 e76438ad..206737b2 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message")); + openapiFields = new HashSet(); + openapiFields.add("message"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,12 +183,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(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("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(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("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -250,7 +249,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4bf63ee4..b4674ca8 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("error", "requestId")); + openapiFields = new HashSet(); + openapiFields.add("error"); + openapiFields.add("requestId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("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(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("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(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("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } } @@ -279,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 a57a9a25..63173e46 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message")); + openapiFields = new HashSet(); + openapiFields.add("message"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,12 +183,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(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("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(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("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -250,7 +249,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8653ed04..cee4d1ae 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -206,10 +204,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text", "media")); + openapiFields = new HashSet(); + openapiFields.add("text"); + openapiFields.add("media"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -221,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(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("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(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("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(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("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) @@ -301,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8c423a31..bbcab5ab 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MmsMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -170,10 +168,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("fileUrl")); + openapiFields = new HashSet(); + openapiFields.add("fileUrl"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("fileUrl")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("fileUrl"); } /** @@ -185,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } } @@ -258,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1bb1149a..bfd8c64a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -14,7 +14,6 @@ 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 +66,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelAction extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelAction.class.getName()); @@ -95,31 +94,31 @@ public void write(JsonWriter out, MultiChannelAction value) throws IOException { // check if the actual instance is of the type `RbmActionBase` if (value.getActualInstance() instanceof RbmActionBase) { - JsonElement element = adapterRbmActionBase.toJsonTree((RbmActionBase)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((RbmActionBase)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `RbmActionDial` if (value.getActualInstance() instanceof RbmActionDial) { - JsonElement element = adapterRbmActionDial.toJsonTree((RbmActionDial)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((RbmActionDial)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `RbmActionViewLocation` if (value.getActualInstance() instanceof RbmActionViewLocation) { - JsonElement element = adapterRbmActionViewLocation.toJsonTree((RbmActionViewLocation)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((RbmActionViewLocation)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `MultiChannelActionCalendarEvent` if (value.getActualInstance() instanceof MultiChannelActionCalendarEvent) { - JsonElement element = adapterMultiChannelActionCalendarEvent.toJsonTree((MultiChannelActionCalendarEvent)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelActionCalendarEvent)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `RbmActionOpenUrl` if (value.getActualInstance() instanceof RbmActionOpenUrl) { - JsonElement element = adapterRbmActionOpenUrl.toJsonTree((RbmActionOpenUrl)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((RbmActionOpenUrl)value.getActualInstance()); elementAdapter.write(out, element); return; } @@ -164,8 +163,28 @@ public MultiChannelAction read(JsonReader in) throws IOException { deserialized = adapterRbmActionViewLocation.fromJsonTree(jsonObject); newMultiChannelAction.setActualInstance(deserialized); return newMultiChannelAction; + case "multiChannelActionCalendarEvent": + deserialized = adapterMultiChannelActionCalendarEvent.fromJsonTree(jsonObject); + newMultiChannelAction.setActualInstance(deserialized); + return newMultiChannelAction; + case "rbmActionBase": + deserialized = adapterRbmActionBase.fromJsonTree(jsonObject); + newMultiChannelAction.setActualInstance(deserialized); + return newMultiChannelAction; + case "rbmActionDial": + deserialized = adapterRbmActionDial.fromJsonTree(jsonObject); + newMultiChannelAction.setActualInstance(deserialized); + return newMultiChannelAction; + case "rbmActionOpenUrl": + deserialized = adapterRbmActionOpenUrl.fromJsonTree(jsonObject); + newMultiChannelAction.setActualInstance(deserialized); + return newMultiChannelAction; + case "rbmActionViewLocation": + deserialized = adapterRbmActionViewLocation.fromJsonTree(jsonObject); + newMultiChannelAction.setActualInstance(deserialized); + return newMultiChannelAction; default: - log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelAction. Possible values: CREATE_CALENDAR_EVENT DIAL_PHONE OPEN_URL REPLY REQUEST_LOCATION SHOW_LOCATION", jsonObject.get("type").getAsString())); + log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelAction. Possible values: CREATE_CALENDAR_EVENT DIAL_PHONE OPEN_URL REPLY REQUEST_LOCATION SHOW_LOCATION multiChannelActionCalendarEvent rbmActionBase rbmActionDial rbmActionOpenUrl rbmActionViewLocation", jsonObject.get("type").getAsString())); } } @@ -177,7 +196,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { try { // validate the JSON object to see if any exception is thrown RbmActionBase.validateJsonElement(jsonElement); - actualAdapter = adapterRbmActionBase; + actualAdapter = adapter; MultiChannelAction ret = new MultiChannelAction(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -190,7 +209,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { try { // validate the JSON object to see if any exception is thrown RbmActionDial.validateJsonElement(jsonElement); - actualAdapter = adapterRbmActionDial; + actualAdapter = adapter; MultiChannelAction ret = new MultiChannelAction(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -203,7 +222,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { try { // validate the JSON object to see if any exception is thrown RbmActionViewLocation.validateJsonElement(jsonElement); - actualAdapter = adapterRbmActionViewLocation; + actualAdapter = adapter; MultiChannelAction ret = new MultiChannelAction(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -216,7 +235,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { try { // validate the JSON object to see if any exception is thrown MultiChannelActionCalendarEvent.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelActionCalendarEvent; + actualAdapter = adapter; MultiChannelAction ret = new MultiChannelAction(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -229,7 +248,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { try { // validate the JSON object to see if any exception is thrown RbmActionOpenUrl.validateJsonElement(jsonElement); - actualAdapter = adapterRbmActionOpenUrl; + actualAdapter = adapter; MultiChannelAction ret = new MultiChannelAction(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -326,7 +345,7 @@ public Object getActualInstance() { * @return The actual instance of `RbmActionBase` * @throws ClassCastException if the instance is not `RbmActionBase` */ - public RbmActionBase getRbmActionBase() throws ClassCastException { + public RbmActionBase get() throws ClassCastException { return (RbmActionBase)super.getActualInstance(); } @@ -337,7 +356,7 @@ public RbmActionBase getRbmActionBase() throws ClassCastException { * @return The actual instance of `RbmActionDial` * @throws ClassCastException if the instance is not `RbmActionDial` */ - public RbmActionDial getRbmActionDial() throws ClassCastException { + public RbmActionDial get() throws ClassCastException { return (RbmActionDial)super.getActualInstance(); } @@ -348,7 +367,7 @@ public RbmActionDial getRbmActionDial() throws ClassCastException { * @return The actual instance of `RbmActionViewLocation` * @throws ClassCastException if the instance is not `RbmActionViewLocation` */ - public RbmActionViewLocation getRbmActionViewLocation() throws ClassCastException { + public RbmActionViewLocation get() throws ClassCastException { return (RbmActionViewLocation)super.getActualInstance(); } @@ -359,7 +378,7 @@ public RbmActionViewLocation getRbmActionViewLocation() throws ClassCastExceptio * @return The actual instance of `MultiChannelActionCalendarEvent` * @throws ClassCastException if the instance is not `MultiChannelActionCalendarEvent` */ - public MultiChannelActionCalendarEvent getMultiChannelActionCalendarEvent() throws ClassCastException { + public MultiChannelActionCalendarEvent get() throws ClassCastException { return (MultiChannelActionCalendarEvent)super.getActualInstance(); } @@ -370,7 +389,7 @@ public MultiChannelActionCalendarEvent getMultiChannelActionCalendarEvent() thro * @return The actual instance of `RbmActionOpenUrl` * @throws ClassCastException if the instance is not `RbmActionOpenUrl` */ - public RbmActionOpenUrl getRbmActionOpenUrl() throws ClassCastException { + public RbmActionOpenUrl get() throws ClassCastException { return (RbmActionOpenUrl)super.getActualInstance(); } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index c2e9f2bc..58de6e0d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelActionCalendarEvent { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -327,10 +325,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime", "description")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("text"); + openapiFields.add("postbackData"); + openapiFields.add("title"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("description"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("text"); + openapiRequiredFields.add("postbackData"); + openapiRequiredFields.add("title"); + openapiRequiredFields.add("startTime"); + openapiRequiredFields.add("endTime"); } /** @@ -342,27 +353,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -423,7 +434,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 dfa6dd64..e1f92802 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListMMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -249,10 +247,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); } /** @@ -264,22 +270,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -344,7 +350,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 87eb5cb6..34484fe7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListMMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -275,10 +273,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); + openapiFields.add("owner"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); + openapiRequiredFields.add("owner"); } /** @@ -290,29 +298,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `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(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("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -373,7 +381,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 a8f9ffa1..d99db1f1 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListObjectBase { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -222,10 +220,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); } /** @@ -237,22 +241,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -315,7 +319,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6c2deaae..b18c631e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListOwnerObject { public static final String SERIALIZED_NAME_OWNER = "owner"; @SerializedName(SERIALIZED_NAME_OWNER) @@ -169,10 +167,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("owner")); + openapiFields = new HashSet(); + openapiFields.add("owner"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("owner")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("owner"); } /** @@ -184,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("owner").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -257,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 5fe3c1bc..1d57d838 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListRBMObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -249,10 +247,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); } /** @@ -264,22 +270,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -344,7 +350,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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/MultiChannelChannelListRBMObjectAllOfContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java index a5880f45..52cc38fc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java @@ -14,7 +14,6 @@ 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; @@ -46,7 +45,6 @@ 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; @@ -70,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListRBMObjectAllOfContent extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListRBMObjectAllOfContent.class.getName()); @@ -133,7 +131,7 @@ public MultiChannelChannelListRBMObjectAllOfContent read(JsonReader in) throws I log.log(Level.FINER, "Input data matches schema 'RbmMessageContentText'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentText'", e); } // deserialize RbmMessageMedia @@ -145,7 +143,7 @@ public MultiChannelChannelListRBMObjectAllOfContent read(JsonReader in) throws I log.log(Level.FINER, "Input data matches schema 'RbmMessageMedia'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageMedia'", e); } // deserialize RbmMessageContentRichCard @@ -157,7 +155,7 @@ public MultiChannelChannelListRBMObjectAllOfContent read(JsonReader in) throws I log.log(Level.FINER, "Input data matches schema 'RbmMessageContentRichCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentRichCard'", e); } @@ -167,7 +165,7 @@ public MultiChannelChannelListRBMObjectAllOfContent read(JsonReader in) throws I return ret; } - throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListRBMObjectAllOfContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format("Failed deserialization for MultiChannelChannelListRBMObjectAllOfContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -283,7 +281,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentText.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageMedia @@ -291,7 +289,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageMedia.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageContentRichCard @@ -299,11 +297,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentRichCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelChannelListRBMObjectAllOfContent with oneOf schemas: RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia. %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("The JSON string is invalid for MultiChannelChannelListRBMObjectAllOfContent with oneOf schemas: RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia. %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/MultiChannelChannelListRBMResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java index 0037ea40..3c45dada 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListRBMResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -275,10 +273,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); + openapiFields.add("owner"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); + openapiRequiredFields.add("owner"); } /** @@ -290,29 +298,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `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(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("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -373,7 +381,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 ee17f9ce..3f2003e0 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java @@ -14,7 +14,6 @@ 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; @@ -64,7 +63,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListRequestObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListRequestObject.class.getName()); @@ -90,19 +89,19 @@ public void write(JsonWriter out, MultiChannelChannelListRequestObject value) th // check if the actual instance is of the type `MultiChannelChannelListRBMObject` if (value.getActualInstance() instanceof MultiChannelChannelListRBMObject) { - JsonElement element = adapterMultiChannelChannelListRBMObject.toJsonTree((MultiChannelChannelListRBMObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListRBMObject)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `MultiChannelChannelListSMSObject` if (value.getActualInstance() instanceof MultiChannelChannelListSMSObject) { - JsonElement element = adapterMultiChannelChannelListSMSObject.toJsonTree((MultiChannelChannelListSMSObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListSMSObject)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `MultiChannelChannelListMMSObject` if (value.getActualInstance() instanceof MultiChannelChannelListMMSObject) { - JsonElement element = adapterMultiChannelChannelListMMSObject.toJsonTree((MultiChannelChannelListMMSObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListMMSObject)value.getActualInstance()); elementAdapter.write(out, element); return; } @@ -135,8 +134,20 @@ public MultiChannelChannelListRequestObject read(JsonReader in) throws IOExcepti deserialized = adapterMultiChannelChannelListSMSObject.fromJsonTree(jsonObject); newMultiChannelChannelListRequestObject.setActualInstance(deserialized); return newMultiChannelChannelListRequestObject; + case "multiChannelChannelListMMSObject": + deserialized = adapterMultiChannelChannelListMMSObject.fromJsonTree(jsonObject); + newMultiChannelChannelListRequestObject.setActualInstance(deserialized); + return newMultiChannelChannelListRequestObject; + case "multiChannelChannelListRBMObject": + deserialized = adapterMultiChannelChannelListRBMObject.fromJsonTree(jsonObject); + newMultiChannelChannelListRequestObject.setActualInstance(deserialized); + return newMultiChannelChannelListRequestObject; + case "multiChannelChannelListSMSObject": + deserialized = adapterMultiChannelChannelListSMSObject.fromJsonTree(jsonObject); + newMultiChannelChannelListRequestObject.setActualInstance(deserialized); + return newMultiChannelChannelListRequestObject; default: - log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelChannelListRequestObject. Possible values: MMS RBM SMS", jsonObject.get("channel").getAsString())); + log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelChannelListRequestObject. Possible values: MMS RBM SMS multiChannelChannelListMMSObject multiChannelChannelListRBMObject multiChannelChannelListSMSObject", jsonObject.get("channel").getAsString())); } } @@ -148,7 +159,7 @@ public MultiChannelChannelListRequestObject read(JsonReader in) throws IOExcepti try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListRBMObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListRBMObject; + actualAdapter = adapter; MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -161,7 +172,7 @@ public MultiChannelChannelListRequestObject read(JsonReader in) throws IOExcepti try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListSMSObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListSMSObject; + actualAdapter = adapter; MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -174,7 +185,7 @@ public MultiChannelChannelListRequestObject read(JsonReader in) throws IOExcepti try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListMMSObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListMMSObject; + actualAdapter = adapter; MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -259,7 +270,7 @@ public Object getActualInstance() { * @return The actual instance of `MultiChannelChannelListRBMObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListRBMObject` */ - public MultiChannelChannelListRBMObject getMultiChannelChannelListRBMObject() throws ClassCastException { + public MultiChannelChannelListRBMObject get() throws ClassCastException { return (MultiChannelChannelListRBMObject)super.getActualInstance(); } @@ -270,7 +281,7 @@ public MultiChannelChannelListRBMObject getMultiChannelChannelListRBMObject() th * @return The actual instance of `MultiChannelChannelListSMSObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListSMSObject` */ - public MultiChannelChannelListSMSObject getMultiChannelChannelListSMSObject() throws ClassCastException { + public MultiChannelChannelListSMSObject get() throws ClassCastException { return (MultiChannelChannelListSMSObject)super.getActualInstance(); } @@ -281,7 +292,7 @@ public MultiChannelChannelListSMSObject getMultiChannelChannelListSMSObject() th * @return The actual instance of `MultiChannelChannelListMMSObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListMMSObject` */ - public MultiChannelChannelListMMSObject getMultiChannelChannelListMMSObject() throws ClassCastException { + public MultiChannelChannelListMMSObject get() throws ClassCastException { return (MultiChannelChannelListMMSObject)super.getActualInstance(); } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java index 4d913bd2..388dec50 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java @@ -14,7 +14,6 @@ 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; @@ -64,7 +63,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListResponseObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListResponseObject.class.getName()); @@ -90,19 +89,19 @@ public void write(JsonWriter out, MultiChannelChannelListResponseObject value) t // check if the actual instance is of the type `MultiChannelChannelListRBMResponseObject` if (value.getActualInstance() instanceof MultiChannelChannelListRBMResponseObject) { - JsonElement element = adapterMultiChannelChannelListRBMResponseObject.toJsonTree((MultiChannelChannelListRBMResponseObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListRBMResponseObject)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `MultiChannelChannelListSMSResponseObject` if (value.getActualInstance() instanceof MultiChannelChannelListSMSResponseObject) { - JsonElement element = adapterMultiChannelChannelListSMSResponseObject.toJsonTree((MultiChannelChannelListSMSResponseObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListSMSResponseObject)value.getActualInstance()); elementAdapter.write(out, element); return; } // check if the actual instance is of the type `MultiChannelChannelListMMSResponseObject` if (value.getActualInstance() instanceof MultiChannelChannelListMMSResponseObject) { - JsonElement element = adapterMultiChannelChannelListMMSResponseObject.toJsonTree((MultiChannelChannelListMMSResponseObject)value.getActualInstance()); + JsonElement element = adapter.toJsonTree((MultiChannelChannelListMMSResponseObject)value.getActualInstance()); elementAdapter.write(out, element); return; } @@ -135,8 +134,20 @@ public MultiChannelChannelListResponseObject read(JsonReader in) throws IOExcept deserialized = adapterMultiChannelChannelListSMSResponseObject.fromJsonTree(jsonObject); newMultiChannelChannelListResponseObject.setActualInstance(deserialized); return newMultiChannelChannelListResponseObject; + case "multiChannelChannelListMMSResponseObject": + deserialized = adapterMultiChannelChannelListMMSResponseObject.fromJsonTree(jsonObject); + newMultiChannelChannelListResponseObject.setActualInstance(deserialized); + return newMultiChannelChannelListResponseObject; + case "multiChannelChannelListRBMResponseObject": + deserialized = adapterMultiChannelChannelListRBMResponseObject.fromJsonTree(jsonObject); + newMultiChannelChannelListResponseObject.setActualInstance(deserialized); + return newMultiChannelChannelListResponseObject; + case "multiChannelChannelListSMSResponseObject": + deserialized = adapterMultiChannelChannelListSMSResponseObject.fromJsonTree(jsonObject); + newMultiChannelChannelListResponseObject.setActualInstance(deserialized); + return newMultiChannelChannelListResponseObject; default: - log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelChannelListResponseObject. Possible values: MMS RBM SMS", jsonObject.get("channel").getAsString())); + log.log(Level.WARNING, String.format(Locale.ROOT, "Failed to lookup discriminator value `%s` for MultiChannelChannelListResponseObject. Possible values: MMS RBM SMS multiChannelChannelListMMSResponseObject multiChannelChannelListRBMResponseObject multiChannelChannelListSMSResponseObject", jsonObject.get("channel").getAsString())); } } @@ -148,7 +159,7 @@ public MultiChannelChannelListResponseObject read(JsonReader in) throws IOExcept try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListRBMResponseObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListRBMResponseObject; + actualAdapter = adapter; MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -161,7 +172,7 @@ public MultiChannelChannelListResponseObject read(JsonReader in) throws IOExcept try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListSMSResponseObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListSMSResponseObject; + actualAdapter = adapter; MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -174,7 +185,7 @@ public MultiChannelChannelListResponseObject read(JsonReader in) throws IOExcept try { // validate the JSON object to see if any exception is thrown MultiChannelChannelListMMSResponseObject.validateJsonElement(jsonElement); - actualAdapter = adapterMultiChannelChannelListMMSResponseObject; + actualAdapter = adapter; MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); return ret; @@ -259,7 +270,7 @@ public Object getActualInstance() { * @return The actual instance of `MultiChannelChannelListRBMResponseObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListRBMResponseObject` */ - public MultiChannelChannelListRBMResponseObject getMultiChannelChannelListRBMResponseObject() throws ClassCastException { + public MultiChannelChannelListRBMResponseObject get() throws ClassCastException { return (MultiChannelChannelListRBMResponseObject)super.getActualInstance(); } @@ -270,7 +281,7 @@ public MultiChannelChannelListRBMResponseObject getMultiChannelChannelListRBMRes * @return The actual instance of `MultiChannelChannelListSMSResponseObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListSMSResponseObject` */ - public MultiChannelChannelListSMSResponseObject getMultiChannelChannelListSMSResponseObject() throws ClassCastException { + public MultiChannelChannelListSMSResponseObject get() throws ClassCastException { return (MultiChannelChannelListSMSResponseObject)super.getActualInstance(); } @@ -281,7 +292,7 @@ public MultiChannelChannelListSMSResponseObject getMultiChannelChannelListSMSRes * @return The actual instance of `MultiChannelChannelListMMSResponseObject` * @throws ClassCastException if the instance is not `MultiChannelChannelListMMSResponseObject` */ - public MultiChannelChannelListMMSResponseObject getMultiChannelChannelListMMSResponseObject() throws ClassCastException { + public MultiChannelChannelListMMSResponseObject get() throws ClassCastException { return (MultiChannelChannelListMMSResponseObject)super.getActualInstance(); } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java index e844b776..363ef96a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListSMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -249,10 +247,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); } /** @@ -264,22 +270,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -344,7 +350,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4e481200..0d79a59e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelChannelListSMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -275,10 +273,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiFields = new HashSet(); + openapiFields.add("from"); + openapiFields.add("applicationId"); + openapiFields.add("channel"); + openapiFields.add("content"); + openapiFields.add("owner"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("from"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("channel"); + openapiRequiredFields.add("content"); + openapiRequiredFields.add("owner"); } /** @@ -290,29 +298,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `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(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("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -373,7 +381,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 90790f2a..9104dd19 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelError { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -253,10 +251,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("data"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -268,7 +269,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(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("The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -277,7 +278,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(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("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) @@ -291,7 +292,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(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("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) @@ -359,7 +360,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c9d207ef..3f7546c8 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java @@ -14,11 +14,9 @@ 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 69ac05d7..2d26e40f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -196,10 +194,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text", "media")); + openapiFields = new HashSet(); + openapiFields.add("text"); + openapiFields.add("media"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -211,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(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("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(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("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()) { @@ -281,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4931bafc..683f7b34 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -286,10 +284,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("to", "channelList", "tag", "priority", "expiration")); + openapiFields = new HashSet(); + openapiFields.add("to"); + openapiFields.add("channelList"); + openapiFields.add("tag"); + openapiFields.add("priority"); + openapiFields.add("expiration"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("to", "channelList")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("channelList"); } /** @@ -301,23 +306,23 @@ 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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // 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())); + throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -326,7 +331,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelChannelListRequestObject.validateJsonElement(jsonArraychannelList.get(i)); }; 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 09fc2dcd..7eda9566 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -14,7 +14,6 @@ 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; @@ -51,14 +50,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -375,10 +373,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList", "tag", "priority", "expiration")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("time"); + openapiFields.add("direction"); + openapiFields.add("to"); + openapiFields.add("channelList"); + openapiFields.add("tag"); + openapiFields.add("priority"); + openapiFields.add("expiration"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("time"); + openapiRequiredFields.add("direction"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("channelList"); } /** @@ -390,19 +401,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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")); @@ -410,11 +421,11 @@ 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(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("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } // 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())); + throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -423,7 +434,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelChannelListResponseObject.validateJsonElement(jsonArraychannelList.get(i)); }; 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -488,7 +499,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 8a343504..698c2093 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -14,7 +14,6 @@ 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,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class OptInWorkflow { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -243,10 +241,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("description", "imageUrls", "confirmationResponse")); + openapiFields = new HashSet(); + openapiFields.add("description"); + openapiFields.add("imageUrls"); + openapiFields.add("confirmationResponse"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("description", "imageUrls")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("imageUrls"); } /** @@ -258,28 +261,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // 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(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("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(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("Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); } } @@ -340,7 +343,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c88c9ac2..b0bfd585 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) @@ -247,10 +245,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("prevPage", "nextPage", "prevPageToken", "nextPageToken")); + openapiFields = new HashSet(); + openapiFields.add("prevPage"); + openapiFields.add("nextPage"); + openapiFields.add("prevPageToken"); + openapiFields.add("nextPageToken"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -262,21 +264,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(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("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(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("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(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("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(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("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(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("Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); } } @@ -337,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1d667b81..26533e2c 100644 --- a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -14,11 +14,9 @@ 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 f97e4116..5c83c023 100644 --- a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java @@ -14,11 +14,9 @@ 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 6087bfe8..a2f7a6f1 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmActionBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -222,10 +220,16 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("text"); + openapiFields.add("postbackData"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("text"); + openapiRequiredFields.add("postbackData"); } /** @@ -237,21 +241,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -312,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 f6fc8359..4928d8ba 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmActionDial { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -248,10 +246,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("text"); + openapiFields.add("postbackData"); + openapiFields.add("phoneNumber"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("text"); + openapiRequiredFields.add("postbackData"); + openapiRequiredFields.add("phoneNumber"); } /** @@ -263,24 +269,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -341,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 9ea82f8e..6e9b7fe1 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmActionOpenUrl { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -249,10 +247,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("text"); + openapiFields.add("postbackData"); + openapiFields.add("url"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("text"); + openapiRequiredFields.add("postbackData"); + openapiRequiredFields.add("url"); } /** @@ -264,24 +270,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -342,7 +348,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 41ef7f5a..77d1054c 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java @@ -14,11 +14,9 @@ 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 df95ca61..97bf52a5 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmActionViewLocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -300,10 +298,21 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude", "label")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("text"); + openapiFields.add("postbackData"); + openapiFields.add("latitude"); + openapiFields.add("longitude"); + openapiFields.add("label"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("text"); + openapiRequiredFields.add("postbackData"); + openapiRequiredFields.add("latitude"); + openapiRequiredFields.add("longitude"); } /** @@ -315,30 +324,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } } @@ -399,7 +408,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4f2aa932..fda67bec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmCardContent { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) @@ -259,10 +257,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("title", "description", "media", "suggestions")); + openapiFields = new HashSet(); + openapiFields.add("title"); + openapiFields.add("description"); + openapiFields.add("media"); + openapiFields.add("suggestions"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -274,15 +276,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(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("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(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("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(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("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()) { @@ -293,7 +295,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(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("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) @@ -361,7 +363,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 7abc00ec..939e529f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmCardContentMedia { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -223,10 +221,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl", "height")); + openapiFields = new HashSet(); + openapiFields.add("fileUrl"); + openapiFields.add("thumbnailUrl"); + openapiFields.add("height"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("fileUrl", "height")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("fileUrl"); + openapiRequiredFields.add("height"); } /** @@ -238,22 +241,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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")); @@ -316,7 +319,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4c76ec90..250175fa 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmLocationResponse { public static final String SERIALIZED_NAME_LATITUDE = "latitude"; @SerializedName(SERIALIZED_NAME_LATITUDE) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("latitude", "longitude")); + openapiFields = new HashSet(); + openapiFields.add("latitude"); + openapiFields.add("longitude"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,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(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("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(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("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(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("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } } @@ -279,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 59222725..c31e67a4 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java @@ -14,11 +14,9 @@ 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 e541d558..fea64c1c 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmMessageCarouselCard { public static final String SERIALIZED_NAME_CARD_WIDTH = "cardWidth"; @SerializedName(SERIALIZED_NAME_CARD_WIDTH) @@ -242,10 +240,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("cardWidth", "cardContents", "suggestions")); + openapiFields = new HashSet(); + openapiFields.add("cardWidth"); + openapiFields.add("cardContents"); + openapiFields.add("suggestions"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("cardWidth", "cardContents")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("cardWidth"); + openapiRequiredFields.add("cardContents"); } /** @@ -257,14 +260,14 @@ 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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -272,7 +275,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CardWidthEnum.validateJsonElement(jsonObj.get("cardWidth")); // 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())); + throw new IllegalArgumentException(String.format("Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); } JsonArray jsonArraycardContents = jsonObj.getAsJsonArray("cardContents"); @@ -285,7 +288,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(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("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) @@ -353,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 6b9a0c17..71bd4263 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -196,10 +194,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl")); + openapiFields = new HashSet(); + openapiFields.add("fileUrl"); + openapiFields.add("thumbnailUrl"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("fileUrl")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("fileUrl"); } /** @@ -211,22 +212,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } } @@ -287,7 +288,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 5c4cb506..9f6af6d1 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -14,7 +14,6 @@ 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; @@ -44,7 +43,6 @@ 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; @@ -68,7 +66,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); @@ -124,7 +122,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(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmStandaloneCard'", e); } // deserialize RbmMessageCarouselCard @@ -136,7 +134,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(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageCarouselCard'", e); } @@ -146,7 +144,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { return ret; } - 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())); + throw new IOException(String.format("Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -245,7 +243,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmStandaloneCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageCarouselCard @@ -253,11 +251,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageCarouselCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - 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())); + throw new IOException(String.format("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 e0de2980..0f62bc31 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmMessageContentText { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -206,10 +204,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text", "suggestions")); + openapiFields = new HashSet(); + openapiFields.add("text"); + openapiFields.add("suggestions"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("text")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("text"); } /** @@ -221,26 +222,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } 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(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("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) @@ -308,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 a2ca3bb6..ec5aa0e4 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmMessageMedia { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) @@ -207,10 +205,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("media", "suggestions")); + openapiFields = new HashSet(); + openapiFields.add("media"); + openapiFields.add("suggestions"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("media")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("media"); } /** @@ -222,14 +223,14 @@ 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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -240,7 +241,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(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("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) @@ -308,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index bad48f96..4c0665f3 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -14,7 +14,6 @@ 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; @@ -49,14 +48,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmStandaloneCard { public static final String SERIALIZED_NAME_ORIENTATION = "orientation"; @SerializedName(SERIALIZED_NAME_ORIENTATION) @@ -261,10 +259,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent", "suggestions")); + openapiFields = new HashSet(); + openapiFields.add("orientation"); + openapiFields.add("thumbnailImageAlignment"); + openapiFields.add("cardContent"); + openapiFields.add("suggestions"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("orientation"); + openapiRequiredFields.add("thumbnailImageAlignment"); + openapiRequiredFields.add("cardContent"); } /** @@ -276,14 +281,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -298,7 +303,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(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("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) @@ -366,7 +371,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 578d5fdb..b5fd0185 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RbmSuggestionResponse { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text", "postbackData")); + openapiFields = new HashSet(); + openapiFields.add("text"); + openapiFields.add("postbackData"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,12 +210,12 @@ 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(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("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(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("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -276,7 +276,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 74a2cc39..806b6afb 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -731,10 +729,32 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "recordingId", "mediaUrl", "enqueuedTime", "startTime", "endTime", "duration", "fileFormat", "channels", "tag", "status", "transferCallerId", "transferTo")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("parentCallId"); + openapiFields.add("recordingId"); + openapiFields.add("mediaUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("duration"); + openapiFields.add("fileFormat"); + openapiFields.add("channels"); + openapiFields.add("tag"); + openapiFields.add("status"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -746,62 +766,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -862,7 +882,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 fa92e165..1ae34da6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -14,7 +14,6 @@ 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; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -731,10 +729,32 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "recordingId", "mediaUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "duration", "fileFormat", "channels", "tag", "transferCallerId", "transferTo")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("parentCallId"); + openapiFields.add("recordingId"); + openapiFields.add("mediaUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("endTime"); + openapiFields.add("duration"); + openapiFields.add("fileFormat"); + openapiFields.add("channels"); + openapiFields.add("tag"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -746,59 +766,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -859,7 +879,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 07c60a08..ff3d9507 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java @@ -14,11 +14,9 @@ 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/RecordingTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java index f9c3e9ab..38cda932 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RecordingTranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -249,10 +247,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "status", "completedTime", "url")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("status"); + openapiFields.add("completedTime"); + openapiFields.add("url"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -264,18 +266,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(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("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(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("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(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("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(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("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -336,7 +338,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4b0f97e6..ed6f2dd3 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java @@ -14,7 +14,6 @@ package com.bandwidth.sdk.model; import java.util.Objects; -import java.util.Locale; import com.bandwidth.sdk.model.Transcription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RecordingTranscriptions { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) @@ -180,10 +178,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("transcripts")); + openapiFields = new HashSet(); + openapiFields.add("transcripts"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -195,7 +194,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(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("The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -204,7 +203,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(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("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) @@ -272,7 +271,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 a2a27d29..9ba3bb5a 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -574,10 +572,26 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("parentCallId"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -589,46 +603,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -689,7 +703,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 52ecdcab..ef3d6bfd 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java @@ -14,11 +14,9 @@ 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/SmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java index e1229270..50932ded 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class SmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -169,10 +167,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text")); + openapiFields = new HashSet(); + openapiFields.add("text"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("text")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("text"); } /** @@ -184,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -257,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c80ead00..206705f6 100644 --- a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java @@ -14,11 +14,9 @@ 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 f0ac27a2..64a57657 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class StatusCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -354,10 +352,23 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("time", "eventTime", "type", "to", "description", "message", "errorCode", "carrierName")); + openapiFields = new HashSet(); + openapiFields.add("time"); + openapiFields.add("eventTime"); + openapiFields.add("type"); + openapiFields.add("to"); + openapiFields.add("description"); + openapiFields.add("message"); + openapiFields.add("errorCode"); + openapiFields.add("carrierName"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("time"); + openapiRequiredFields.add("type"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("description"); + openapiRequiredFields.add("message"); } /** @@ -369,29 +380,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -452,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 5da629a2..a983981f 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java @@ -14,7 +14,6 @@ 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; @@ -52,14 +51,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class StatusCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -506,10 +504,31 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("owner"); + openapiFields.add("applicationId"); + openapiFields.add("time"); + openapiFields.add("segmentCount"); + openapiFields.add("direction"); + openapiFields.add("to"); + openapiFields.add("from"); + openapiFields.add("text"); + openapiFields.add("tag"); + openapiFields.add("media"); + openapiFields.add("priority"); + openapiFields.add("channel"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("owner"); + openapiRequiredFields.add("applicationId"); + openapiRequiredFields.add("time"); + openapiRequiredFields.add("segmentCount"); + openapiRequiredFields.add("direction"); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("from"); } /** @@ -521,25 +540,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("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")); @@ -547,20 +566,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(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("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(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("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(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("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(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("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(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("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()) { @@ -629,7 +648,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1d7a59c1..a793aa48 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java @@ -14,11 +14,9 @@ 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; @@ -31,13 +29,13 @@ @JsonAdapter(StatusCallbackTypeEnum.Adapter.class) public enum StatusCallbackTypeEnum { - MESSAGE_SENDING("message-sending"), + SENDING("message-sending"), - MESSAGE_DELIVERED("message-delivered"), + DELIVERED("message-delivered"), - MESSAGE_FAILED("message-failed"), + FAILED("message-failed"), - MESSAGE_READ("message-read"); + READ("message-read"); private String value; diff --git a/src/main/java/com/bandwidth/sdk/model/StirShaken.java b/src/main/java/com/bandwidth/sdk/model/StirShaken.java index b145fb69..e9ee898d 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) @@ -221,10 +219,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("verstat", "attestationIndicator", "originatingId")); + openapiFields = new HashSet(); + openapiFields.add("verstat"); + openapiFields.add("attestationIndicator"); + openapiFields.add("originatingId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -236,18 +237,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(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("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(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("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(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("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(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("Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); } } @@ -308,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4131409d..93fe4c0c 100644 --- a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java @@ -14,7 +14,6 @@ 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,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class SyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) @@ -179,10 +177,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("phoneNumbers")); + openapiFields = new HashSet(); + openapiFields.add("phoneNumbers"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("phoneNumbers")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("phoneNumbers"); } /** @@ -194,14 +194,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -209,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(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("Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } } @@ -270,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 84a96805..13af88b4 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TelephoneNumber { public static final String SERIALIZED_NAME_TELEPHONE_NUMBER = "telephoneNumber"; @SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBER) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("telephoneNumber")); + openapiFields = new HashSet(); + openapiFields.add("telephoneNumber"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,12 +183,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(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("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(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("Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); } } @@ -250,7 +249,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 dcb4ae4d..00d5bada 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TfvBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -195,10 +193,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("username", "password")); + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("password"); } /** @@ -210,22 +212,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -286,7 +288,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 457deaf5..7e21b73b 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java @@ -14,11 +14,9 @@ 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 d49eec2e..ef4056a2 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TfvError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -221,10 +219,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "description", "errors")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("errors"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -236,15 +237,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(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("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(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("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(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("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -305,7 +306,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 665a9e45..b2b8d96a 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java @@ -14,7 +14,6 @@ package com.bandwidth.sdk.model; import java.util.Objects; -import java.util.Locale; import com.bandwidth.sdk.model.TfvStatusEnum; import com.bandwidth.sdk.model.TfvSubmissionInfo; import com.google.gson.TypeAdapter; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TfvStatus { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -407,10 +405,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason")); + openapiFields = new HashSet(); + openapiFields.add("phoneNumber"); + openapiFields.add("status"); + openapiFields.add("internalTicketNumber"); + openapiFields.add("declineReasonDescription"); + openapiFields.add("resubmitAllowed"); + openapiFields.add("createdDateTime"); + openapiFields.add("modifiedDateTime"); + openapiFields.add("submission"); + openapiFields.add("blocked"); + openapiFields.add("blockedReason"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -422,29 +430,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(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("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(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("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(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("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(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("Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } // validate the optional field `submission` if (jsonObj.get("submission") != null && !jsonObj.get("submission").isJsonNull()) { TfvSubmissionInfo.validateJsonElement(jsonObj.get("submission")); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -505,7 +513,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 de526935..d17c8b50 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java @@ -14,11 +14,9 @@ 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 159189f8..a5715be1 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -14,7 +14,6 @@ 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; @@ -49,14 +48,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TfvSubmissionInfo { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -552,10 +550,25 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType")); + openapiFields = new HashSet(); + openapiFields.add("businessAddress"); + openapiFields.add("businessContact"); + openapiFields.add("messageVolume"); + openapiFields.add("useCase"); + openapiFields.add("useCaseSummary"); + openapiFields.add("productionMessageContent"); + openapiFields.add("optInWorkflow"); + openapiFields.add("additionalInformation"); + openapiFields.add("isvReseller"); + openapiFields.add("privacyPolicyUrl"); + openapiFields.add("termsAndConditionsUrl"); + openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -567,7 +580,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(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("The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -580,35 +593,35 @@ 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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -677,7 +690,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 816fe394..8abdd125 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TfvSubmissionWrapper { public static final String SERIALIZED_NAME_SUBMISSION = "submission"; @SerializedName(SERIALIZED_NAME_SUBMISSION) @@ -170,10 +168,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("submission")); + openapiFields = new HashSet(); + openapiFields.add("submission"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -185,7 +184,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(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("The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -252,7 +251,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 999b112a..ee456b43 100644 --- a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java @@ -14,11 +14,9 @@ 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 9ded93a1..7d1c7fa7 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -14,7 +14,6 @@ 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,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -341,10 +339,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("callbackUrl", "callbackMethod", "username", "password", "tag", "callbackTimeout", "detectLanguage")); + openapiFields = new HashSet(); + openapiFields.add("callbackUrl"); + openapiFields.add("callbackMethod"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("tag"); + openapiFields.add("callbackTimeout"); + openapiFields.add("detectLanguage"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -356,25 +361,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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -435,7 +440,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d254c619..fc017c5c 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -195,10 +193,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("text", "confidence")); + openapiFields = new HashSet(); + openapiFields.add("text"); + openapiFields.add("confidence"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -210,12 +210,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(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("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(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("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -276,7 +276,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 89963376..b1eecdc2 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -14,7 +14,6 @@ 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; @@ -49,14 +48,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -706,10 +704,31 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "mediaUrl", "parentCallId", "recordingId", "enqueuedTime", "startTime", "endTime", "duration", "fileFormat", "tag", "transcription", "transferCallerId", "transferTo")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("mediaUrl"); + openapiFields.add("parentCallId"); + openapiFields.add("recordingId"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("endTime"); + openapiFields.add("duration"); + openapiFields.add("fileFormat"); + openapiFields.add("tag"); + openapiFields.add("transcription"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -721,63 +740,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("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(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("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -838,7 +857,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 bcfdb773..4e6cbad0 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -548,10 +546,25 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -563,43 +576,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -660,7 +673,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 fbb2d928..40908757 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -626,10 +624,28 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo", "cause", "errorMessage", "errorId")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("tag"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); + openapiFields.add("cause"); + openapiFields.add("errorMessage"); + openapiFields.add("errorId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -641,52 +657,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -747,7 +763,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 27969041..aac192fe 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -14,7 +14,6 @@ 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,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -678,10 +676,30 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "enqueuedTime", "startTime", "answerTime", "endTime", "tag", "transferCallerId", "transferTo", "cause", "errorMessage", "errorId")); + openapiFields = new HashSet(); + openapiFields.add("eventType"); + openapiFields.add("eventTime"); + openapiFields.add("accountId"); + openapiFields.add("applicationId"); + openapiFields.add("from"); + openapiFields.add("to"); + openapiFields.add("direction"); + openapiFields.add("callId"); + openapiFields.add("callUrl"); + openapiFields.add("parentCallId"); + openapiFields.add("enqueuedTime"); + openapiFields.add("startTime"); + openapiFields.add("answerTime"); + openapiFields.add("endTime"); + openapiFields.add("tag"); + openapiFields.add("transferCallerId"); + openapiFields.add("transferTo"); + openapiFields.add("cause"); + openapiFields.add("errorMessage"); + openapiFields.add("errorId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -693,55 +711,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(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("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(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("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())); + throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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())); + throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -802,7 +820,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 f83fa2eb..22164f89 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -418,10 +416,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("state", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword", "tag")); + openapiFields = new HashSet(); + openapiFields.add("state"); + openapiFields.add("redirectUrl"); + openapiFields.add("redirectMethod"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("redirectFallbackUrl"); + openapiFields.add("redirectFallbackMethod"); + openapiFields.add("fallbackUsername"); + openapiFields.add("fallbackPassword"); + openapiFields.add("tag"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -433,7 +441,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(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("The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -442,33 +450,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(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("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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -529,7 +537,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 38eca647..c269d8d3 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -14,7 +14,6 @@ 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; @@ -44,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -170,10 +168,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("state")); + openapiFields = new HashSet(); + openapiFields.add("state"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("state")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("state"); } /** @@ -185,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -257,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 3db39d55..0b09b1e4 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -392,10 +390,19 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("status", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword")); + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("redirectUrl"); + openapiFields.add("redirectMethod"); + openapiFields.add("username"); + openapiFields.add("password"); + openapiFields.add("redirectFallbackUrl"); + openapiFields.add("redirectFallbackMethod"); + openapiFields.add("fallbackUsername"); + openapiFields.add("fallbackPassword"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -407,7 +414,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(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("The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -416,30 +423,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(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("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(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("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(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("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(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("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(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("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(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("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -500,7 +507,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 ae882baa..e0e385ba 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -14,7 +14,6 @@ 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,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) @@ -243,10 +241,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("mute", "hold", "callIdsToCoach")); + openapiFields = new HashSet(); + openapiFields.add("mute"); + openapiFields.add("hold"); + openapiFields.add("callIdsToCoach"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -258,13 +259,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(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("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(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("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -325,7 +326,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d342774b..92b77d63 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java @@ -14,7 +14,6 @@ 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; @@ -47,14 +46,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerificationDenialWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -415,10 +413,20 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "additionalDenialReasons", "declineReasonDescription", "denialStatusCode", "internalTicketNumber", "phoneNumber", "resubmitAllowed", "status", "blocked", "blockedReason")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("additionalDenialReasons"); + openapiFields.add("declineReasonDescription"); + openapiFields.add("denialStatusCode"); + openapiFields.add("internalTicketNumber"); + openapiFields.add("phoneNumber"); + openapiFields.add("resubmitAllowed"); + openapiFields.add("status"); + openapiFields.add("blocked"); + openapiFields.add("blockedReason"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -430,19 +438,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(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("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(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("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(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("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) @@ -452,19 +460,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(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("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(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("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(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("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(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("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(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("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -525,7 +533,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 1f78f0c2..270670c9 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -14,7 +14,6 @@ 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; @@ -51,14 +50,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerificationRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -640,10 +638,36 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); + openapiFields = new HashSet(); + openapiFields.add("businessAddress"); + openapiFields.add("businessContact"); + openapiFields.add("messageVolume"); + openapiFields.add("phoneNumbers"); + openapiFields.add("useCase"); + openapiFields.add("useCaseSummary"); + openapiFields.add("productionMessageContent"); + openapiFields.add("optInWorkflow"); + openapiFields.add("additionalInformation"); + openapiFields.add("isvReseller"); + openapiFields.add("privacyPolicyUrl"); + openapiFields.add("termsAndConditionsUrl"); + openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); + openapiFields.add("helpMessageResponse"); + openapiFields.add("ageGatedContent"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("businessAddress"); + openapiRequiredFields.add("businessContact"); + openapiRequiredFields.add("messageVolume"); + openapiRequiredFields.add("phoneNumbers"); + openapiRequiredFields.add("useCase"); + openapiRequiredFields.add("useCaseSummary"); + openapiRequiredFields.add("productionMessageContent"); + openapiRequiredFields.add("optInWorkflow"); } /** @@ -655,14 +679,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -674,36 +698,36 @@ 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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -714,7 +738,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); } if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -775,7 +799,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 01fc2b18..f68127b8 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -14,7 +14,6 @@ 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; @@ -49,14 +48,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerificationUpdateRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -604,10 +602,34 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); + openapiFields = new HashSet(); + openapiFields.add("businessAddress"); + openapiFields.add("businessContact"); + openapiFields.add("messageVolume"); + openapiFields.add("useCase"); + openapiFields.add("useCaseSummary"); + openapiFields.add("productionMessageContent"); + openapiFields.add("optInWorkflow"); + openapiFields.add("additionalInformation"); + openapiFields.add("isvReseller"); + openapiFields.add("privacyPolicyUrl"); + openapiFields.add("termsAndConditionsUrl"); + openapiFields.add("businessDba"); + openapiFields.add("businessRegistrationNumber"); + openapiFields.add("businessRegistrationType"); + openapiFields.add("businessEntityType"); + openapiFields.add("helpMessageResponse"); + openapiFields.add("ageGatedContent"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("businessAddress"); + openapiRequiredFields.add("businessContact"); + openapiRequiredFields.add("messageVolume"); + openapiRequiredFields.add("useCase"); + openapiRequiredFields.add("useCaseSummary"); + openapiRequiredFields.add("productionMessageContent"); + openapiRequiredFields.add("optInWorkflow"); } /** @@ -619,14 +641,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -635,33 +657,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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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(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("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()) { @@ -672,7 +694,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); } if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -733,7 +755,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d71a8175..22ce9d79 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerificationWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -249,10 +247,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber")); + openapiFields = new HashSet(); + openapiFields.add("accountId"); + openapiFields.add("phoneNumber"); + openapiFields.add("status"); + openapiFields.add("internalTicketNumber"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -264,22 +266,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(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("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(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("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(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("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(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("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -340,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 3113987a..98611e5c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -250,10 +248,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("to", "scope", "expirationTimeInMinutes", "code")); + openapiFields = new HashSet(); + openapiFields.add("to"); + openapiFields.add("scope"); + openapiFields.add("expirationTimeInMinutes"); + openapiFields.add("code"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("to", "expirationTimeInMinutes", "code")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("to"); + openapiRequiredFields.add("expirationTimeInMinutes"); + openapiRequiredFields.add("code"); } /** @@ -265,25 +270,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(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("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(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("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(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("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 bd1fa5fd..d8040b0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("valid")); + openapiFields = new HashSet(); + openapiFields.add("valid"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,7 +183,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(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("The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -247,7 +246,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 0aff5385..589bbdbc 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -14,7 +14,6 @@ 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,14 +43,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -233,10 +231,13 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "description", "id")); + openapiFields = new HashSet(); + openapiFields.add("type"); + openapiFields.add("description"); + openapiFields.add("id"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -248,18 +249,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(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("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(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("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(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("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(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("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -320,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 d7ea2d7c..8e0047dd 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -169,10 +167,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("callId")); + openapiFields = new HashSet(); + openapiFields.add("callId"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); + openapiRequiredFields = new HashSet(); } /** @@ -184,12 +183,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(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("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(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("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } } @@ -250,7 +249,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 c93ac622..9521bc5d 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -14,7 +14,6 @@ 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; @@ -46,14 +45,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class WebhookSubscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -328,10 +326,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "accountId", "callbackUrl", "type", "basicAuthentication", "createdDate", "modifiedDate")); + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("accountId"); + openapiFields.add("callbackUrl"); + openapiFields.add("type"); + openapiFields.add("basicAuthentication"); + openapiFields.add("createdDate"); + openapiFields.add("modifiedDate"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("callbackUrl"); } /** @@ -343,25 +349,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } 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())); + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `type` if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { @@ -430,7 +436,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 2c9df8e1..a95b0707 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -14,7 +14,6 @@ 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,14 +42,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class WebhookSubscriptionBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -195,10 +193,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("username", "password")); + openapiFields = new HashSet(); + openapiFields.add("username"); + openapiFields.add("password"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("username"); + openapiRequiredFields.add("password"); } /** @@ -210,22 +212,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -286,7 +288,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 4de11d02..fd354bc8 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -14,7 +14,6 @@ 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; @@ -45,14 +44,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class WebhookSubscriptionRequestSchema { public static final String SERIALIZED_NAME_BASIC_AUTHENTICATION = "basicAuthentication"; @SerializedName(SERIALIZED_NAME_BASIC_AUTHENTICATION) @@ -234,10 +232,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("basicAuthentication", "callbackUrl", "sharedSecretKey")); + openapiFields = new HashSet(); + openapiFields.add("basicAuthentication"); + openapiFields.add("callbackUrl"); + openapiFields.add("sharedSecretKey"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("callbackUrl"); } /** @@ -249,14 +251,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -265,10 +267,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(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("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(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("Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); } } @@ -329,7 +331,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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 2873d71f..e3688c9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java @@ -14,11 +14,9 @@ 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 b19ed25f..9cde6bac 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java @@ -14,7 +14,6 @@ package com.bandwidth.sdk.model; import java.util.Objects; -import java.util.Locale; import com.bandwidth.sdk.model.Error; import com.bandwidth.sdk.model.LinksObject; import com.bandwidth.sdk.model.WebhookSubscription; @@ -48,14 +47,13 @@ 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.17.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") public class WebhookSubscriptionsListBody { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -242,10 +240,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("links", "errors", "data")); + openapiFields = new HashSet(); + openapiFields.add("links"); + openapiFields.add("errors"); + openapiFields.add("data"); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("data")); + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("data"); } /** @@ -257,14 +259,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(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("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(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -277,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(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("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) @@ -288,7 +290,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // 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())); + throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); } JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); @@ -355,7 +357,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(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format("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