From b586dd7ba5cde23bf4ba2e671fbd7ff681195584 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Oct 2025 16:01:53 -0400 Subject: [PATCH 01/13] update generator version --- .github/workflows/test-pr.yml | 6 +- .openapi-generator/VERSION | 2 +- README.md | 2 +- api/openapi.yaml | 1954 ++++++++--------- build.gradle | 5 +- build.sbt | 10 +- docs/StatusCallbackTypeEnum.md | 8 +- openapitools.json | 2 +- .../java/com/bandwidth/sdk/ApiClient.java | 104 +- .../java/com/bandwidth/sdk/ApiException.java | 5 +- .../java/com/bandwidth/sdk/Configuration.java | 68 +- src/main/java/com/bandwidth/sdk/JSON.java | 32 +- 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 | 50 +- .../com/bandwidth/sdk/api/ConferencesApi.java | 90 +- .../java/com/bandwidth/sdk/api/MediaApi.java | 40 +- .../com/bandwidth/sdk/api/MessagesApi.java | 20 +- .../java/com/bandwidth/sdk/api/MfaApi.java | 30 +- .../bandwidth/sdk/api/MultiChannelApi.java | 10 +- .../sdk/api/PhoneNumberLookupApi.java | 20 +- .../com/bandwidth/sdk/api/RecordingsApi.java | 100 +- .../com/bandwidth/sdk/api/StatisticsApi.java | 10 +- .../sdk/api/TollFreeVerificationApi.java | 80 +- .../bandwidth/sdk/api/TranscriptionsApi.java | 30 +- .../com/bandwidth/sdk/auth/ApiKeyAuth.java | 2 +- .../bandwidth/sdk/auth/Authentication.java | 1 + .../bandwidth/sdk/auth/HttpBearerAuth.java | 2 +- .../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 +- .../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 | 16 +- .../sdk/model/CallbackMethodEnum.java | 2 + .../bandwidth/sdk/model/CardWidthEnum.java | 2 + .../com/bandwidth/sdk/model/CodeRequest.java | 35 +- .../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 +- .../com/bandwidth/sdk/model/CreateCall.java | 65 +- .../sdk/model/CreateCallResponse.java | 72 +- .../sdk/model/CreateLookupResponse.java | 16 +- .../sdk/model/CreateMessageRequestError.java | 25 +- .../CreateMultiChannelMessageResponse.java | 19 +- .../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 +- .../bandwidth/sdk/model/InboundCallback.java | 31 +- .../sdk/model/InboundCallbackMessage.java | 54 +- .../sdk/model/InboundCallbackTypeEnum.java | 2 + .../bandwidth/sdk/model/InitiateCallback.java | 41 +- .../java/com/bandwidth/sdk/model/Link.java | 18 +- .../com/bandwidth/sdk/model/LinksObject.java | 24 +- .../sdk/model/ListMessageDirectionEnum.java | 2 + .../bandwidth/sdk/model/ListMessageItem.java | 57 +- .../bandwidth/sdk/model/LookupRequest.java | 18 +- .../com/bandwidth/sdk/model/LookupResult.java | 37 +- .../com/bandwidth/sdk/model/LookupStatus.java | 22 +- .../bandwidth/sdk/model/LookupStatusEnum.java | 2 + .../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 | 28 +- .../MultiChannelActionCalendarEvent.java | 33 +- .../model/MultiChannelChannelListObject.java | 26 +- .../MultiChannelChannelListObjectContent.java | 28 +- .../sdk/model/MultiChannelError.java | 19 +- .../model/MultiChannelMessageChannelEnum.java | 2 + .../sdk/model/MultiChannelMessageContent.java | 16 +- .../sdk/model/MultiChannelMessageRequest.java | 27 +- .../MultiChannelMessageResponseData.java | 35 +- ...elMessageResponseDataChannelListInner.java | 30 +- .../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 +- .../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/TnLookupRequestError.java | 15 +- .../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 +- .../sdk/unit/models/FailureWebhookTest.java | 1 - .../sdk/unit/models/StatusCallbackTest.java | 2 +- .../models/StatusCallbackTypeEnumTest.java | 8 +- 188 files changed, 2941 insertions(+), 3606 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 763a5cf0..760512b5 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -36,15 +36,15 @@ jobs: strategy: matrix: os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] - java-version: ["11", "17", "21"] + java-version: ["11", "17", "21", "25"] distribution: ["zulu", "temurin"] fail-fast: false steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java-version }} diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 758bb9c8..971ecb25 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.10.0 +7.16.0 diff --git a/README.md b/README.md index 12354201..910ccfbd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Generator version: 7.10.0 + - Generator version: 7.16.0 Bandwidth's Communication APIs diff --git a/api/openapi.yaml b/api/openapi.yaml index a85e5348..3d0f7c68 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -53,7 +53,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" type: array description: OK headers: @@ -67,49 +67,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 +154,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 +238,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 +335,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/uploadMediaRequest' + $ref: "#/components/requestBodies/uploadMediaRequest" responses: "204": description: No Content @@ -343,49 +343,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 +454,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 +462,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 +481,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 +548,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 +682,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 +734,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 +749,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 +824,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 +838,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 +859,7 @@ paths: source: field: "channelList[0].from" schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Bad Request "401": content: @@ -872,7 +872,7 @@ paths: description: Authentication Failed source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unauthorized "403": content: @@ -885,7 +885,7 @@ paths: description: Access Denied source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Forbidden "404": content: @@ -898,7 +898,7 @@ paths: description: Resource not found. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Not Found "405": content: @@ -911,7 +911,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 +928,7 @@ paths: source: header: Content-Type schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unsupported Media Type "429": content: @@ -942,7 +942,7 @@ paths: Please retry later. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Too Many Requests "500": content: @@ -955,14 +955,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 +1064,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" type: array description: OK "400": @@ -1072,63 +1072,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 +1142,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 +1170,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 +1193,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 +1263,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 +1307,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 +1384,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 +1417,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateCallRequest' + $ref: "#/components/requestBodies/updateCallRequest" responses: "200": description: OK @@ -1426,72 +1426,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 +1505,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 +1542,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 +1551,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 +1630,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 +1719,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 +1730,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 +1800,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 +1840,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 +1917,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 +1949,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateConferenceRequest' + $ref: "#/components/requestBodies/updateConferenceRequest" responses: "204": description: Conference was successfully modified. @@ -1958,63 +1958,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 +2028,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 +2065,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateConferenceBxmlRequest' + $ref: "#/components/requestBodies/updateConferenceBxmlRequest" responses: "204": description: Conference successfully modified. @@ -2074,63 +2074,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 +2144,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 +2194,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 +2271,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 +2312,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 +2321,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 +2391,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 +2434,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" type: array description: OK "400": @@ -2442,63 +2442,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 +2512,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 +2561,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 +2638,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 +2699,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 +2769,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 +2845,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" type: array description: OK "400": @@ -2853,63 +2853,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 +2923,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 +2959,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateCallRecordingRequest' + $ref: "#/components/requestBodies/updateCallRecordingRequest" responses: "200": description: OK @@ -2968,63 +2968,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 +3038,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 +3082,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" type: array description: OK "400": @@ -3090,63 +3090,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 +3160,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 +3215,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 +3285,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 +3330,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 +3407,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 +3459,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 +3529,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 +3586,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 +3656,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 +3713,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 +3783,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 +3832,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 +3909,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 +3953,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/transcribeRecordingRequest' + $ref: "#/components/requestBodies/transcribeRecordingRequest" responses: "204": description: Transcription was successfully requested. @@ -3962,63 +3962,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 +4032,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 +4064,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 +4141,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 +4181,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 +4258,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 +4313,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 +4383,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 +4429,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 +4506,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 +4533,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 +4589,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 +4645,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: @@ -4707,16 +4707,16 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/createLookupRequest' + $ref: "#/components/requestBodies/createLookupRequest" responses: "202": content: application/json: examples: lookupResponseExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: '#/components/schemas/createLookupResponse' + $ref: "#/components/schemas/createLookupResponse" description: Accepted "400": content: @@ -4727,7 +4727,7 @@ paths: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request "401": content: @@ -4738,7 +4738,7 @@ paths: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized "403": content: @@ -4753,7 +4753,7 @@ paths: requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden "415": content: @@ -4764,7 +4764,7 @@ paths: value: message: Content-Type must be application/json. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unsupported Media Type "429": content: @@ -4775,7 +4775,7 @@ paths: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests "500": content: @@ -4786,7 +4786,7 @@ paths: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error summary: Create Lookup tags: @@ -4826,19 +4826,19 @@ paths: application/json: examples: lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" lookupSingleNumberCompleteExample: - $ref: '#/components/examples/lookupSingleNumberCompleteExample' + $ref: "#/components/examples/lookupSingleNumberCompleteExample" lookupMultipleNumbersCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" lookupMultipleNumbersPartialCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" lookupSingleNumberCompleteNoInfoExample: - $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' + $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" schema: - $ref: '#/components/schemas/lookupStatus' + $ref: "#/components/schemas/lookupStatus" description: OK "400": content: @@ -4849,7 +4849,7 @@ paths: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request "401": content: @@ -4860,7 +4860,7 @@ paths: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized "403": content: @@ -4875,7 +4875,7 @@ paths: requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden "404": description: Not Found @@ -4888,7 +4888,7 @@ paths: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests "500": content: @@ -4899,7 +4899,7 @@ paths: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error summary: Get Lookup Request Status tags: @@ -4913,7 +4913,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: @@ -4927,7 +4927,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' + $ref: "#/components/requestBodies/requestTollFreeVerificationRequest" responses: "202": description: Accepted @@ -4942,7 +4942,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: @@ -4951,7 +4951,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: @@ -4960,7 +4960,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: @@ -4969,7 +4969,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: @@ -4978,7 +4978,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: @@ -4987,7 +4987,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: @@ -4996,7 +4996,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: @@ -5028,7 +5028,7 @@ paths: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple responses: "204": @@ -5040,7 +5040,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5049,7 +5049,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: @@ -5058,7 +5058,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: @@ -5067,7 +5067,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: @@ -5076,7 +5076,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: @@ -5085,7 +5085,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: @@ -5094,7 +5094,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: @@ -5103,7 +5103,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: @@ -5132,14 +5132,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: @@ -5148,7 +5148,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5157,7 +5157,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: @@ -5166,7 +5166,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: @@ -5175,7 +5175,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: @@ -5184,7 +5184,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: @@ -5193,7 +5193,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: @@ -5202,7 +5202,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: @@ -5211,7 +5211,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: @@ -5221,7 +5221,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). @@ -5243,10 +5243,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 @@ -5261,7 +5261,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: @@ -5270,7 +5270,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: @@ -5279,7 +5279,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: @@ -5288,7 +5288,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: @@ -5297,7 +5297,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: @@ -5306,7 +5306,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: @@ -5315,7 +5315,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: @@ -5347,7 +5347,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionsListBody' + $ref: "#/components/schemas/webhookSubscriptionsListBody" description: OK "400": content: @@ -5360,7 +5360,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: @@ -5369,7 +5369,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: @@ -5378,7 +5378,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: @@ -5387,7 +5387,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: @@ -5396,7 +5396,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: @@ -5405,7 +5405,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: @@ -5414,7 +5414,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: @@ -5438,13 +5438,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: @@ -5453,7 +5453,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5462,7 +5462,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: @@ -5471,7 +5471,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: @@ -5480,7 +5480,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: @@ -5489,7 +5489,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: @@ -5498,7 +5498,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: @@ -5507,7 +5507,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: @@ -5516,7 +5516,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: @@ -5560,7 +5560,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5569,7 +5569,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: @@ -5578,7 +5578,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: @@ -5587,7 +5587,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: @@ -5596,7 +5596,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: @@ -5605,7 +5605,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: @@ -5614,7 +5614,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: @@ -5623,7 +5623,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: @@ -5654,13 +5654,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: @@ -5669,7 +5669,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5678,7 +5678,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: @@ -5687,7 +5687,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: @@ -5696,7 +5696,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: @@ -5705,7 +5705,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: @@ -5714,7 +5714,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: @@ -5723,7 +5723,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: @@ -5732,7 +5732,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: @@ -5752,7 +5752,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/useCases' + $ref: "#/components/schemas/useCases" description: OK "400": content: @@ -5761,7 +5761,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5770,7 +5770,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: @@ -5779,7 +5779,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: @@ -5788,7 +5788,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: @@ -5797,7 +5797,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: @@ -5806,7 +5806,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: @@ -5815,7 +5815,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: @@ -5824,7 +5824,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: @@ -5844,11 +5844,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\ @@ -5872,17 +5872,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. @@ -5914,7 +5914,7 @@ components: type: string style: simple requestBody: - $ref: '#/components/requestBodies/verificationWebhookRequest' + $ref: "#/components/requestBodies/verificationWebhookRequest" responses: "204": description: No Content @@ -5925,7 +5925,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5934,7 +5934,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: @@ -5943,7 +5943,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: @@ -5952,7 +5952,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: @@ -5961,7 +5961,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: @@ -5970,7 +5970,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: @@ -5979,7 +5979,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: @@ -5988,7 +5988,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: @@ -6399,7 +6399,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. @@ -6408,7 +6408,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 @@ -6429,7 +6429,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. @@ -6503,7 +6503,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. @@ -6858,7 +6858,7 @@ components: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple webhookSubscriptionIdPathParam: description: Webhook subscription ID @@ -6875,13 +6875,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: @@ -7082,14 +7082,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 @@ -7119,19 +7119,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: @@ -7152,20 +7152,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 createLookupRequest: @@ -7173,25 +7173,25 @@ 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/lookupRequest' + $ref: "#/components/schemas/lookupRequest" description: 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: @@ -7199,17 +7199,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 @@ -7218,19 +7218,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: @@ -7245,7 +7245,7 @@ components: application/json: schema: items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" type: array description: OK headers: @@ -7259,61 +7259,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: @@ -7328,7 +7328,7 @@ components: source: field: "channelList[0].from" schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Bad Request multiChannelNotAcceptableError: description: Not Acceptable @@ -7343,7 +7343,7 @@ components: description: Authentication Failed source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unauthorized multiChannelForbiddenError: content: @@ -7356,7 +7356,7 @@ components: description: Access Denied source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Forbidden multiChannelNotFoundError: content: @@ -7369,7 +7369,7 @@ components: description: Resource not found. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Not Found multiChannelMethodNotAllowedError: content: @@ -7382,7 +7382,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: @@ -7397,7 +7397,7 @@ components: source: header: Content-Type schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unsupported Media Type multiChannelTooManyRequestsError: content: @@ -7411,7 +7411,7 @@ components: retry later. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Too Many Requests multiChannelInternalServerError: content: @@ -7424,16 +7424,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: @@ -7446,7 +7446,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" description: OK updateCallResponse: description: OK @@ -7455,14 +7455,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 @@ -7471,14 +7471,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: @@ -7495,19 +7495,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 @@ -7516,109 +7516,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: @@ -7632,85 +7632,85 @@ 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 createLookupResponse: content: application/json: examples: lookupResponseExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: '#/components/schemas/createLookupResponse' + $ref: "#/components/schemas/createLookupResponse" description: Accepted getLookupResponse: content: application/json: examples: lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" lookupSingleNumberCompleteExample: - $ref: '#/components/examples/lookupSingleNumberCompleteExample' + $ref: "#/components/examples/lookupSingleNumberCompleteExample" lookupMultipleNumbersCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" lookupMultipleNumbersPartialCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" lookupSingleNumberCompleteNoInfoExample: - $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' + $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" schema: - $ref: '#/components/schemas/lookupStatus' + $ref: "#/components/schemas/lookupStatus" description: OK tnLookupBadRequestError: content: @@ -7721,7 +7721,7 @@ components: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request tnLookupUnauthorizedError: content: @@ -7732,7 +7732,7 @@ components: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized tnLookupForbiddenError: content: @@ -7747,7 +7747,7 @@ components: of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden tnLookupMediaTypeError: content: @@ -7758,7 +7758,7 @@ components: value: message: Content-Type must be application/json. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unsupported Media Type tnLookupNotFoundError: description: Not Found @@ -7771,7 +7771,7 @@ components: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests tnLookupInternalServerError: content: @@ -7782,37 +7782,37 @@ components: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error 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: @@ -7821,7 +7821,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 @@ -7835,7 +7835,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: @@ -7844,7 +7844,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: @@ -7853,7 +7853,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: @@ -7862,7 +7862,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: @@ -7871,7 +7871,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: @@ -7880,7 +7880,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: @@ -7889,7 +7889,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: @@ -7898,7 +7898,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable schemas: applicationId: @@ -8043,10 +8043,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 @@ -8093,11 +8093,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. @@ -8239,7 +8239,7 @@ components: type: string fieldErrors: items: - $ref: '#/components/schemas/fieldError' + $ref: "#/components/schemas/fieldError" type: array required: - description @@ -8330,7 +8330,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: @@ -8365,7 +8365,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\ @@ -8426,7 +8426,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\ @@ -8583,14 +8583,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: @@ -8616,7 +8616,7 @@ components: links: example: [] items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" type: array data: nullable: true @@ -8624,7 +8624,7 @@ components: example: null errors: items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" type: array type: object link: @@ -8651,7 +8651,7 @@ components: description: A detailed explanation of the error. type: string source: - $ref: '#/components/schemas/errorSource' + $ref: "#/components/schemas/errorSource" required: - description - source @@ -8738,7 +8738,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: @@ -8790,11 +8790,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: @@ -8814,27 +8814,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: @@ -8860,16 +8860,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: @@ -8905,14 +8905,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: @@ -8946,7 +8946,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 @@ -8968,7 +8968,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. @@ -8980,7 +8980,7 @@ components: type: object rbmActionViewLocation: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: latitude: description: The latitude of the location. @@ -9004,7 +9004,7 @@ components: type: object multiChannelActionCalendarEvent: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: title: description: The title of the event. @@ -9034,7 +9034,7 @@ components: type: object rbmActionOpenUrl: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: url: description: The URL to open in browser. @@ -9049,25 +9049,25 @@ 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: 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 oneOf: - - $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" multiChannelChannelListObject: properties: from: @@ -9081,9 +9081,9 @@ components: example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: "#/components/schemas/multiChannelMessageChannelEnum" content: - $ref: '#/components/schemas/multiChannelChannelListObject_content' + $ref: "#/components/schemas/multiChannelChannelListObject_content" required: - applicationId - channel @@ -9102,7 +9102,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: '#/components/schemas/multiChannelChannelListObject' + $ref: "#/components/schemas/multiChannelChannelListObject" maxItems: 4 type: array tag: @@ -9112,7 +9112,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\ @@ -9255,7 +9255,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: @@ -9269,7 +9269,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: '#/components/schemas/multiChannelMessageResponseData_channelList_inner' + $ref: "#/components/schemas/multiChannelMessageResponseData_channelList_inner" maxItems: 4 type: array tag: @@ -9279,7 +9279,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\ @@ -9300,7 +9300,7 @@ components: text: type: string media: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" type: object rbmSuggestionResponse: properties: @@ -9337,17 +9337,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 @@ -9364,7 +9364,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. @@ -9376,7 +9376,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 @@ -9403,7 +9403,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\ @@ -9415,7 +9415,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\ @@ -9485,7 +9485,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: @@ -9518,9 +9518,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 @@ -9533,14 +9533,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 @@ -9704,7 +9704,7 @@ components: maxLength: 2048 type: string answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -9729,7 +9729,7 @@ components: nullable: true type: string answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -9751,7 +9751,7 @@ components: nullable: true type: string disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" callTimeout: default: 30 description: |- @@ -9778,7 +9778,7 @@ components: nullable: true type: number machineDetection: - $ref: '#/components/schemas/machineDetectionConfiguration' + $ref: "#/components/schemas/machineDetectionConfiguration" priority: default: 5 description: |- @@ -9885,14 +9885,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 @@ -9900,7 +9900,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 @@ -10000,7 +10000,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 @@ -10107,7 +10107,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 @@ -10121,7 +10121,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10143,7 +10143,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10175,7 +10175,7 @@ components: updateCallRecording: properties: state: - $ref: '#/components/schemas/recordingStateEnum' + $ref: "#/components/schemas/recordingStateEnum" required: - state type: object @@ -10267,7 +10267,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. @@ -10285,7 +10285,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',\ @@ -10303,7 +10303,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 @@ -10360,7 +10360,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. @@ -10372,14 +10372,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) @@ -10390,7 +10390,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10413,7 +10413,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10566,7 +10566,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',\ @@ -10596,7 +10596,7 @@ components: \ need more information." properties: mode: - $ref: '#/components/schemas/machineDetectionModeEnum' + $ref: "#/components/schemas/machineDetectionModeEnum" detectionTimeout: default: 15 description: |- @@ -10663,7 +10663,7 @@ components: nullable: true type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10687,7 +10687,7 @@ components: nullable: true type: string fallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10713,7 +10713,7 @@ components: format: uri type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10764,7 +10764,7 @@ components: properties: transcripts: items: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" type: array type: object callTranscriptionMetadataList: @@ -10773,7 +10773,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: @@ -10823,15 +10823,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. @@ -10931,7 +10931,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 @@ -10966,7 +10966,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\ @@ -11010,7 +11010,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 @@ -11104,7 +11104,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 @@ -11427,7 +11427,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. @@ -11493,7 +11493,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 @@ -11590,7 +11590,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" @@ -11680,7 +11680,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 @@ -11723,7 +11723,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,\ @@ -11783,7 +11783,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 @@ -11799,9 +11799,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\ @@ -11852,7 +11852,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 +11887,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\ @@ -11930,7 +11930,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 @@ -11985,7 +11985,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. @@ -12048,7 +12048,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 @@ -12097,7 +12097,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. @@ -12169,7 +12169,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 @@ -12259,7 +12259,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 @@ -12308,7 +12308,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." @@ -12316,7 +12316,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)." @@ -12372,7 +12372,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 @@ -12459,7 +12459,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 @@ -12565,7 +12565,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 @@ -12709,7 +12709,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." @@ -13068,7 +13068,7 @@ components: description: The phone number lookup request ID from Bandwidth. type: string status: - $ref: '#/components/schemas/lookupStatusEnum' + $ref: "#/components/schemas/lookupStatusEnum" type: object lookupStatus: description: "If requestId exists, the result for that request is returned.\ @@ -13106,12 +13106,12 @@ components: example: 004223a0-8b17-41b1-bf81-20732adf5590 type: string status: - $ref: '#/components/schemas/lookupStatusEnum' + $ref: "#/components/schemas/lookupStatusEnum" result: description: The carrier information results for the specified telephone number. items: - $ref: '#/components/schemas/lookupResult' + $ref: "#/components/schemas/lookupResult" type: array failedTelephoneNumbers: description: The telephone numbers whose lookup failed. @@ -13332,9 +13332,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 @@ -13343,7 +13343,7 @@ components: type: integer phoneNumbers: items: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" maxItems: 10 minItems: 1 type: array @@ -13368,7 +13368,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13406,9 +13406,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. @@ -13432,9 +13432,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 @@ -13462,7 +13462,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13500,9 +13500,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. @@ -13539,7 +13539,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\ @@ -13620,7 +13620,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. @@ -13681,7 +13681,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. @@ -13704,7 +13704,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. @@ -13725,7 +13725,7 @@ components: tfvSubmissionWrapper: properties: submission: - $ref: '#/components/schemas/verificationUpdateRequest' + $ref: "#/components/schemas/verificationUpdateRequest" type: object address: example: @@ -13983,14 +13983,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 @@ -14032,7 +14032,7 @@ components: type: string telephoneNumbers: items: - $ref: '#/components/schemas/telephoneNumber' + $ref: "#/components/schemas/telephoneNumber" type: array type: object telephoneNumber: @@ -14083,9 +14083,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 @@ -14186,7 +14186,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 @@ -14216,7 +14216,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. @@ -14263,9 +14263,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 @@ -14293,7 +14293,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -14331,9 +14331,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: @@ -14353,24 +14353,24 @@ 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 multiChannelChannelListObject_content: description: The content of the message. oneOf: - - $ref: '#/components/schemas/rbmMessageContentText' - - $ref: '#/components/schemas/rbmMessageMedia' - - $ref: '#/components/schemas/rbmMessageContentRichCard' - - $ref: '#/components/schemas/smsMessageContent' - - $ref: '#/components/schemas/mmsMessageContent' + - $ref: "#/components/schemas/rbmMessageContentText" + - $ref: "#/components/schemas/rbmMessageMedia" + - $ref: "#/components/schemas/rbmMessageContentRichCard" + - $ref: "#/components/schemas/smsMessageContent" + - $ref: "#/components/schemas/mmsMessageContent" multiChannelMessageResponseData_channelList_inner: allOf: - - $ref: '#/components/schemas/multiChannelChannelListObject' + - $ref: "#/components/schemas/multiChannelChannelListObject" - properties: owner: description: The Bandwidth senderId associated with the message. Identical diff --git a/build.gradle b/build.gradle index 315cc285..c3b2b6eb 100644 --- a/build.gradle +++ b/build.gradle @@ -106,15 +106,14 @@ 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.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' + implementation 'org.openapitools:jackson-databind-nullable:0.2.7' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.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 5ddc6450..ce297443 100644 --- a/build.sbt +++ b/build.sbt @@ -3,19 +3,19 @@ lazy val root = (project in file(".")). organization := "com.bandwidth.sdk", name := "bandwidth-sdk", version := "1.0.0", - scalaVersion := "2.11.4", + scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := 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.17.0", + "org.apache.commons" % "commons-lang3" % "3.18.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "org.openapitools" % "jackson-databind-nullable" % "0.2.7", "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/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index 6323da6f..0b626836 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -5,13 +5,13 @@ ## Enum -* `SENDING` (value: `"message-sending"`) +* `MESSAGE_SENDING` (value: `"message-sending"`) -* `DELIVERED` (value: `"message-delivered"`) +* `MESSAGE_DELIVERED` (value: `"message-delivered"`) -* `FAILED` (value: `"message-failed"`) +* `MESSAGE_FAILED` (value: `"message-failed"`) -* `READ` (value: `"message-read"`) +* `MESSAGE_READ` (value: `"message-read"`) diff --git a/openapitools.json b/openapitools.json index f8d07ce1..8244df42 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.10.0" + "version": "7.16.0" } } diff --git a/src/main/java/com/bandwidth/sdk/ApiClient.java b/src/main/java/com/bandwidth/sdk/ApiClient.java index c2710180..63401aa2 100644 --- a/src/main/java/com/bandwidth/sdk/ApiClient.java +++ b/src/main/java/com/bandwidth/sdk/ApiClient.java @@ -61,7 +61,7 @@ */ public class ApiClient { - private String basePath = "http://localhost"; + protected String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( "", @@ -71,26 +71,26 @@ public class ApiClient { )); protected Integer serverIndex = 0; protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; + protected boolean debugging = false; + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String tempFolderPath = null; - private Map authentications; + protected Map authentications; - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; + protected DateFormat dateFormat; + protected DateFormat datetimeFormat; + protected boolean lenientDatetimeFormat; + protected int dateLength; - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; + protected InputStream sslCaCert; + protected boolean verifyingSsl; + protected KeyManager[] keyManagers; - private OkHttpClient httpClient; - private JSON json; + protected OkHttpClient httpClient; + protected JSON json; - private HttpLoggingInterceptor loggingInterceptor; + protected HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient @@ -121,11 +121,11 @@ public ApiClient(OkHttpClient client) { authentications = Collections.unmodifiableMap(authentications); } - private void initHttpClient() { + protected void initHttpClient() { initHttpClient(Collections.emptyList()); } - private void initHttpClient(List interceptors) { + protected void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); for (Interceptor interceptor: interceptors) { @@ -135,7 +135,7 @@ private void initHttpClient(List interceptors) { httpClient = builder.build(); } - private void init() { + protected void init() { verifyingSsl = true; json = new JSON(); @@ -158,8 +158,8 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g http://localhost - * @return An instance of OkHttpClient + * @param basePath Base path of the URL (e.g http://localhost) + * @return An instance of ApiClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; @@ -207,7 +207,7 @@ public OkHttpClient getHttpClient() { * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient - * @return Api Client + * @return ApiClient * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { @@ -695,7 +695,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 +802,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); + return filename.replaceFirst("^.*[/\\\\]", ""); } /** @@ -912,17 +912,8 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - 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)) { + ResponseBody respBody = response.body(); + if (respBody == null) { return null; } @@ -931,17 +922,25 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - 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( + 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( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - respBody); + response.body().string()); + } + } catch (IOException e) { + throw new ApiException(e); } } @@ -1268,7 +1267,8 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + Locale.ROOT, + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); @@ -1340,11 +1340,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("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } } } @@ -1437,7 +1437,7 @@ public String guessContentTypeFromFile(File file) { * @param key The key of the Header element * @param file The file to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + protected 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 +1450,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * @param key The key of the Header element * @param obj The complex object to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + protected 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 +1472,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ - private Interceptor getProgressInterceptor() { + protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1493,7 +1493,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException { * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ - private void applySslSettings() { + protected void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; @@ -1555,7 +1555,7 @@ public boolean verify(String hostname, SSLSession session) { } } - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1572,7 +1572,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * @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 */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { + protected 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 1bb97746..224b7e95 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -15,13 +15,14 @@ import java.util.Map; import java.util.List; +import java.util.Locale; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -161,7 +162,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + return String.format(Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); } } diff --git a/src/main/java/com/bandwidth/sdk/Configuration.java b/src/main/java/com/bandwidth/sdk/Configuration.java index 57fcf592..9f6ba07e 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -13,29 +13,51 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +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.16.0") public class Configuration { - 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; - } + public static final String VERSION = "1.0.0"; + + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; - /** - * 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; + /** + * 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(); + }); } -} + 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 diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 90740687..1e4c3dae 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -27,8 +27,11 @@ 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; @@ -69,8 +72,6 @@ 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")); @@ -86,11 +87,6 @@ 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")); @@ -320,6 +316,28 @@ public static 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 a04697ce..50857528 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,45 +13,25 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Pair { - private String name = ""; - private String value = ""; + private final String name; + private final String value; - public Pair (String name, String value) { - setName(name); - setValue(value); - } + public Pair(String name, String value) { + this.name = isValidString(name) ? name : ""; + this.value = isValidString(value) ? value : ""; + } - private void setName(String name) { - if (!isValidString(name)) { - return; - } + public String getName() { + return this.name; + } - this.name = name; - } + public String getValue() { + return this.value; + } - 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; - } + private static boolean isValidString(String arg) { + return arg != null; + } } diff --git a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java index c74fbd03..34225b69 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 beaab482..300fe0f3 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 6ef9eb8c..599cf3a2 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 c80844d8..fbf70f46 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(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -145,7 +145,7 @@ public okhttp3.Call createCallCall(String accountId, CreateCall createCall, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, CreateCall c 500 Internal Server Error - */ - public CreateCallResponse createCall(String accountId, CreateCall createCall) throws ApiException { + public CreateCallResponse createCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall) throws ApiException { ApiResponse localVarResp = createCallWithHttpInfo(accountId, createCall); return localVarResp.getData(); } @@ -209,7 +209,7 @@ public CreateCallResponse createCall(String accountId, CreateCall createCall) th 500 Internal Server Error - */ - public ApiResponse createCallWithHttpInfo(String accountId, CreateCall createCall) throws ApiException { + public ApiResponse createCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, 500 Internal Server Error - */ - public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, CreateCall createCall, fin 500 Internal Server Error - */ - public okhttp3.Call getCallStateCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -314,7 +314,7 @@ public okhttp3.Call getCallStateCall(String accountId, String callId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String cal 500 Internal Server Error - */ - public CallState getCallState(String accountId, String callId) throws ApiException { + public CallState getCallState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse localVarResp = getCallStateWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -378,7 +378,7 @@ public CallState getCallState(String accountId, String callId) throws ApiExcepti 500 Internal Server Error - */ - public ApiResponse getCallStateWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse getCallStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String 500 Internal Server Error - */ - public okhttp3.Call getCallStateAsync(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String callId, final Api 500 Internal Server Error - */ - 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 { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -516,7 +516,7 @@ public okhttp3.Call listCallsCall(String accountId, String to, String from, Stri } @SuppressWarnings("rawtypes") - 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 { + 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 { // 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(String accountId, String to, St 500 Internal Server Error - */ - public List listCalls(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { + 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 { ApiResponse> localVarResp = listCallsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken); return localVarResp.getData(); } @@ -587,7 +587,7 @@ public List listCalls(String accountId, String to, String from, Strin 500 Internal Server Error - */ - public ApiResponse> listCallsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { + 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 { 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(String accountId, Stri 500 Internal Server Error - */ - 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 { + 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 { 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(String accountId, String to, String from, Str 500 Internal Server Error - */ - public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -701,7 +701,7 @@ public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall u } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callI 500 Internal Server Error - */ - public void updateCall(String accountId, String callId, UpdateCall updateCall) throws ApiException { + public void updateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { updateCallWithHttpInfo(accountId, callId, updateCall); } @@ -772,7 +772,7 @@ public void updateCall(String accountId, String callId, UpdateCall updateCall) t 500 Internal Server Error - */ - public ApiResponse updateCallWithHttpInfo(String accountId, String callId, UpdateCall updateCall) throws ApiException { + public ApiResponse updateCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { okhttp3.Call localVarCall = updateCallValidateBeforeCall(accountId, callId, updateCall, null); return localVarApiClient.execute(localVarCall); } @@ -802,7 +802,7 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, 500 Internal Server Error - */ - public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, UpdateCall 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -880,7 +880,7 @@ public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String b } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String c 500 Internal Server Error - */ - public void updateCallBxml(String accountId, String callId, String body) throws ApiException { + public void updateCallBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { updateCallBxmlWithHttpInfo(accountId, callId, body); } @@ -951,7 +951,7 @@ public void updateCallBxml(String accountId, String callId, String body) throws 500 Internal Server Error - */ - public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String callId, String body) throws ApiException { + public ApiResponse updateCallBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { okhttp3.Call localVarCall = updateCallBxmlValidateBeforeCall(accountId, callId, body, null); return localVarApiClient.execute(localVarCall); } @@ -981,7 +981,7 @@ public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String cal 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlAsync(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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 aaf24a61..02951333 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(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -151,7 +151,7 @@ public okhttp3.Call downloadConferenceRecordingCall(String accountId, String con } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accoun 500 Internal Server Error - */ - public File downloadConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { + public File downloadConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = downloadConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -222,7 +222,7 @@ public File downloadConferenceRecording(String accountId, String conferenceId, S 500 Internal Server Error - */ - public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { + public ApiResponse downloadConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountI 500 Internal Server Error - */ - public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String co 500 Internal Server Error - */ - public okhttp3.Call getConferenceCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -328,7 +328,7 @@ public okhttp3.Call getConferenceCall(String accountId, String conferenceId, fin } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String co 500 Internal Server Error - */ - public Conference getConference(String accountId, String conferenceId) throws ApiException { + public Conference getConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { ApiResponse localVarResp = getConferenceWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -392,7 +392,7 @@ public Conference getConference(String accountId, String conferenceId) throws Ap 500 Internal Server Error - */ - public ApiResponse getConferenceWithHttpInfo(String accountId, String conferenceId) throws ApiException { + public ApiResponse getConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, Strin 500 Internal Server Error - */ - public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String conferenceId, fi 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -499,7 +499,7 @@ public okhttp3.Call getConferenceMemberCall(String accountId, String conferenceI } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceMemberValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, Str 500 Internal Server Error - */ - public ConferenceMember getConferenceMember(String accountId, String conferenceId, String memberId) throws ApiException { + public ConferenceMember getConferenceMember(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId) throws ApiException { ApiResponse localVarResp = getConferenceMemberWithHttpInfo(accountId, conferenceId, memberId); return localVarResp.getData(); } @@ -570,7 +570,7 @@ public ConferenceMember getConferenceMember(String accountId, String conferenceI 500 Internal Server Error - */ - public ApiResponse getConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId) throws ApiException { + public ApiResponse getConferenceMemberWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String acco 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberAsync(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String conference 500 Internal Server Error - */ - public okhttp3.Call getConferenceRecordingCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -678,7 +678,7 @@ public okhttp3.Call getConferenceRecordingCall(String accountId, String conferen } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, 500 Internal Server Error - */ - public ConferenceRecordingMetadata getConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { + public ConferenceRecordingMetadata getConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -749,7 +749,7 @@ public ConferenceRecordingMetadata getConferenceRecording(String accountId, Stri 500 Internal Server Error - */ - public ApiResponse getConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { + public ApiResponse getConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String confere 500 Internal Server Error - */ - public okhttp3.Call listConferenceRecordingsCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -855,7 +855,7 @@ public okhttp3.Call listConferenceRecordingsCall(String accountId, String confer } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listConferenceRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId 500 Internal Server Error - */ - public List listConferenceRecordings(String accountId, String conferenceId) throws ApiException { + public List listConferenceRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { ApiResponse> localVarResp = listConferenceRecordingsWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -919,7 +919,7 @@ public List listConferenceRecordings(String account 500 Internal Server Error - */ - public ApiResponse> listConferenceRecordingsWithHttpInfo(String accountId, String conferenceId) throws ApiException { + public ApiResponse> listConferenceRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String conferenceId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String confe 500 Internal Server Error - */ - public okhttp3.Call listConferencesCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1047,7 +1047,7 @@ public okhttp3.Call listConferencesCall(String accountId, String name, String mi } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + 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 { // 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(String accountId, String 500 Internal Server Error - */ - public List listConferences(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { + 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 { ApiResponse> localVarResp = listConferencesWithHttpInfo(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken); return localVarResp.getData(); } @@ -1114,7 +1114,7 @@ public List listConferences(String accountId, String name, String mi 500 Internal Server Error - */ - public ApiResponse> listConferencesWithHttpInfo(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { + 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 { 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(String accountI 500 Internal Server Error - */ - public okhttp3.Call listConferencesAsync(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { + 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 { okhttp3.Call localVarCall = listConferencesValidateBeforeCall(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1177,7 +1177,7 @@ public okhttp3.Call listConferencesAsync(String accountId, String name, String m 500 Internal Server Error - */ - public okhttp3.Call updateConferenceCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1225,7 +1225,7 @@ public okhttp3.Call updateConferenceCall(String accountId, String conferenceId, } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceValidateBeforeCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String 500 Internal Server Error - */ - public void updateConference(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { + public void updateConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { updateConferenceWithHttpInfo(accountId, conferenceId, updateConference); } @@ -1294,7 +1294,7 @@ public void updateConference(String accountId, String conferenceId, UpdateConfer 500 Internal Server Error - */ - public ApiResponse updateConferenceWithHttpInfo(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { + public ApiResponse updateConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { okhttp3.Call localVarCall = updateConferenceValidateBeforeCall(accountId, conferenceId, updateConference, null); return localVarApiClient.execute(localVarCall); } @@ -1323,7 +1323,7 @@ public ApiResponse updateConferenceWithHttpInfo(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String conferenceId, 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1400,7 +1400,7 @@ public okhttp3.Call updateConferenceBxmlCall(String accountId, String conference } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceBxmlValidateBeforeCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, St 500 Internal Server Error - */ - public void updateConferenceBxml(String accountId, String conferenceId, String body) throws ApiException { + public void updateConferenceBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { updateConferenceBxmlWithHttpInfo(accountId, conferenceId, body); } @@ -1469,7 +1469,7 @@ public void updateConferenceBxml(String accountId, String conferenceId, String b 500 Internal Server Error - */ - public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, String conferenceId, String body) throws ApiException { + public ApiResponse updateConferenceBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { okhttp3.Call localVarCall = updateConferenceBxmlValidateBeforeCall(accountId, conferenceId, body, null); return localVarApiClient.execute(localVarCall); } @@ -1498,7 +1498,7 @@ public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull 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(String accountId, String conferenc 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1577,7 +1577,7 @@ public okhttp3.Call updateConferenceMemberCall(String accountId, String conferen } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + 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 { // 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(String accountId, 500 Internal Server Error - */ - public void updateConferenceMember(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { + 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 { updateConferenceMemberWithHttpInfo(accountId, conferenceId, memberId, updateConferenceMember); } @@ -1653,7 +1653,7 @@ public void updateConferenceMember(String accountId, String conferenceId, String 500 Internal Server Error - */ - public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { + 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 { okhttp3.Call localVarCall = updateConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, updateConferenceMember, null); return localVarApiClient.execute(localVarCall); } @@ -1683,7 +1683,7 @@ public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, St 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberAsync(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + 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 { 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 e98cfb3b..d0e2cf9d 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(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -143,7 +143,7 @@ public okhttp3.Call deleteMediaCall(String accountId, String mediaId, final ApiC } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String medi 500 Internal Server Error - */ - public void deleteMedia(String accountId, String mediaId) throws ApiException { + public void deleteMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { deleteMediaWithHttpInfo(accountId, mediaId); } @@ -205,7 +205,7 @@ public void deleteMedia(String accountId, String mediaId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { + public ApiResponse deleteMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { okhttp3.Call localVarCall = deleteMediaValidateBeforeCall(accountId, mediaId, null); return localVarApiClient.execute(localVarCall); } @@ -233,7 +233,7 @@ public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaI 500 Internal Server Error - */ - public okhttp3.Call deleteMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String mediaId, final Api 500 Internal Server Error - */ - public okhttp3.Call getMediaCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -309,7 +309,7 @@ public okhttp3.Call getMediaCall(String accountId, String mediaId, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call getMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String mediaId 500 Internal Server Error - */ - public File getMedia(String accountId, String mediaId) throws ApiException { + public File getMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { ApiResponse localVarResp = getMediaWithHttpInfo(accountId, mediaId); return localVarResp.getData(); } @@ -373,7 +373,7 @@ public File getMedia(String accountId, String mediaId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse getMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { + public ApiResponse getMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String mediaId) 500 Internal Server Error - */ - public okhttp3.Call getMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String mediaId, final ApiCal 500 Internal Server Error - */ - public okhttp3.Call listMediaCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -482,7 +482,7 @@ public okhttp3.Call listMediaCall(String accountId, String continuationToken, fi } @SuppressWarnings("rawtypes") - private okhttp3.Call listMediaValidateBeforeCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable 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(String accountId, String contin 500 Internal Server Error - */ - public List listMedia(String accountId, String continuationToken) throws ApiException { + public List listMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken) throws ApiException { ApiResponse> localVarResp = listMediaWithHttpInfo(accountId, continuationToken); return localVarResp.getData(); } @@ -541,7 +541,7 @@ public List listMedia(String accountId, String continuationToken) throws 500 Internal Server Error - */ - public ApiResponse> listMediaWithHttpInfo(String accountId, String continuationToken) throws ApiException { + public ApiResponse> listMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable 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(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call listMediaAsync(String accountId, String continuationToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable 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(String accountId, String continuationToken, f 500 Internal Server Error - */ - public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -707,7 +707,7 @@ public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body, } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadMediaValidateBeforeCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + 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 { // 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(String accountId, String medi 500 Internal Server Error - */ - public void uploadMedia(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { + 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 { uploadMediaWithHttpInfo(accountId, mediaId, body, contentType, cacheControl); } @@ -780,7 +780,7 @@ public void uploadMedia(String accountId, String mediaId, File body, String cont 500 Internal Server Error - */ - public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { + 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 { okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(accountId, mediaId, body, contentType, cacheControl, null); return localVarApiClient.execute(localVarCall); } @@ -811,7 +811,7 @@ public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaI 500 Internal Server Error - */ - public okhttp3.Call uploadMediaAsync(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + 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 { 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 c20261ed..3f438b59 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(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -150,7 +150,7 @@ public okhttp3.Call createMessageCall(String accountId, MessageRequest messageRe } @SuppressWarnings("rawtypes") - private okhttp3.Call createMessageValidateBeforeCall(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, MessageRe 500 Internal Server Error - */ - public Message createMessage(String accountId, MessageRequest messageRequest) throws ApiException { + public Message createMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest) throws ApiException { ApiResponse localVarResp = createMessageWithHttpInfo(accountId, messageRequest); return localVarResp.getData(); } @@ -216,7 +216,7 @@ public Message createMessage(String accountId, MessageRequest messageRequest) th 500 Internal Server Error - */ - public ApiResponse createMessageWithHttpInfo(String accountId, MessageRequest messageRequest) throws ApiException { + public ApiResponse createMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, MessageR 500 Internal Server Error - */ - public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, MessageRequest messageR 500 Internal Server Error - */ - public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String 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 { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -454,7 +454,7 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String 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 { + 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 { // 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(String accountId, String mes 500 Internal Server Error - */ - public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String 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 { + 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 { 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(String accountId, String messageId, String sour 500 Internal Server Error - */ - public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String 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 { + 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 { 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(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String 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 { + 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 { 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 d13c9a70..453d09d4 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(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -144,7 +144,7 @@ public okhttp3.Call generateMessagingCodeCall(String accountId, CodeRequest code } @SuppressWarnings("rawtypes") - private okhttp3.Call generateMessagingCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateMessagingCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, C 500 Internal Server Error - */ - public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest codeRequest) throws ApiException { + public MessagingCodeResponse generateMessagingCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateMessagingCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -200,7 +200,7 @@ public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest 500 Internal Server Error - */ - public ApiResponse generateMessagingCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { + public ApiResponse generateMessagingCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(Stri 500 Internal Server Error - */ - public okhttp3.Call generateMessagingCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, CodeRequest cod 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -297,7 +297,7 @@ public okhttp3.Call generateVoiceCodeCall(String accountId, CodeRequest codeRequ } @SuppressWarnings("rawtypes") - private okhttp3.Call generateVoiceCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateVoiceCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, CodeR 500 Internal Server Error - */ - public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeRequest) throws ApiException { + public VoiceCodeResponse generateVoiceCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateVoiceCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -353,7 +353,7 @@ public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeReq 500 Internal Server Error - */ - public ApiResponse generateVoiceCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { + public ApiResponse generateVoiceCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accou 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, CodeRequest codeReq 500 Internal Server Error - */ - public okhttp3.Call verifyCodeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -451,7 +451,7 @@ public okhttp3.Call verifyCodeCall(String accountId, VerifyCodeRequest verifyCod } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyCodeValidateBeforeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, VerifyCodeRe 500 Internal Server Error - */ - public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { + public VerifyCodeResponse verifyCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest) throws ApiException { ApiResponse localVarResp = verifyCodeWithHttpInfo(accountId, verifyCodeRequest); return localVarResp.getData(); } @@ -509,7 +509,7 @@ public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyC 500 Internal Server Error - */ - public ApiResponse verifyCodeWithHttpInfo(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { + public ApiResponse verifyCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, 500 Internal Server Error - */ - public okhttp3.Call verifyCodeAsync(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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 e7768696..7ac63f0f 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(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -144,7 +144,7 @@ public okhttp3.Call createMultiChannelMessageCall(String accountId, MultiChannel } @SuppressWarnings("rawtypes") - private okhttp3.Call createMultiChannelMessageValidateBeforeCall(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMultiChannelMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountI 500 Internal Server Error - */ - public CreateMultiChannelMessageResponse createMultiChannelMessage(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public CreateMultiChannelMessageResponse createMultiChannelMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { ApiResponse localVarResp = createMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); return localVarResp.getData(); } @@ -210,7 +210,7 @@ public CreateMultiChannelMessageResponse createMultiChannelMessage(String accoun 500 Internal Server Error - */ - public ApiResponse createMultiChannelMessageWithHttpInfo(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public ApiResponse createMultiChannelMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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 11ff5ab2..6068c92b 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -95,7 +95,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; @@ -142,7 +142,7 @@ public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupReque } @SuppressWarnings("rawtypes") - private okhttp3.Call createLookupValidateBeforeCall(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, 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 createLookup(Async)"); @@ -177,7 +177,7 @@ private okhttp3.Call createLookupValidateBeforeCall(String accountId, LookupRequ 500 Internal Server Error - */ - public CreateLookupResponse createLookup(String accountId, LookupRequest lookupRequest) throws ApiException { + public CreateLookupResponse createLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { ApiResponse localVarResp = createLookupWithHttpInfo(accountId, lookupRequest); return localVarResp.getData(); } @@ -202,7 +202,7 @@ public CreateLookupResponse createLookup(String accountId, LookupRequest lookupR 500 Internal Server Error - */ - public ApiResponse createLookupWithHttpInfo(String accountId, LookupRequest lookupRequest) throws ApiException { + public ApiResponse createLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -229,7 +229,7 @@ public ApiResponse createLookupWithHttpInfo(String account 500 Internal Server Error - */ - public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -256,7 +256,7 @@ public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequ 500 Internal Server Error - */ - public okhttp3.Call getLookupStatusCall(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLookupStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; @@ -303,7 +303,7 @@ public okhttp3.Call getLookupStatusCall(String accountId, String requestId, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLookupStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String 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 getLookupStatus(Async)"); @@ -338,7 +338,7 @@ private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public LookupStatus getLookupStatus(String accountId, String requestId) throws ApiException { + public LookupStatus getLookupStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { ApiResponse localVarResp = getLookupStatusWithHttpInfo(accountId, requestId); return localVarResp.getData(); } @@ -363,7 +363,7 @@ public LookupStatus getLookupStatus(String accountId, String requestId) throws A 500 Internal Server Error - */ - public ApiResponse getLookupStatusWithHttpInfo(String accountId, String requestId) throws ApiException { + public ApiResponse getLookupStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(accountId, requestId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -390,7 +390,7 @@ public ApiResponse getLookupStatusWithHttpInfo(String accountId, S 500 Internal Server Error - */ - public okhttp3.Call getLookupStatusAsync(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLookupStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(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 e4700c63..894bc284 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(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -148,7 +148,7 @@ public okhttp3.Call deleteRecordingCall(String accountId, String callId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String 500 Internal Server Error - */ - public void deleteRecording(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingWithHttpInfo(accountId, callId, recordingId); } @@ -217,7 +217,7 @@ public void deleteRecording(String accountId, String callId, String recordingId) 500 Internal Server Error - */ - public ApiResponse deleteRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -246,7 +246,7 @@ public ApiResponse deleteRecordingWithHttpInfo(String accountId, String ca 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, String 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -323,7 +323,7 @@ public okhttp3.Call deleteRecordingMediaCall(String accountId, String callId, St } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingMediaValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, St 500 Internal Server Error - */ - public void deleteRecordingMedia(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecordingMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingMediaWithHttpInfo(accountId, callId, recordingId); } @@ -392,7 +392,7 @@ public void deleteRecordingMedia(String accountId, String callId, String recordi 500 Internal Server Error - */ - public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingMediaValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -421,7 +421,7 @@ public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, S 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -498,7 +498,7 @@ public okhttp3.Call deleteRecordingTranscriptionCall(String accountId, String ca } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accou 500 Internal Server Error - */ - public void deleteRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); } @@ -567,7 +567,7 @@ public void deleteRecordingTranscription(String accountId, String callId, String 500 Internal Server Error - */ - public ApiResponse deleteRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -596,7 +596,7 @@ public ApiResponse deleteRecordingTranscriptionWithHttpInfo(String account 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -675,7 +675,7 @@ public okhttp3.Call downloadCallRecordingCall(String accountId, String callId, S } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, S 500 Internal Server Error - */ - public File downloadCallRecording(String accountId, String callId, String recordingId) throws ApiException { + public File downloadCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = downloadCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -746,7 +746,7 @@ public File downloadCallRecording(String accountId, String callId, String record 500 Internal Server Error - */ - public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse downloadCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, Str 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -854,7 +854,7 @@ public okhttp3.Call getCallRecordingCall(String accountId, String callId, String } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String 500 Internal Server Error - */ - public CallRecordingMetadata getCallRecording(String accountId, String callId, String recordingId) throws ApiException { + public CallRecordingMetadata getCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -925,7 +925,7 @@ public CallRecordingMetadata getCallRecording(String accountId, String callId, S 500 Internal Server Error - */ - public ApiResponse getCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse getCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String ac 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, Strin 500 Internal Server Error - */ - public okhttp3.Call getRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1033,7 +1033,7 @@ public okhttp3.Call getRecordingTranscriptionCall(String accountId, String callI } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountI 500 Internal Server Error - */ - public RecordingTranscriptions getRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { + public RecordingTranscriptions getRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -1104,7 +1104,7 @@ public RecordingTranscriptions getRecordingTranscription(String accountId, Strin 500 Internal Server Error - */ - public ApiResponse getRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse getRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String call 500 Internal Server Error - */ - public okhttp3.Call listAccountCallRecordingsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1228,7 +1228,7 @@ public okhttp3.Call listAccountCallRecordingsCall(String accountId, String to, S } @SuppressWarnings("rawtypes") - private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { + 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 { // 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(String accountI 500 Internal Server Error - */ - public List listAccountCallRecordings(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { + 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 { ApiResponse> localVarResp = listAccountCallRecordingsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime); return localVarResp.getData(); } @@ -1293,7 +1293,7 @@ public List listAccountCallRecordings(String accountId, S 500 Internal Server Error - */ - public ApiResponse> listAccountCallRecordingsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { + 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 { 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(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback> _callback) throws ApiException { + 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 { okhttp3.Call localVarCall = listAccountCallRecordingsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1354,7 +1354,7 @@ public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listCallRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1401,7 +1401,7 @@ public okhttp3.Call listCallRecordingsCall(String accountId, String callId, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listCallRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, Stri 500 Internal Server Error - */ - public List listCallRecordings(String accountId, String callId) throws ApiException { + public List listCallRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse> localVarResp = listCallRecordingsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -1465,7 +1465,7 @@ public List listCallRecordings(String accountId, String c 500 Internal Server Error - */ - public ApiResponse> listCallRecordingsWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse> listCallRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(S 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listCallRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String callId, fin 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + 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 { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1574,7 +1574,7 @@ public okhttp3.Call transcribeCallRecordingCall(String accountId, String callId, } @SuppressWarnings("rawtypes") - private okhttp3.Call transcribeCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + 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 { // 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(String accountId, 500 Internal Server Error - */ - public void transcribeCallRecording(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { + 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 { transcribeCallRecordingWithHttpInfo(accountId, callId, recordingId, transcribeRecording); } @@ -1650,7 +1650,7 @@ public void transcribeCallRecording(String accountId, String callId, String reco 500 Internal Server Error - */ - public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { + 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 { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1680,7 +1680,7 @@ public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, S 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + 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 { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1709,7 +1709,7 @@ public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1757,7 +1757,7 @@ public okhttp3.Call updateCallRecordingStateCall(String accountId, String callId } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallRecordingStateValidateBeforeCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallRecordingStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId 500 Internal Server Error - */ - public void updateCallRecordingState(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { + public void updateCallRecordingState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { updateCallRecordingStateWithHttpInfo(accountId, callId, updateCallRecording); } @@ -1826,7 +1826,7 @@ public void updateCallRecordingState(String accountId, String callId, UpdateCall 500 Internal Server Error - */ - public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { + public ApiResponse updateCallRecordingStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { okhttp3.Call localVarCall = updateCallRecordingStateValidateBeforeCall(accountId, callId, updateCallRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1855,7 +1855,7 @@ public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateAsync(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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 8260db2d..f03cdf75 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(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -140,7 +140,7 @@ public okhttp3.Call getStatisticsCall(String accountId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getStatisticsValidateBeforeCall(@javax.annotation.Nonnull 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(String accountId, final Api 500 Internal Server Error - */ - public AccountStatistics getStatistics(String accountId) throws ApiException { + public AccountStatistics getStatistics(@javax.annotation.Nonnull String accountId) throws ApiException { ApiResponse localVarResp = getStatisticsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -197,7 +197,7 @@ public AccountStatistics getStatistics(String accountId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse getStatisticsWithHttpInfo(String accountId) throws ApiException { + public ApiResponse getStatisticsWithHttpInfo(@javax.annotation.Nonnull 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(String accountId 500 Internal Server Error - */ - public okhttp3.Call getStatisticsAsync(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsAsync(@javax.annotation.Nonnull 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 d2208831..5241ddc4 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(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -147,7 +147,7 @@ public okhttp3.Call createWebhookSubscriptionCall(String accountId, WebhookSubsc } @SuppressWarnings("rawtypes") - private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountI 503 Service Unavailable - */ - public WebhookSubscription createWebhookSubscription(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription createWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(accountId, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -211,7 +211,7 @@ public WebhookSubscription createWebhookSubscription(String accountId, WebhookSu 503 Service Unavailable - */ - public ApiResponse createWebhookSubscriptionWithHttpInfo(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse createWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(St 503 Service Unavailable - */ - public okhttp3.Call createWebhookSubscriptionAsync(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, WebhookSubs 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -316,7 +316,7 @@ public okhttp3.Call deleteVerificationRequestCall(String accountId, String phone } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountI 503 Service Unavailable - */ - public void deleteVerificationRequest(String accountId, String phoneNumber) throws ApiException { + public void deleteVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { deleteVerificationRequestWithHttpInfo(accountId, phoneNumber); } @@ -378,7 +378,7 @@ public void deleteVerificationRequest(String accountId, String phoneNumber) thro 503 Service Unavailable - */ - public ApiResponse deleteVerificationRequestWithHttpInfo(String accountId, String phoneNumber) throws ApiException { + public ApiResponse deleteVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { okhttp3.Call localVarCall = deleteVerificationRequestValidateBeforeCall(accountId, phoneNumber, null); return localVarApiClient.execute(localVarCall); } @@ -406,7 +406,7 @@ public ApiResponse deleteVerificationRequestWithHttpInfo(String accountId, 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String phon 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionCall(String accountId, String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -481,7 +481,7 @@ public okhttp3.Call deleteWebhookSubscriptionCall(String accountId, String id, f } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(String accountId, String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountI 503 Service Unavailable - */ - public void deleteWebhookSubscription(String accountId, String id) throws ApiException { + public void deleteWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { deleteWebhookSubscriptionWithHttpInfo(accountId, id); } @@ -543,7 +543,7 @@ public void deleteWebhookSubscription(String accountId, String id) throws ApiExc 503 Service Unavailable - */ - public ApiResponse deleteWebhookSubscriptionWithHttpInfo(String accountId, String id) throws ApiException { + public ApiResponse deleteWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(accountId, id, null); return localVarApiClient.execute(localVarCall); } @@ -571,7 +571,7 @@ public ApiResponse deleteWebhookSubscriptionWithHttpInfo(String accountId, 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionAsync(String accountId, String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String id, 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -646,7 +646,7 @@ public okhttp3.Call getTollFreeVerificationStatusCall(String accountId, String p } @SuppressWarnings("rawtypes") - private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String acco 503 Service Unavailable - */ - public TfvStatus getTollFreeVerificationStatus(String accountId, String phoneNumber) throws ApiException { + public TfvStatus getTollFreeVerificationStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { ApiResponse localVarResp = getTollFreeVerificationStatusWithHttpInfo(accountId, phoneNumber); return localVarResp.getData(); } @@ -710,7 +710,7 @@ public TfvStatus getTollFreeVerificationStatus(String accountId, String phoneNum 503 Service Unavailable - */ - public ApiResponse getTollFreeVerificationStatusWithHttpInfo(String accountId, String phoneNumber) throws ApiException { + public ApiResponse getTollFreeVerificationStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String a 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTollFreeVerificationStatusValidateBeforeCall(accountId, phoneNumber, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -915,7 +915,7 @@ public okhttp3.Call listTollFreeUseCasesAsync(final ApiCallback> _c 503 Service Unavailable - */ - public okhttp3.Call listWebhookSubscriptionsCall(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -961,7 +961,7 @@ public okhttp3.Call listWebhookSubscriptionsCall(String accountId, final ApiCall } @SuppressWarnings("rawtypes") - private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull 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(String accountId 503 Service Unavailable - */ - public WebhookSubscriptionsListBody listWebhookSubscriptions(String accountId) throws ApiException { + public WebhookSubscriptionsListBody listWebhookSubscriptions(@javax.annotation.Nonnull String accountId) throws ApiException { ApiResponse localVarResp = listWebhookSubscriptionsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -1016,7 +1016,7 @@ public WebhookSubscriptionsListBody listWebhookSubscriptions(String accountId) t 503 Service Unavailable - */ - public ApiResponse listWebhookSubscriptionsWithHttpInfo(String accountId) throws ApiException { + public ApiResponse listWebhookSubscriptionsWithHttpInfo(@javax.annotation.Nonnull 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(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsAsync(@javax.annotation.Nonnull 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(String accountId, final ApiCal 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1118,7 +1118,7 @@ public okhttp3.Call requestTollFreeVerificationCall(String accountId, Verificati } @SuppressWarnings("rawtypes") - private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accoun 503 Service Unavailable - */ - public void requestTollFreeVerification(String accountId, VerificationRequest verificationRequest) throws ApiException { + public void requestTollFreeVerification(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { requestTollFreeVerificationWithHttpInfo(accountId, verificationRequest); } @@ -1178,7 +1178,7 @@ public void requestTollFreeVerification(String accountId, VerificationRequest ve 503 Service Unavailable - */ - public ApiResponse requestTollFreeVerificationWithHttpInfo(String accountId, VerificationRequest verificationRequest) throws ApiException { + public ApiResponse requestTollFreeVerificationWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { okhttp3.Call localVarCall = requestTollFreeVerificationValidateBeforeCall(accountId, verificationRequest, null); return localVarApiClient.execute(localVarCall); } @@ -1205,7 +1205,7 @@ public ApiResponse requestTollFreeVerificationWithHttpInfo(String accountI 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationAsync(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, Verificat 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1281,7 +1281,7 @@ public okhttp3.Call updateTollFreeVerificationRequestCall(String accountId, Stri } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull 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(String 503 Service Unavailable - */ - public void updateTollFreeVerificationRequest(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public void updateTollFreeVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { updateTollFreeVerificationRequestWithHttpInfo(accountId, phoneNumber, tfvSubmissionWrapper); } @@ -1348,7 +1348,7 @@ public void updateTollFreeVerificationRequest(String accountId, String phoneNumb 503 Service Unavailable - */ - public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { okhttp3.Call localVarCall = updateTollFreeVerificationRequestValidateBeforeCall(accountId, phoneNumber, tfvSubmissionWrapper, null); return localVarApiClient.execute(localVarCall); } @@ -1376,7 +1376,7 @@ public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(String ac 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestAsync(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull 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(String accountId, Str 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1453,7 +1453,7 @@ public okhttp3.Call updateWebhookSubscriptionCall(String accountId, String id, W } @SuppressWarnings("rawtypes") - private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull 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(String accountI 503 Service Unavailable - */ - public WebhookSubscription updateWebhookSubscription(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription updateWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = updateWebhookSubscriptionWithHttpInfo(accountId, id, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -1524,7 +1524,7 @@ public WebhookSubscription updateWebhookSubscription(String accountId, String id 503 Service Unavailable - */ - public ApiResponse updateWebhookSubscriptionWithHttpInfo(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse updateWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull 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(St 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionAsync(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull 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 cd911d97..acb29d91 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(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -145,7 +145,7 @@ public okhttp3.Call deleteRealTimeTranscriptionCall(String accountId, String cal } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accoun 500 Internal Server Error - */ - public void deleteRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { + public void deleteRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { deleteRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); } @@ -214,7 +214,7 @@ public void deleteRealTimeTranscription(String accountId, String callId, String 500 Internal Server Error - */ - public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { + public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { okhttp3.Call localVarCall = deleteRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, null); return localVarApiClient.execute(localVarCall); } @@ -243,7 +243,7 @@ public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(String accountI 500 Internal Server Error - */ - public okhttp3.Call deleteRealTimeTranscriptionAsync(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String ca 500 Internal Server Error - */ - public okhttp3.Call getRealTimeTranscriptionCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -320,7 +320,7 @@ public okhttp3.Call getRealTimeTranscriptionCall(String accountId, String callId } @SuppressWarnings("rawtypes") - private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId 500 Internal Server Error - */ - public CallTranscriptionResponse getRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { + public CallTranscriptionResponse getRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { ApiResponse localVarResp = getRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); return localVarResp.getData(); } @@ -391,7 +391,7 @@ public CallTranscriptionResponse getRealTimeTranscription(String accountId, Stri 500 Internal Server Error - */ - public ApiResponse getRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { + public ApiResponse getRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull 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(String accountId, String callI 500 Internal Server Error - */ - public okhttp3.Call listRealTimeTranscriptionsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -497,7 +497,7 @@ public okhttp3.Call listRealTimeTranscriptionsCall(String accountId, String call } @SuppressWarnings("rawtypes") - private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String account 500 Internal Server Error - */ - public List listRealTimeTranscriptions(String accountId, String callId) throws ApiException { + public List listRealTimeTranscriptions(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse> localVarResp = listRealTimeTranscriptionsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -561,7 +561,7 @@ public List listRealTimeTranscriptions(String account 500 Internal Server Error - */ - public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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(String accountId, String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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 61bbc92e..0f8830d9 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 243865e9..e460549a 100644 --- a/src/main/java/com/bandwidth/sdk/auth/Authentication.java +++ b/src/main/java/com/bandwidth/sdk/auth/Authentication.java @@ -20,6 +20,7 @@ import java.util.Map; import java.util.List; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 565d3c51..640c0300 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 3c487529..346508f7 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.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 6068f9f0..92a28b9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("currentCallQueueSize"); - openapiFields.add("maxCallQueueSize"); + openapiFields = new HashSet(Arrays.asList("currentCallQueueSize", "maxCallQueueSize")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java index e9c708b5..74102c08 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AdditionalDenialReason */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AdditionalDenialReason { public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) @@ -219,16 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("statusCode"); - openapiFields.add("reason"); - openapiFields.add("resubmitAllowed"); + openapiFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("statusCode"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("resubmitAllowed"); + openapiRequiredFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); } /** @@ -240,19 +236,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AdditionalDenialReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdditionalDenialReason.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } } @@ -313,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Address.java b/src/main/java/com/bandwidth/sdk/model/Address.java index 198c29b9..57f6bc85 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Address */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Address { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -335,23 +337,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("addr1"); - openapiFields.add("addr2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("name", "addr1", "addr2", "city", "state", "zip", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("addr1"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("zip"); - openapiRequiredFields.add("url"); + openapiRequiredFields = new HashSet(Arrays.asList("name", "addr1", "city", "state", "zip", "url")); } /** @@ -363,37 +352,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Address.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("addr1").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); } if ((jsonObj.get("addr2") != null && !jsonObj.get("addr2").isJsonNull()) && !jsonObj.get("addr2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); } if (!jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -454,7 +443,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index 1805765d..1dacfcd8 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -521,24 +523,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -550,37 +538,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("The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -645,7 +633,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java index 805cd7d3..47d56176 100644 --- a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BlockedWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BlockedWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -299,16 +301,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("status"); - openapiFields.add("internalTicketNumber"); - openapiFields.add("blocked"); - openapiFields.add("blockedReason"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -320,25 +316,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("The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -399,7 +395,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index 1550d1f6..99c5c41a 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -572,26 +574,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "cause", "errorMessage", "errorId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -603,46 +589,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BridgeCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -703,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index 204d6cf8..3ac50f75 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -494,23 +496,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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 = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -522,37 +511,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BridgeTargetCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -613,7 +602,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java index f1b6f178..eb0a353d 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java index fd5bb5d0..391c263c 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java index ddf8bbde..cbfa167d 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java index 6247baa9..017f4a5e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.RecordingTranscriptionMetadata; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -652,29 +654,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "recordingId", "to", "from", "transferCallerId", "transferTo", "duration", "direction", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "transcription", "recordingName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -686,39 +669,39 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -729,17 +712,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { RecordingTranscriptionMetadata.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -800,7 +783,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallState.java b/src/main/java/com/bandwidth/sdk/model/CallState.java index 0d6d0396..a91573c7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -633,28 +635,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "to", "from", "direction", "state", "stirShaken", "identity", "enqueuedTime", "startTime", "answerTime", "endTime", "disconnectCause", "errorMessage", "errorId", "lastUpdate")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -666,46 +650,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if ((jsonObj.get("identity") != null && !jsonObj.get("identity").isJsonNull()) && !jsonObj.get("identity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); } if ((jsonObj.get("disconnectCause") != null && !jsonObj.get("disconnectCause").isJsonNull()) && !jsonObj.get("disconnectCause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -766,7 +750,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java index 64fd1045..6fcea9ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java index c166e71b..873a1ed5 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscriptionDetectedLanguageEnum; import com.bandwidth.sdk.model.CallTranscriptionTrackEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscription { public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) @@ -249,14 +251,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("detectedLanguage"); - openapiFields.add("track"); - openapiFields.add("transcript"); - openapiFields.add("confidence"); + openapiFields = new HashSet(Arrays.asList("detectedLanguage", "track", "transcript", "confidence")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -268,7 +266,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -281,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallTranscriptionTrackEnum.validateJsonElement(jsonObj.get("track")); } if ((jsonObj.get("transcript") != null && !jsonObj.get("transcript").isJsonNull()) && !jsonObj.get("transcript").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); } } @@ -342,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java index 6295e064..4de2aca7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java index ca3e2a41..af1a05ed 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscriptionMetadata { public static final String SERIALIZED_NAME_TRANSCRIPTION_ID = "transcriptionId"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTION_ID) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transcriptionId"); - openapiFields.add("transcriptionName"); - openapiFields.add("transcriptionUrl"); + openapiFields = new HashSet(Arrays.asList("transcriptionId", "transcriptionName", "transcriptionUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if ((jsonObj.get("transcriptionName") != null && !jsonObj.get("transcriptionName").isJsonNull()) && !jsonObj.get("transcriptionName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); } if ((jsonObj.get("transcriptionUrl") != null && !jsonObj.get("transcriptionUrl").isJsonNull()) && !jsonObj.get("transcriptionUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); } } @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java index d1c4603e..64ebb417 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscriptionResponse { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -256,14 +258,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("callId"); - openapiFields.add("transcriptionId"); - openapiFields.add("tracks"); + openapiFields = new HashSet(Arrays.asList("accountId", "callId", "transcriptionId", "tracks")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -275,25 +273,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if (jsonObj.get("tracks") != null && !jsonObj.get("tracks").isJsonNull()) { JsonArray jsonArraytracks = jsonObj.getAsJsonArray("tracks"); if (jsonArraytracks != null) { // ensure the json data is an array if (!jsonObj.get("tracks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); } // validate the optional field `tracks` (array) @@ -361,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java index 0d0089a7..6f18f069 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Callback.java b/src/main/java/com/bandwidth/sdk/model/Callback.java index afcf7f15..1c64f0ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallback; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; @@ -39,6 +40,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Callback extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Callback.class.getName()); @@ -118,7 +120,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("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'StatusCallback'", e); } // deserialize InboundCallback @@ -130,7 +132,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("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'InboundCallback'", e); } @@ -140,7 +142,7 @@ public Callback read(JsonReader in) throws IOException { return ret; } - 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())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -239,7 +241,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StatusCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with InboundCallback @@ -247,11 +249,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti InboundCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java index 3e169433..5b608007 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java index 760212bf..d86c8dfc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java index 06e06d9b..f8f2dd12 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -299,21 +301,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("scope"); - openapiFields.add("message"); - openapiFields.add("digits"); + openapiFields = new HashSet(Arrays.asList("to", "from", "applicationId", "scope", "message", "digits")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("digits"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "message", "digits")); } /** @@ -325,31 +316,31 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -410,7 +401,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 5522b692..5104de55 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.ConferenceMember; import com.google.gson.TypeAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -375,18 +377,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("id", "name", "createdTime", "completedTime", "conferenceEventUrl", "conferenceEventMethod", "tag", "activeMembers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -398,32 +392,32 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Conference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("conferenceEventUrl") != null && !jsonObj.get("conferenceEventUrl").isJsonNull()) && !jsonObj.get("conferenceEventUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); } // validate the optional field `conferenceEventMethod` if (jsonObj.get("conferenceEventMethod") != null && !jsonObj.get("conferenceEventMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("conferenceEventMethod")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if (jsonObj.get("activeMembers") != null && !jsonObj.get("activeMembers").isJsonNull()) { JsonArray jsonArrayactiveMembers = jsonObj.getAsJsonArray("activeMembers"); if (jsonArrayactiveMembers != null) { // ensure the json data is an array if (!jsonObj.get("activeMembers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); } // validate the optional field `activeMembers` (array) @@ -491,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index 007d0144..d4bab911 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceCompletedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index 30bf3e04..cd5998df 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceCreatedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java index e74930a5..72447880 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -320,16 +322,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callId"); - openapiFields.add("conferenceId"); - openapiFields.add("memberUrl"); - openapiFields.add("mute"); - openapiFields.add("hold"); - openapiFields.add("callIdsToCoach"); + openapiFields = new HashSet(Arrays.asList("callId", "conferenceId", "memberUrl", "mute", "hold", "callIdsToCoach")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -341,22 +337,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("memberUrl") != null && !jsonObj.get("memberUrl").isJsonNull()) && !jsonObj.get("memberUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -417,7 +413,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 82f93c9a..89d7020e 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -362,18 +364,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -385,30 +379,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMemberExitCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -469,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index 780c9390..85daf7e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -362,18 +364,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -385,30 +379,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMemberJoinCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -469,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index 84c96c4c..1558a280 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -520,24 +522,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "accountId", "recordingId", "channels", "startTime", "endTime", "duration", "fileFormat", "mediaUrl", "tag", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -549,40 +537,40 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -643,7 +631,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java index 64495284..4e619ebe 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -468,22 +470,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("accountId", "conferenceId", "name", "recordingId", "duration", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "recordingName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -495,37 +485,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -586,7 +576,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index 77daf53b..4b2dd282 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java index 8f457611..2e183ec2 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Contact.java b/src/main/java/com/bandwidth/sdk/model/Contact.java index bf293874..9d2c69ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Contact */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Contact { public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) @@ -245,18 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("firstName"); - openapiFields.add("lastName"); - openapiFields.add("email"); - openapiFields.add("phoneNumber"); + openapiFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("firstName"); - openapiRequiredFields.add("lastName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phoneNumber"); + openapiRequiredFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); } /** @@ -268,28 +262,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Contact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Contact.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); } if (!jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); } if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -350,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index 4735e05a..f7d33b2e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionConfiguration; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -708,35 +710,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("answerUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "answerUrl")); } /** @@ -748,60 +725,60 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCall.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerMethod` if (jsonObj.get("answerMethod") != null && !jsonObj.get("answerMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } // validate the optional field `disconnectMethod` if (jsonObj.get("disconnectMethod") != null && !jsonObj.get("disconnectMethod").isJsonNull()) { @@ -812,7 +789,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionConfiguration.validateJsonElement(jsonObj.get("machineDetection")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -873,7 +850,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java index c8263e3b..50c9ae4b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -702,40 +704,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - 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"); + openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "to", "from", "callUrl", "answerMethod", "answerUrl", "disconnectMethod")); } /** @@ -747,66 +719,66 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateCallResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCallResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (!jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the required field `answerMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the required field `disconnectMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -867,7 +839,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java index 76a1af9a..66b40cc8 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LookupStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The request has been accepted for processing but not yet finished and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateLookupResponse { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -194,12 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requestId"); - openapiFields.add("status"); + openapiFields = new HashSet(Arrays.asList("requestId", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -211,12 +211,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index b0dd177f..5aad8099 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FieldError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -230,15 +232,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("fieldErrors"); + openapiFields = new HashSet(Arrays.asList("type", "description", "fieldErrors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); } /** @@ -250,29 +247,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateMessageRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateMessageRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("fieldErrors") != null && !jsonObj.get("fieldErrors").isJsonNull()) { JsonArray jsonArrayfieldErrors = jsonObj.getAsJsonArray("fieldErrors"); if (jsonArrayfieldErrors != null) { // ensure the json data is an array if (!jsonObj.get("fieldErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); } // validate the optional field `fieldErrors` (array) @@ -340,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java index b11b43ba..0b748ce7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.bandwidth.sdk.model.MultiChannelMessageResponseData; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMultiChannelMessageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateMultiChannelMessageResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -240,13 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("data"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -258,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateMultiChannelMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -267,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("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -285,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -353,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index c4756ba0..38e2369a 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Disconnect event is fired when a call ends, for any reason. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -598,27 +600,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "callUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "cause", "errorMessage", "errorId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -630,46 +615,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("The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -730,7 +715,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Diversion.java b/src/main/java/com/bandwidth/sdk/model/Diversion.java index 61159811..f5a5edd6 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) @@ -323,17 +325,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - openapiFields.add("privacy"); - openapiFields.add("screen"); - openapiFields.add("counter"); - openapiFields.add("limit"); - openapiFields.add("unknown"); - openapiFields.add("origTo"); + openapiFields = new HashSet(Arrays.asList("reason", "privacy", "screen", "counter", "limit", "unknown", "origTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -345,30 +340,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Diversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } if ((jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) && !jsonObj.get("privacy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); } if ((jsonObj.get("screen") != null && !jsonObj.get("screen").isJsonNull()) && !jsonObj.get("screen").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); } if ((jsonObj.get("counter") != null && !jsonObj.get("counter").isJsonNull()) && !jsonObj.get("counter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); } if ((jsonObj.get("limit") != null && !jsonObj.get("limit").isJsonNull()) && !jsonObj.get("limit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); } if ((jsonObj.get("unknown") != null && !jsonObj.get("unknown").isJsonNull()) && !jsonObj.get("unknown").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); } if ((jsonObj.get("origTo") != null && !jsonObj.get("origTo").isJsonNull()) && !jsonObj.get("origTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); } } @@ -429,7 +424,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index 599cf1bd..8a4fa198 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -598,27 +600,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "digit", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "transferCallerId", "transferTo", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -630,49 +615,49 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!DtmfCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("digit") != null && !jsonObj.get("digit").isJsonNull()) && !jsonObj.get("digit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -733,7 +718,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Error.java b/src/main/java/com/bandwidth/sdk/model/Error.java index a6c081dc..f9f8a628 100644 --- a/src/main/java/com/bandwidth/sdk/model/Error.java +++ b/src/main/java/com/bandwidth/sdk/model/Error.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TelephoneNumber; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Error { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -230,13 +232,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("description"); - openapiFields.add("telephoneNumbers"); + openapiFields = new HashSet(Arrays.asList("code", "description", "telephoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -248,19 +247,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("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + 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())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - 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())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("telephoneNumbers") != null && !jsonObj.get("telephoneNumbers").isJsonNull()) { JsonArray jsonArraytelephoneNumbers = jsonObj.getAsJsonArray("telephoneNumbers"); if (jsonArraytelephoneNumbers != null) { // ensure the json data is an array if (!jsonObj.get("telephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); } // validate the optional field `telephoneNumbers` (array) @@ -328,7 +327,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java index d15af07e..493dcec1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ErrorObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ErrorObject { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -220,16 +222,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("source"); + openapiFields = new HashSet(Arrays.asList("type", "description", "source")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("source"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description", "source")); } /** @@ -241,22 +237,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ErrorObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `source` ErrorSource.validateJsonElement(jsonObj.get("source")); @@ -319,7 +315,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java index dc26c1d4..10609ea1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Specifies relevant sources of the error, if any. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("parameter"); - openapiFields.add("field"); - openapiFields.add("header"); - openapiFields.add("reference"); + openapiFields = new HashSet(Arrays.asList("parameter", "field", "header", "reference")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("parameter") != null && !jsonObj.get("parameter").isJsonNull()) && !jsonObj.get("parameter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); } if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); } if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java index d80aa85c..f95dcef9 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FailureWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class FailureWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -308,16 +310,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("errorCode"); - openapiFields.add("errorMessage"); - openapiFields.add("errors"); - openapiFields.add("internalTicketNumber"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -329,28 +325,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("The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("errorCode") != null && !jsonObj.get("errorCode").isJsonNull()) && !jsonObj.get("errorCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -411,7 +407,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FieldError.java b/src/main/java/com/bandwidth/sdk/model/FieldError.java index b3aa98a4..5cdcf256 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fieldName"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("fieldName", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fieldName") != null && !jsonObj.get("fieldName").isJsonNull()) && !jsonObj.get("fieldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java index 1f27ba16..7c3e6137 100644 --- a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index 66a4eb37..898a300e 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -624,28 +626,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "digits", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "terminatingDigit", "transferCallerId", "transferTo", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -657,52 +641,52 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GatherCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("digits") != null && !jsonObj.get("digits").isJsonNull()) && !jsonObj.get("digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("terminatingDigit") != null && !jsonObj.get("terminatingDigit").isJsonNull()) && !jsonObj.get("terminatingDigit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -763,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java index e08a089c..34b0e594 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents an inbound callback. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InboundCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -300,21 +302,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("time"); - openapiFields.add("type"); - openapiFields.add("to"); - openapiFields.add("description"); - openapiFields.add("message"); - openapiFields.add("carrierName"); + openapiFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message", "carrierName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("message"); + openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); } /** @@ -326,29 +317,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` InboundCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` InboundCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -409,7 +400,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java index 09b62d76..191bc55e 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.MultiChannelMessageContent; @@ -54,13 +55,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * InboundCallbackMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InboundCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -585,34 +587,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel", "content", "suggestionResponse", "locationResponse")); // a set of required properties/fields (JSON key names) - 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"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); } /** @@ -624,25 +602,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -650,20 +628,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -744,7 +722,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java index fa8eeb3c..cb3a5b64 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 9d873d99..d0aad03e 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.Diversion; import com.bandwidth.sdk.model.StirShaken; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The 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.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -484,23 +486,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -512,34 +501,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("The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } // validate the optional field `diversion` if (jsonObj.get("diversion") != null && !jsonObj.get("diversion").isJsonNull()) { @@ -550,7 +539,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("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } } @@ -611,7 +600,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Link.java b/src/main/java/com/bandwidth/sdk/model/Link.java index fa027d22..cf960cc7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Link */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Link { public static final String SERIALIZED_NAME_REL = "rel"; @SerializedName(SERIALIZED_NAME_REL) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("rel"); - openapiFields.add("href"); + openapiFields = new HashSet(Arrays.asList("rel", "href")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LinksObject.java b/src/main/java/com/bandwidth/sdk/model/LinksObject.java index 630fec92..f02e2d00 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LinksObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LinksObject { public static final String SERIALIZED_NAME_FIRST = "first"; @SerializedName(SERIALIZED_NAME_FIRST) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("first"); - openapiFields.add("next"); - openapiFields.add("previous"); - openapiFields.add("last"); + openapiFields = new HashSet(Arrays.asList("first", "next", "previous", "last")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LinksObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("first") != null && !jsonObj.get("first").isJsonNull()) && !jsonObj.get("first").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); } if ((jsonObj.get("next") != null && !jsonObj.get("next").isJsonNull()) && !jsonObj.get("next").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); } if ((jsonObj.get("previous") != null && !jsonObj.get("previous").isJsonNull()) && !jsonObj.get("previous").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); } if ((jsonObj.get("last") != null && !jsonObj.get("last").isJsonNull()) && !jsonObj.get("last").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java index f175c9cd..65fbd38a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index d2356f36..2f41733d 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageDirectionEnum; import com.bandwidth.sdk.model.MessageStatusEnum; import com.bandwidth.sdk.model.MessageTypeEnum; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -755,33 +757,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -793,21 +772,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ListMessageItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("sourceTn") != null && !jsonObj.get("sourceTn").isJsonNull()) && !jsonObj.get("sourceTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); } if ((jsonObj.get("destinationTn") != null && !jsonObj.get("destinationTn").isJsonNull()) && !jsonObj.get("destinationTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); } // validate the optional field `messageStatus` if (jsonObj.get("messageStatus") != null && !jsonObj.get("messageStatus").isJsonNull()) { @@ -822,25 +801,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MessageTypeEnum.validateJsonElement(jsonObj.get("messageType")); } if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } if ((jsonObj.get("campaignClass") != null && !jsonObj.get("campaignClass").isJsonNull()) && !jsonObj.get("campaignClass").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); } if ((jsonObj.get("campaignId") != null && !jsonObj.get("campaignId").isJsonNull()) && !jsonObj.get("campaignId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); } if ((jsonObj.get("callingNumberCountryA3") != null && !jsonObj.get("callingNumberCountryA3").isJsonNull()) && !jsonObj.get("callingNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); } if ((jsonObj.get("calledNumberCountryA3") != null && !jsonObj.get("calledNumberCountryA3").isJsonNull()) && !jsonObj.get("calledNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); } if ((jsonObj.get("product") != null && !jsonObj.get("product").isJsonNull()) && !jsonObj.get("product").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); } if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } } @@ -901,7 +880,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java index 9a20f90e..04743120 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Create phone number lookup request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupRequest { public static final String SERIALIZED_NAME_TNS = "tns"; @SerializedName(SERIALIZED_NAME_TNS) @@ -177,12 +179,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tns"); + openapiFields = new HashSet(Arrays.asList("tns")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tns"); + openapiRequiredFields = new HashSet(Arrays.asList("tns")); } /** @@ -194,14 +194,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LookupRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -209,7 +209,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("tns") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tns").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tns` to be an array in the JSON string but got `%s`", jsonObj.get("tns").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tns` to be an array in the JSON string but got `%s`", jsonObj.get("tns").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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index 4b89b117..7a90001b 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupResult { public static final String SERIALIZED_NAME_RESPONSE_CODE = "Response Code"; @SerializedName(SERIALIZED_NAME_RESPONSE_CODE) @@ -375,19 +377,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Response Code"); - openapiFields.add("Message"); - openapiFields.add("E.164 Format"); - openapiFields.add("Formatted"); - openapiFields.add("Country"); - openapiFields.add("Line Type"); - openapiFields.add("Line Provider"); - openapiFields.add("Mobile Country Code"); - openapiFields.add("Mobile Network Code"); + openapiFields = new HashSet(Arrays.asList("Response Code", "Message", "E.164 Format", "Formatted", "Country", "Line Type", "Line Provider", "Mobile Country Code", "Mobile Network Code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -399,33 +392,33 @@ 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("The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("Message") != null && !jsonObj.get("Message").isJsonNull()) && !jsonObj.get("Message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Message").toString())); + 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())); } if ((jsonObj.get("E.164 Format") != null && !jsonObj.get("E.164 Format").isJsonNull()) && !jsonObj.get("E.164 Format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `E.164 Format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("E.164 Format").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `E.164 Format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("E.164 Format").toString())); } if ((jsonObj.get("Formatted") != null && !jsonObj.get("Formatted").isJsonNull()) && !jsonObj.get("Formatted").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Formatted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Formatted").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Formatted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Formatted").toString())); } if ((jsonObj.get("Country") != null && !jsonObj.get("Country").isJsonNull()) && !jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Country").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Country").toString())); } if ((jsonObj.get("Line Type") != null && !jsonObj.get("Line Type").isJsonNull()) && !jsonObj.get("Line Type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Line Type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Type").toString())); } if ((jsonObj.get("Line Provider") != null && !jsonObj.get("Line Provider").isJsonNull()) && !jsonObj.get("Line Provider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Line Provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Provider").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Provider").toString())); } if ((jsonObj.get("Mobile Country Code") != null && !jsonObj.get("Mobile Country Code").isJsonNull()) && !jsonObj.get("Mobile Country Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Mobile Country Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Country Code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Country Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Country Code").toString())); } if ((jsonObj.get("Mobile Network Code") != null && !jsonObj.get("Mobile Network Code").isJsonNull()) && !jsonObj.get("Mobile Network Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Mobile Network Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Network Code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Network Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Network Code").toString())); } } @@ -486,7 +479,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java index c1474231..be76c311 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LookupResult; import com.bandwidth.sdk.model.LookupStatusEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If requestId exists, the result for that request is returned. See the Examples for details on the various responses that you can receive. Generally, if you see a Response Code of 0 in a result for a TN, information will be available for it. Any other Response Code will indicate no information was available for the TN. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupStatus { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -265,14 +267,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requestId"); - openapiFields.add("status"); - openapiFields.add("result"); - openapiFields.add("failedTelephoneNumbers"); + openapiFields = new HashSet(Arrays.asList("requestId", "status", "result", "failedTelephoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -284,12 +282,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -300,7 +298,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayresult != null) { // ensure the json data is an array if (!jsonObj.get("result").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `result` to be an array in the JSON string but got `%s`", jsonObj.get("result").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `result` to be an array in the JSON string but got `%s`", jsonObj.get("result").toString())); } // validate the optional field `result` (array) @@ -311,7 +309,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the optional json data is an array if present if (jsonObj.get("failedTelephoneNumbers") != null && !jsonObj.get("failedTelephoneNumbers").isJsonNull() && !jsonObj.get("failedTelephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); } } @@ -372,7 +370,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java index 02a72484..45023ebe 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index 0f3f0a98..1247b2ba 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -521,24 +523,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -550,37 +538,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MachineDetectionCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -645,7 +633,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java index 4b168f9f..4fb21ee5 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionModeEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -546,25 +548,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("mode", "detectionTimeout", "silenceTimeout", "speechThreshold", "speechEndThreshold", "machineSpeechEndThreshold", "delayResult", "callbackUrl", "callbackMethod", "username", "password", "fallbackUrl", "fallbackMethod", "fallbackUsername", "fallbackPassword")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -576,7 +563,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MachineDetectionConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -585,30 +572,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionModeEnum.validateJsonElement(jsonObj.get("mode")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUrl") != null && !jsonObj.get("fallbackUrl").isJsonNull()) && !jsonObj.get("fallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); } // validate the optional field `fallbackMethod` if (jsonObj.get("fallbackMethod") != null && !jsonObj.get("fallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("fallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -669,7 +656,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java index 633c38e1..422a60db 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java index a424bdfb..f866dc1f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("value"); - openapiFields.add("duration"); + openapiFields = new HashSet(Arrays.asList("value", "duration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Media.java b/src/main/java/com/bandwidth/sdk/model/Media.java index 551b9a39..b64179c0 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("content"); - openapiFields.add("contentLength"); - openapiFields.add("mediaName"); + openapiFields = new HashSet(Arrays.asList("content", "contentLength", "mediaName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,15 +236,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Media.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) && !jsonObj.get("content").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); } if ((jsonObj.get("mediaName") != null && !jsonObj.get("mediaName").isJsonNull()) && !jsonObj.get("mediaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); } } @@ -306,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Message.java b/src/main/java/com/bandwidth/sdk/model/Message.java index 33749830..3f01bd98 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -500,23 +502,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "media", "text", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -528,18 +517,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("owner") != null && !jsonObj.get("owner").isJsonNull()) && !jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -547,20 +536,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the optional json data is an array if present if (jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull() && !jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -625,7 +614,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java index 52886e8a..73efd53a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java index 592eabf5..24678ff3 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -372,21 +374,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("applicationId", "to", "from", "text", "media", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); + openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "to", "from")); } /** @@ -398,38 +389,38 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -494,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java index 80760f09..743cb1b7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java index ba7ade9b..84010448 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessagesList.java b/src/main/java/com/bandwidth/sdk/model/MessagesList.java index 1f74bd1e..d12b50ac 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageItem; import com.bandwidth.sdk.model.PageInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) @@ -231,13 +233,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("totalCount"); - openapiFields.add("pageInfo"); - openapiFields.add("messages"); + openapiFields = new HashSet(Arrays.asList("totalCount", "pageInfo", "messages")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -249,7 +248,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -262,7 +261,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraymessages != null) { // ensure the json data is an array if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); } // validate the optional field `messages` (array) @@ -330,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java index 8fe89b02..7c88c9df 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageId"); + openapiFields = new HashSet(Arrays.asList("messageId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagingCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java index b42f7150..5e2b53d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("type", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagingRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessagingRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java index 206737b2..7713b8c3 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MfaForbiddenRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java index b4674ca8..e39bff95 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); - openapiFields.add("requestId"); + openapiFields = new HashSet(Arrays.asList("error", "requestId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java index 63173e46..791bd4f6 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MfaUnauthorizedRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java index cee4d1ae..39b0c9d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -204,12 +206,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("media"); + openapiFields = new HashSet(Arrays.asList("text", "media")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { JsonArray jsonArraymedia = jsonObj.getAsJsonArray("media"); if (jsonArraymedia != null) { // ensure the json data is an array if (!jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `media` (array) @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java index bbcab5ab..6212d610 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MmsMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -168,12 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); + openapiFields = new HashSet(Arrays.asList("fileUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("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("The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MmsMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java index 443e4e35..d22be724 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelActionCalendarEvent; import com.bandwidth.sdk.model.RbmActionBase; import com.bandwidth.sdk.model.RbmActionDial; @@ -42,6 +43,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -65,7 +67,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelAction extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelAction.class.getName()); @@ -142,7 +144,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionBase'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionBase'", e); } // deserialize RbmActionDial @@ -154,7 +156,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionDial'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionDial'", e); } // deserialize RbmActionViewLocation @@ -166,7 +168,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionViewLocation'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionViewLocation'", e); } // deserialize MultiChannelActionCalendarEvent @@ -178,7 +180,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'MultiChannelActionCalendarEvent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'MultiChannelActionCalendarEvent'", e); } // deserialize RbmActionOpenUrl @@ -190,7 +192,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionOpenUrl'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionOpenUrl'", e); } @@ -200,7 +202,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format("Failed deserialization for MultiChannelAction: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelAction: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -350,7 +352,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionBase.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionDial @@ -358,7 +360,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionDial.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionViewLocation @@ -366,7 +368,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionViewLocation.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with MultiChannelActionCalendarEvent @@ -374,7 +376,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelActionCalendarEvent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionOpenUrl @@ -382,11 +384,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionOpenUrl.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for MultiChannelAction with oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelAction with oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. %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/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index 58de6e0d..9c7f4f1d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelActionCalendarEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelActionCalendarEvent { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -325,23 +327,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("title"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("title"); - openapiRequiredFields.add("startTime"); - openapiRequiredFields.add("endTime"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime")); } /** @@ -353,27 +342,27 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelActionCalendarEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelActionCalendarEvent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -434,7 +423,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java index 61ef22fd..0a102766 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelChannelListObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -247,18 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("channel"); - openapiFields.add("content"); + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("content"); + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); } /** @@ -270,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelChannelListObject is not found in the empty JSON string", MultiChannelChannelListObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListObject is not found in the empty JSON string", MultiChannelChannelListObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -350,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java index 0dfbbcee..4e46192a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MmsMessageContentFile; @@ -47,6 +48,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -70,7 +72,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelChannelListObjectContent extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListObjectContent.class.getName()); @@ -147,7 +149,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageContentText'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentText'", e); } // deserialize RbmMessageMedia @@ -159,7 +161,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageMedia'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageMedia'", e); } // deserialize RbmMessageContentRichCard @@ -171,7 +173,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageContentRichCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentRichCard'", e); } // deserialize SmsMessageContent @@ -183,7 +185,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'SmsMessageContent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'SmsMessageContent'", e); } // deserialize MmsMessageContent @@ -195,7 +197,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'MmsMessageContent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'MmsMessageContent'", e); } @@ -205,7 +207,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti return ret; } - throw new IOException(String.format("Failed deserialization for MultiChannelChannelListObjectContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListObjectContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -355,7 +357,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentText.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageMedia @@ -363,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageMedia.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageContentRichCard @@ -371,7 +373,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentRichCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with SmsMessageContent @@ -379,7 +381,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti SmsMessageContent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with MmsMessageContent @@ -387,11 +389,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MmsMessageContent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for MultiChannelChannelListObjectContent with oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelChannelListObjectContent with oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent. %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/MultiChannelError.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java index 9104dd19..0a060505 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelError { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -251,13 +253,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("data"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -269,7 +268,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -278,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -292,7 +291,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -360,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java index 3f7546c8..c9d207ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java index 2d26e40f..b70a8e17 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The structure of the content field of a multichannel message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -194,12 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("media"); + openapiFields = new HashSet(Arrays.asList("text", "media")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java index 613211c8..da969b77 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObject; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Multi-Channel Message Request */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -284,17 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("channelList"); - openapiFields.add("tag"); - openapiFields.add("priority"); - openapiFields.add("expiration"); + openapiFields = new HashSet(Arrays.asList("to", "channelList", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("channelList"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "channelList")); } /** @@ -306,23 +301,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("The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // ensure the json data is an array if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -331,7 +326,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelChannelListObject.validateJsonElement(jsonArraychannelList.get(i)); }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -396,7 +391,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java index 7f24dfdd..22883e76 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageResponseDataChannelListInner; import com.bandwidth.sdk.model.PriorityEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The data returned in a multichannel message response. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -373,23 +375,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("channelList"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList")); } /** @@ -401,19 +390,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageResponseData.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -421,11 +410,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("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } // ensure the json data is an array if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -434,7 +423,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelMessageResponseDataChannelListInner.validateJsonElement(jsonArraychannelList.get(i)); }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -499,7 +488,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java index 7454f1e8..be91c494 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelMessageResponseDataChannelListInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageResponseDataChannelListInner { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -273,20 +275,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("channel"); - openapiFields.add("content"); - openapiFields.add("owner"); + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("content"); - openapiRequiredFields.add("owner"); + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); } /** @@ -298,29 +290,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageResponseDataChannelListInner is not found in the empty JSON string", MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseDataChannelListInner is not found in the empty JSON string", MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); // validate the required field `content` MultiChannelChannelListObjectContent.validateJsonElement(jsonObj.get("content")); if (!jsonObj.get("owner").isJsonPrimitive()) { - 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())); + 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())); } } @@ -381,7 +373,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java index 698c2093..6e8edecf 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * OptInWorkflow */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class OptInWorkflow { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -241,15 +243,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("imageUrls"); - openapiFields.add("confirmationResponse"); + openapiFields = new HashSet(Arrays.asList("description", "imageUrls", "confirmationResponse")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("imageUrls"); + openapiRequiredFields = new HashSet(Arrays.asList("description", "imageUrls")); } /** @@ -261,28 +258,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!OptInWorkflow.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OptInWorkflow.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the required json array is present if (jsonObj.get("imageUrls") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("imageUrls").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); } if ((jsonObj.get("confirmationResponse") != null && !jsonObj.get("confirmationResponse").isJsonNull()) && !jsonObj.get("confirmationResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); } } @@ -343,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PageInfo.java b/src/main/java/com/bandwidth/sdk/model/PageInfo.java index b0bfd585..917c52b2 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("prevPage"); - openapiFields.add("nextPage"); - openapiFields.add("prevPageToken"); - openapiFields.add("nextPageToken"); + openapiFields = new HashSet(Arrays.asList("prevPage", "nextPage", "prevPageToken", "nextPageToken")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!PageInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("prevPage") != null && !jsonObj.get("prevPage").isJsonNull()) && !jsonObj.get("prevPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); } if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); } if ((jsonObj.get("prevPageToken") != null && !jsonObj.get("prevPageToken").isJsonNull()) && !jsonObj.get("prevPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); } if ((jsonObj.get("nextPageToken") != null && !jsonObj.get("nextPageToken").isJsonNull()) && !jsonObj.get("nextPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java index 26533e2c..1d667b81 100644 --- a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java index 5c83c023..f97e4116 100644 --- a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java index a2f7a6f1..336b2c3d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -220,16 +222,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData")); } /** @@ -241,21 +237,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionBase.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -316,7 +312,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java index 4928d8ba..1c7fc6d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionDial */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionDial { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -246,18 +248,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("phoneNumber"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("phoneNumber"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); } /** @@ -269,24 +263,24 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionDial.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionDial.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -347,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java index 6e9b7fe1..c9c40106 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionOpenUrl */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionOpenUrl { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -247,18 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("url"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); } /** @@ -270,24 +264,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("The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionOpenUrl.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -348,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java index 77d1054c..41ef7f5a 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java index 97bf52a5..cd9e0848 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionViewLocation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionViewLocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -298,21 +300,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("latitude"); - openapiFields.add("longitude"); - openapiFields.add("label"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude", "label")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("latitude"); - openapiRequiredFields.add("longitude"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude")); } /** @@ -324,30 +315,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionViewLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionViewLocation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if (!jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } } @@ -408,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java index fda67bec..e0a323d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContentMedia; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmCardContent { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) @@ -257,14 +259,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("title"); - openapiFields.add("description"); - openapiFields.add("media"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("title", "description", "media", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -276,15 +274,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -295,7 +293,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -363,7 +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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java index 939e529f..0375db16 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMediaHeightEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContentMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmCardContentMedia { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -221,15 +223,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); - openapiFields.add("thumbnailUrl"); - openapiFields.add("height"); + openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl", "height")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); - openapiRequiredFields.add("height"); + openapiRequiredFields = new HashSet(Arrays.asList("fileUrl", "height")); } /** @@ -241,22 +238,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContentMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmCardContentMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } // validate the required field `height` RbmMediaHeightEnum.validateJsonElement(jsonObj.get("height")); @@ -319,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java index 250175fa..9793c8ec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmLocationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmLocationResponse { public static final String SERIALIZED_NAME_LATITUDE = "latitude"; @SerializedName(SERIALIZED_NAME_LATITUDE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("latitude"); - openapiFields.add("longitude"); + openapiFields = new HashSet(Arrays.asList("latitude", "longitude")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("latitude") != null && !jsonObj.get("latitude").isJsonNull()) && !jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if ((jsonObj.get("longitude") != null && !jsonObj.get("longitude").isJsonNull()) && !jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java index c31e67a4..59222725 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java index fea64c1c..5e52364d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageCarouselCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageCarouselCard { public static final String SERIALIZED_NAME_CARD_WIDTH = "cardWidth"; @SerializedName(SERIALIZED_NAME_CARD_WIDTH) @@ -240,15 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cardWidth"); - openapiFields.add("cardContents"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("cardWidth", "cardContents", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("cardWidth"); - openapiRequiredFields.add("cardContents"); + openapiRequiredFields = new HashSet(Arrays.asList("cardWidth", "cardContents")); } /** @@ -260,14 +257,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("The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageCarouselCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -275,7 +272,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("Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); } JsonArray jsonArraycardContents = jsonObj.getAsJsonArray("cardContents"); @@ -288,7 +285,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("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -356,7 +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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java index 71bd4263..67b187f0 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -194,13 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); - openapiFields.add("thumbnailUrl"); + openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("fileUrl")); } /** @@ -212,22 +211,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } } @@ -288,7 +287,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java index 9f6af6d1..76e21375 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -43,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -66,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); @@ -122,7 +124,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmStandaloneCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmStandaloneCard'", e); } // deserialize RbmMessageCarouselCard @@ -134,7 +136,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmMessageCarouselCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageCarouselCard'", e); } @@ -144,7 +146,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format("Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -243,7 +245,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmStandaloneCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageCarouselCard @@ -251,11 +253,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageCarouselCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java index 0f62bc31..347d6bbe 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentText */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentText { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -204,13 +206,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("text", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); + openapiRequiredFields = new HashSet(Arrays.asList("text")); } /** @@ -222,26 +221,26 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentText.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentText.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { JsonArray jsonArraysuggestions = jsonObj.getAsJsonArray("suggestions"); if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java index ec5aa0e4..388d8c68 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageMedia { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) @@ -205,13 +207,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("media"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("media", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("media"); + openapiRequiredFields = new HashSet(Arrays.asList("media")); } /** @@ -223,14 +222,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("The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -241,7 +240,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("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index 4c0665f3..38efdecc 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; import com.bandwidth.sdk.model.StandaloneCardOrientationEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmStandaloneCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmStandaloneCard { public static final String SERIALIZED_NAME_ORIENTATION = "orientation"; @SerializedName(SERIALIZED_NAME_ORIENTATION) @@ -259,17 +261,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("orientation"); - openapiFields.add("thumbnailImageAlignment"); - openapiFields.add("cardContent"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("orientation"); - openapiRequiredFields.add("thumbnailImageAlignment"); - openapiRequiredFields.add("cardContent"); + openapiRequiredFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent")); } /** @@ -281,14 +276,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmStandaloneCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmStandaloneCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -303,7 +298,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("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -371,7 +366,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java index b5fd0185..34055d7f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmSuggestionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmSuggestionResponse { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("postbackData"); + openapiFields = new HashSet(Arrays.asList("text", "postbackData")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 806b6afb..1f781802 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -729,32 +731,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -766,62 +746,62 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -882,7 +862,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index 1ae34da6..bc9fa396 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -729,32 +731,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -766,59 +746,59 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -879,7 +859,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java index ff3d9507..07c60a08 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java index 38cda932..b1b953d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingTranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -247,14 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("completedTime"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("id", "status", "completedTime", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -266,18 +264,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -338,7 +336,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java index ed6f2dd3..e93ffe6d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Transcription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RecordingTranscriptions */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingTranscriptions { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) @@ -178,11 +180,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transcripts"); + openapiFields = new HashSet(Arrays.asList("transcripts")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -194,7 +195,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("The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -203,7 +204,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("Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); } // validate the optional field `transcripts` (array) @@ -271,7 +272,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index 9ba3bb5a..e885d20f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -572,26 +574,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -603,46 +589,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -703,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java index ef3d6bfd..52ecdcab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java index 50932ded..af4edad2 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class SmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -167,12 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); + openapiFields = new HashSet(Arrays.asList("text")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); + openapiRequiredFields = new HashSet(Arrays.asList("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("The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SmsMessageContent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java index 206705f6..c80ead00 100644 --- a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java index 64a57657..6428264a 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.StatusCallbackMessage; import com.bandwidth.sdk.model.StatusCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents a status callback for an outbound MT SMS or MMS or RBM message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StatusCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -352,23 +354,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("time", "eventTime", "type", "to", "description", "message", "errorCode", "carrierName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("message"); + openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); } /** @@ -380,29 +369,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` StatusCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` StatusCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -463,7 +452,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java index a983981f..0392dd88 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.PriorityEnum; @@ -51,13 +52,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message payload schema within a callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StatusCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -504,31 +506,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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 = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel")); // a set of required properties/fields (JSON key names) - 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"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); } /** @@ -540,25 +521,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -566,20 +547,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -648,7 +629,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java index a793aa48..1d7a59c1 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; @@ -29,13 +31,13 @@ @JsonAdapter(StatusCallbackTypeEnum.Adapter.class) public enum StatusCallbackTypeEnum { - SENDING("message-sending"), + MESSAGE_SENDING("message-sending"), - DELIVERED("message-delivered"), + MESSAGE_DELIVERED("message-delivered"), - FAILED("message-failed"), + MESSAGE_FAILED("message-failed"), - READ("message-read"); + MESSAGE_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 e9ee898d..169499fb 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("verstat"); - openapiFields.add("attestationIndicator"); - openapiFields.add("originatingId"); + openapiFields = new HashSet(Arrays.asList("verstat", "attestationIndicator", "originatingId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StirShaken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("verstat") != null && !jsonObj.get("verstat").isJsonNull()) && !jsonObj.get("verstat").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); } if ((jsonObj.get("attestationIndicator") != null && !jsonObj.get("attestationIndicator").isJsonNull()) && !jsonObj.get("attestationIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); } if ((jsonObj.get("originatingId") != null && !jsonObj.get("originatingId").isJsonNull()) && !jsonObj.get("originatingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); } } @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java index 13af88b4..babf10cc 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TelephoneNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TelephoneNumber { public static final String SERIALIZED_NAME_TELEPHONE_NUMBER = "telephoneNumber"; @SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBER) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("telephoneNumber"); + openapiFields = new HashSet(Arrays.asList("telephoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TelephoneNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("telephoneNumber") != null && !jsonObj.get("telephoneNumber").isJsonNull()) && !jsonObj.get("telephoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java index 00d5bada..00bcc1f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvBasicAuthentication */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); + openapiFields = new HashSet(Arrays.asList("username", "password")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("password"); + openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TfvBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java index 7e21b73b..457deaf5 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvError.java b/src/main/java/com/bandwidth/sdk/model/TfvError.java index ef4056a2..9b043c39 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A generic error object. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("type", "description", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,15 +236,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -306,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java index b2b8d96a..653e5a72 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvStatusEnum; import com.bandwidth.sdk.model.TfvSubmissionInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvStatus { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -405,20 +407,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -430,29 +422,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("The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } // 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("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -513,7 +505,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java index d17c8b50..de526935 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index a5715be1..704c01e6 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvSubmissionInfo { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -550,25 +552,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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 = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -580,7 +567,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("The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -593,35 +580,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("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if ((jsonObj.get("useCaseSummary") != null && !jsonObj.get("useCaseSummary").isJsonNull()) && !jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if ((jsonObj.get("productionMessageContent") != null && !jsonObj.get("productionMessageContent").isJsonNull()) && !jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the optional field `optInWorkflow` if (jsonObj.get("optInWorkflow") != null && !jsonObj.get("optInWorkflow").isJsonNull()) { OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); } if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -690,7 +677,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java index 8abdd125..932b5034 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.VerificationUpdateRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionWrapper */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvSubmissionWrapper { public static final String SERIALIZED_NAME_SUBMISSION = "submission"; @SerializedName(SERIALIZED_NAME_SUBMISSION) @@ -168,11 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("submission"); + openapiFields = new HashSet(Arrays.asList("submission")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -184,7 +185,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvSubmissionWrapper.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -251,7 +252,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java index ee456b43..999b112a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java index b0b75872..b2232448 100644 --- a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TnLookupRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TnLookupRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TnLookupRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + 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())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index 7d1c7fa7..41652246 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -339,17 +341,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callbackUrl"); - openapiFields.add("callbackMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("tag"); - openapiFields.add("callbackTimeout"); - openapiFields.add("detectLanguage"); + openapiFields = new HashSet(Arrays.asList("callbackUrl", "callbackMethod", "username", "password", "tag", "callbackTimeout", "detectLanguage")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -361,25 +356,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TranscribeRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -440,7 +435,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Transcription.java b/src/main/java/com/bandwidth/sdk/model/Transcription.java index fc017c5c..9c30992d 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("confidence"); + openapiFields = new HashSet(Arrays.asList("text", "confidence")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -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("The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index b1eecdc2..700d8f81 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.Transcription; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Transcription Available event is sent when the recording transcription is available to be downloaded. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -704,31 +706,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -740,63 +721,63 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TranscriptionAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { Transcription.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -857,7 +838,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index 4e6cbad0..d8a9a4ca 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -546,25 +548,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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 = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -576,43 +563,43 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferAnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -673,7 +660,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index 40908757..a4f7d6b0 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -624,28 +626,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo", "cause", "errorMessage", "errorId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -657,52 +641,52 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -763,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index aac192fe..6e3e50a9 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -676,30 +678,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + 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")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -711,55 +693,55 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferDisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -820,7 +802,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java index 22164f89..361171b6 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -416,20 +418,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("state", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -441,7 +433,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -450,33 +442,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallStateEnum.validateJsonElement(jsonObj.get("state")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -537,7 +529,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java index c269d8d3..d2978269 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RecordingStateEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -168,12 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("state"); + openapiFields = new HashSet(Arrays.asList("state")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("state"); + openapiRequiredFields = new HashSet(Arrays.asList("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("The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateCallRecording.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java index 0b09b1e4..f110ffb0 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ConferenceStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -390,19 +392,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("status", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -414,7 +407,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateConference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -423,30 +416,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ConferenceStateEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -507,7 +500,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java index e0e385ba..5f365392 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) @@ -241,13 +243,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mute"); - openapiFields.add("hold"); - openapiFields.add("callIdsToCoach"); + openapiFields = new HashSet(Arrays.asList("mute", "hold", "callIdsToCoach")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -259,13 +258,13 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -326,7 +325,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java index 92b77d63..176529b8 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.AdditionalDenialReason; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationDenialWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationDenialWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -413,20 +415,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("accountId", "additionalDenialReasons", "declineReasonDescription", "denialStatusCode", "internalTicketNumber", "phoneNumber", "resubmitAllowed", "status", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -438,19 +430,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("The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (jsonObj.get("additionalDenialReasons") != null && !jsonObj.get("additionalDenialReasons").isJsonNull()) { JsonArray jsonArrayadditionalDenialReasons = jsonObj.getAsJsonArray("additionalDenialReasons"); if (jsonArrayadditionalDenialReasons != null) { // ensure the json data is an array if (!jsonObj.get("additionalDenialReasons").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); } // validate the optional field `additionalDenialReasons` (array) @@ -460,19 +452,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("Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -533,7 +525,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index 270670c9..93bfdb0c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -638,36 +640,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); // a set of required properties/fields (JSON key names) - 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"); + openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); } /** @@ -679,14 +655,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("The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -698,36 +674,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("Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); } if (!jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -738,7 +714,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("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -799,7 +775,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index f68127b8..d2acc02f 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationUpdateRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -602,34 +604,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - 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"); + openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("businessAddress"); - openapiRequiredFields.add("businessContact"); - openapiRequiredFields.add("messageVolume"); - openapiRequiredFields.add("useCase"); - openapiRequiredFields.add("useCaseSummary"); - openapiRequiredFields.add("productionMessageContent"); - openapiRequiredFields.add("optInWorkflow"); + openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); } /** @@ -641,14 +619,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("The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationUpdateRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -657,33 +635,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("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -694,7 +672,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("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -755,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java index 22ce9d79..39ca6932 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -247,14 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("status"); - openapiFields.add("internalTicketNumber"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -266,22 +264,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("The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -342,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("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java index 98611e5c..86df714b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -248,17 +250,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("scope"); - openapiFields.add("expirationTimeInMinutes"); - openapiFields.add("code"); + openapiFields = new HashSet(Arrays.asList("to", "scope", "expirationTimeInMinutes", "code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("expirationTimeInMinutes"); - openapiRequiredFields.add("code"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "expirationTimeInMinutes", "code")); } /** @@ -270,25 +265,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerifyCodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerifyCodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -349,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java index d8040b0b..fd9f6dca 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("valid"); + openapiFields = new HashSet(Arrays.asList("valid")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,7 +184,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerifyCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -246,7 +247,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java index 589bbdbc..68a02d54 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -231,13 +233,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("id"); + openapiFields = new HashSet(Arrays.asList("type", "description", "id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -249,18 +248,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VoiceApiError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -321,7 +320,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java index 8e0047dd..cc3d2b0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callId"); + openapiFields = new HashSet(Arrays.asList("callId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VoiceCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java index 9521bc5d..654946f3 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.WebhookSubscriptionBasicAuthentication; import com.bandwidth.sdk.model.WebhookSubscriptionTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -326,18 +328,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("accountId"); - openapiFields.add("callbackUrl"); - openapiFields.add("type"); - openapiFields.add("basicAuthentication"); - openapiFields.add("createdDate"); - openapiFields.add("modifiedDate"); + openapiFields = new HashSet(Arrays.asList("id", "accountId", "callbackUrl", "type", "basicAuthentication", "createdDate", "modifiedDate")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("callbackUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); } /** @@ -349,25 +343,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscription.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `type` if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { @@ -436,7 +430,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java index a95b0707..2a5923c0 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Basic authentication credentials are not required, but if present, both username and password must be provided. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); + openapiFields = new HashSet(Arrays.asList("username", "password")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("password"); + openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java index fd354bc8..7176fa91 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvBasicAuthentication; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * WebhookSubscriptionRequestSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionRequestSchema { public static final String SERIALIZED_NAME_BASIC_AUTHENTICATION = "basicAuthentication"; @SerializedName(SERIALIZED_NAME_BASIC_AUTHENTICATION) @@ -232,14 +234,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("basicAuthentication"); - openapiFields.add("callbackUrl"); - openapiFields.add("sharedSecretKey"); + openapiFields = new HashSet(Arrays.asList("basicAuthentication", "callbackUrl", "sharedSecretKey")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("callbackUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); } /** @@ -251,14 +249,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionRequestSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionRequestSchema.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -267,10 +265,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TfvBasicAuthentication.validateJsonElement(jsonObj.get("basicAuthentication")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } if ((jsonObj.get("sharedSecretKey") != null && !jsonObj.get("sharedSecretKey").isJsonNull()) && !jsonObj.get("sharedSecretKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); } } @@ -331,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java index e3688c9a..2873d71f 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java index 9cde6bac..d1205b0c 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Error; import com.bandwidth.sdk.model.LinksObject; import com.bandwidth.sdk.model.WebhookSubscription; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionsListBody { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -240,14 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("errors"); - openapiFields.add("data"); + openapiFields = new HashSet(Arrays.asList("links", "errors", "data")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + openapiRequiredFields = new HashSet(Arrays.asList("data")); } /** @@ -259,14 +257,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionsListBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionsListBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -279,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -290,7 +288,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("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); } JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); @@ -357,7 +355,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java index a8a97ccf..989b5845 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java @@ -19,7 +19,6 @@ import java.util.Arrays; import java.util.ArrayList; import com.bandwidth.sdk.model.FailureWebhook; -import com.bandwidth.sdk.model.TelephoneNumber; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java index 226f5c1d..cfee4a11 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java @@ -30,7 +30,7 @@ public class StatusCallbackTest { private final StatusCallback model = new StatusCallback() .time(OffsetDateTime.now()) .eventTime(OffsetDateTime.now()) - .type(StatusCallbackTypeEnum.DELIVERED) + .type(StatusCallbackTypeEnum.MESSAGE_DELIVERED) .to("to") .description("description") .message(new StatusCallbackMessage()) diff --git a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java index 0317bd89..9a6b3d82 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java @@ -29,10 +29,10 @@ public class StatusCallbackTypeEnumTest { */ @Test public void testStatusCallbackTypeEnum() { - assertThat(StatusCallbackTypeEnum.SENDING.toString(), equalTo("message-sending")); - assertThat(StatusCallbackTypeEnum.DELIVERED.toString(), equalTo("message-delivered")); - assertThat(StatusCallbackTypeEnum.FAILED.toString(), equalTo("message-failed")); - assertThat(StatusCallbackTypeEnum.READ.toString(), equalTo("message-read")); + assertThat(StatusCallbackTypeEnum.MESSAGE_SENDING.toString(), equalTo("message-sending")); + assertThat(StatusCallbackTypeEnum.MESSAGE_DELIVERED.toString(), equalTo("message-delivered")); + assertThat(StatusCallbackTypeEnum.MESSAGE_FAILED.toString(), equalTo("message-failed")); + assertThat(StatusCallbackTypeEnum.MESSAGE_READ.toString(), equalTo("message-read")); } From 0f9720ce2270f2404113a081a8ecc1684307c6b6 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Oct 2025 16:46:37 -0400 Subject: [PATCH 02/13] add oauth --- .gitignore | 2 + .openapi-generator/FILES | 4 + README.md | 12 + api/openapi.yaml | 7 + bandwidth.yml | 7 + build.gradle | 1 + build.sbt | 1 + 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 | 12 +- docs/RecordingsApi.md | 60 ++++- docs/StatisticsApi.md | 6 +- docs/TollFreeVerificationApi.md | 54 ++++- docs/TranscriptionsApi.md | 18 +- pom.xml | 5 + .../java/com/bandwidth/sdk/ApiClient.java | 94 ++++++++ .../java/com/bandwidth/sdk/api/CallsApi.java | 10 +- .../com/bandwidth/sdk/api/ConferencesApi.java | 18 +- .../java/com/bandwidth/sdk/api/MediaApi.java | 8 +- .../com/bandwidth/sdk/api/MessagesApi.java | 4 +- .../java/com/bandwidth/sdk/api/MfaApi.java | 6 +- .../bandwidth/sdk/api/MultiChannelApi.java | 2 +- .../sdk/api/PhoneNumberLookupApi.java | 4 +- .../com/bandwidth/sdk/api/RecordingsApi.java | 20 +- .../com/bandwidth/sdk/api/StatisticsApi.java | 2 +- .../sdk/api/TollFreeVerificationApi.java | 18 +- .../bandwidth/sdk/api/TranscriptionsApi.java | 6 +- .../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 ++++++++++++++++++ 35 files changed, 799 insertions(+), 98 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/.gitignore b/.gitignore index 3ef06f40..891c9710 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +*.prefs + # build files **/target target diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a1c64a70..52345def 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -205,6 +205,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/README.md b/README.md index 910ccfbd..65c1ed97 100644 --- a/README.md +++ b/README.md @@ -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 @@ -341,6 +345,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 3d0f7c68..fa2dfa31 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -11,6 +11,7 @@ servers: - url: / security: - Basic: [] +- OAuth2: [] tags: - name: Messages - name: Media @@ -14432,4 +14433,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 3cc990a7..084d00ad 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -9,6 +9,7 @@ info: version: 1.0.0 security: - Basic: [] + - OAuth2: [] tags: - name: Messages - name: Media @@ -8095,6 +8096,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 c3b2b6eb..040aeb9b 100644 --- a/build.gradle +++ b/build.gradle @@ -113,6 +113,7 @@ dependencies { 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.7' + 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.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' diff --git a/build.sbt b/build.sbt index ce297443..0f7c5bb9 100644 --- a/build.sbt +++ b/build.sbt @@ -16,6 +16,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.18.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.7", + "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 be6defa2..4ef1f76d 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.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"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. LookupRequest lookupRequest = new LookupRequest(); // LookupRequest | Phone number lookup request. @@ -66,7 +70,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -112,6 +116,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 | Your Bandwidth Account ID. String requestId = "004223a0-8b17-41b1-bf81-20732adf5590"; // String | The phone number lookup request ID from Bandwidth. @@ -142,7 +150,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/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/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..f40a69a2 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,6 +57,9 @@ 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.

@@ -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,6 +123,74 @@ 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); + } + + /** + * 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); } @@ -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. diff --git a/src/main/java/com/bandwidth/sdk/api/CallsApi.java b/src/main/java/com/bandwidth/sdk/api/CallsApi.java index fbf70f46..52de6ace 100644 --- a/src/main/java/com/bandwidth/sdk/api/CallsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/CallsApi.java @@ -140,7 +140,7 @@ 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); } @@ -309,7 +309,7 @@ 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); } @@ -511,7 +511,7 @@ 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); } @@ -696,7 +696,7 @@ 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); } @@ -875,7 +875,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java index 02951333..23ca9f91 100644 --- a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java @@ -146,7 +146,7 @@ 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); } @@ -323,7 +323,7 @@ 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); } @@ -494,7 +494,7 @@ 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); } @@ -673,7 +673,7 @@ 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); } @@ -850,7 +850,7 @@ 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); } @@ -1042,7 +1042,7 @@ 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); } @@ -1220,7 +1220,7 @@ 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); } @@ -1395,7 +1395,7 @@ 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); } @@ -1572,7 +1572,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/MediaApi.java b/src/main/java/com/bandwidth/sdk/api/MediaApi.java index d0e2cf9d..755d07e0 100644 --- a/src/main/java/com/bandwidth/sdk/api/MediaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MediaApi.java @@ -138,7 +138,7 @@ 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); } @@ -304,7 +304,7 @@ 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); } @@ -477,7 +477,7 @@ 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); } @@ -702,7 +702,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java index 3f438b59..12a1001f 100644 --- a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java @@ -145,7 +145,7 @@ 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); } @@ -449,7 +449,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/MfaApi.java b/src/main/java/com/bandwidth/sdk/api/MfaApi.java index 453d09d4..d5920bc8 100644 --- a/src/main/java/com/bandwidth/sdk/api/MfaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MfaApi.java @@ -139,7 +139,7 @@ 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); } @@ -292,7 +292,7 @@ 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); } @@ -446,7 +446,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java index 7ac63f0f..19487ce3 100644 --- a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java @@ -139,7 +139,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java index 6068c92b..41a18153 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -137,7 +137,7 @@ public okhttp3.Call createLookupCall(@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); } @@ -298,7 +298,7 @@ public okhttp3.Call getLookupStatusCall(@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); } diff --git a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java index 894bc284..6c91a4d8 100644 --- a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java @@ -143,7 +143,7 @@ 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); } @@ -318,7 +318,7 @@ 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); } @@ -493,7 +493,7 @@ 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); } @@ -670,7 +670,7 @@ 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); } @@ -849,7 +849,7 @@ 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); } @@ -1028,7 +1028,7 @@ 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); } @@ -1223,7 +1223,7 @@ 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); } @@ -1396,7 +1396,7 @@ 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); } @@ -1569,7 +1569,7 @@ 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); } @@ -1752,7 +1752,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java index f03cdf75..3e14cbc7 100644 --- a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java @@ -135,7 +135,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java index 5241ddc4..df41729d 100644 --- a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java @@ -142,7 +142,7 @@ 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); } @@ -311,7 +311,7 @@ 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); } @@ -476,7 +476,7 @@ 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); } @@ -641,7 +641,7 @@ 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); } @@ -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); } @@ -956,7 +956,7 @@ 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); } @@ -1113,7 +1113,7 @@ 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); } @@ -1276,7 +1276,7 @@ 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); } @@ -1448,7 +1448,7 @@ 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); } diff --git a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java index acb29d91..0c0e42d3 100644 --- a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java @@ -140,7 +140,7 @@ 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); } @@ -315,7 +315,7 @@ 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); } @@ -492,7 +492,7 @@ 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); } 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..22437158 --- /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.16.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..4b67db9c --- /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.16.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 + } +} From 49228d26405553980020225f638f5e999704d0ac Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Oct 2025 17:12:36 -0400 Subject: [PATCH 03/13] updates to oauth --- .../auth/OAuthOkHttpClient.mustache | 75 ++++++ .../okhttp-gson/auth/RetryingOAuth.mustache | 215 ++++++++++++++++++ .../bandwidth/sdk/auth/OAuthOkHttpClient.java | 4 +- .../com/bandwidth/sdk/auth/RetryingOAuth.java | 5 +- 4 files changed, 296 insertions(+), 3 deletions(-) create mode 100644 custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache create mode 100644 custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache diff --git a/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache b/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache new file mode 100644 index 00000000..facbc974 --- /dev/null +++ b/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache @@ -0,0 +1,75 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.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/x-www-form-urlencoded"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + headers = request.getHeaders(); + + 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 + } +} +{{/hasOAuthMethods}} diff --git a/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache new file mode 100644 index 00000000..3627de11 --- /dev/null +++ b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -0,0 +1,215 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.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 { + OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); + req.setHeader("Authorization", "Basic ZGURuOTM="); + OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); + 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 + } +} +{{/hasOAuthMethods}} diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java index d208453b..ae19b927 100644 --- a/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java @@ -46,8 +46,10 @@ public T execute(OAuthClientRequest request, Map String requestMethod, Class responseClass) throws OAuthSystemException, OAuthProblemException { - MediaType mediaType = MediaType.parse("application/json"); + MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + headers = request.getHeaders(); if(headers != null) { for (Entry entry : headers.entrySet()) { diff --git a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java index 41b38438..dac98799 100644 --- a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java @@ -184,8 +184,9 @@ private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAut public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { - OAuthJSONAccessTokenResponse accessTokenResponse = - oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage()); + OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); + req.setHeader("Authorization", "Basic ZGURuOTM="); + OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { setAccessToken(accessTokenResponse.getAccessToken()); } From 4a5079a244041aad22ad663779e0600c20c7c105 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 23 Oct 2025 11:17:25 -0400 Subject: [PATCH 04/13] more oauth fixes --- .../okhttp-gson/auth/RetryingOAuth.mustache | 13 +++++++++---- .../java/com/bandwidth/sdk/auth/RetryingOAuth.java | 13 +++++++++---- .../com/bandwidth/sdk/smoke/StatisticsApiTest.java | 9 +++------ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache index 3627de11..d68b69e6 100644 --- a/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache +++ b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -25,12 +25,16 @@ import java.net.HttpURLConnection; import java.net.URI; import java.util.Map; import java.util.List; +import java.util.Base64; public class RetryingOAuth extends OAuth implements Interceptor { private OAuthClient oAuthClient; private TokenRequestBuilder tokenRequestBuilder; + private String clientId; + private String clientSecret; + /** * @param client An OkHttp client * @param tokenRequestBuilder A token request builder @@ -63,9 +67,9 @@ public class RetryingOAuth extends OAuth implements Interceptor { String clientSecret, Map parameters ) { - this(OAuthClientRequest.tokenLocation(tokenUrl) - .setClientId(clientId) - .setClientSecret(clientSecret)); + this(OAuthClientRequest.tokenLocation(tokenUrl)); + this.clientId = clientId; + this.clientSecret = clientSecret; setFlow(flow); if (parameters != null) { for (Map.Entry entry : parameters.entrySet()) { @@ -175,7 +179,8 @@ public class RetryingOAuth extends OAuth implements Interceptor { if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); - req.setHeader("Authorization", "Basic ZGURuOTM="); + String credentials = Base64.getEncoder().encodeToString((clientId + ":" + clientSecret).getBytes()); + req.setHeader("Authorization", "Basic " + credentials); OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { setAccessToken(accessTokenResponse.getAccessToken()); diff --git a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java index dac98799..f943cda7 100644 --- a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java @@ -35,12 +35,16 @@ import java.net.URI; import java.util.Map; import java.util.List; +import java.util.Base64; public class RetryingOAuth extends OAuth implements Interceptor { private OAuthClient oAuthClient; private TokenRequestBuilder tokenRequestBuilder; + private String clientId; + private String clientSecret; + /** * @param client An OkHttp client * @param tokenRequestBuilder A token request builder @@ -73,9 +77,9 @@ public RetryingOAuth( String clientSecret, Map parameters ) { - this(OAuthClientRequest.tokenLocation(tokenUrl) - .setClientId(clientId) - .setClientSecret(clientSecret)); + this(OAuthClientRequest.tokenLocation(tokenUrl)); + this.clientId = clientId; + this.clientSecret = clientSecret; setFlow(flow); if (parameters != null) { for (Map.Entry entry : parameters.entrySet()) { @@ -185,7 +189,8 @@ public synchronized boolean updateAccessToken(String requestAccessToken) throws if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { try { OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); - req.setHeader("Authorization", "Basic ZGURuOTM="); + String credentials = Base64.getEncoder().encodeToString((clientId + ":" + clientSecret).getBytes()); + req.setHeader("Authorization", "Basic " + credentials); OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { setAccessToken(accessTokenResponse.getAccessToken()); diff --git a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java index 6c4e82bc..c2cde951 100644 --- a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java +++ b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java @@ -1,5 +1,6 @@ package com.bandwidth.sdk.smoke; +import com.bandwidth.sdk.api.MessagesApi; import com.bandwidth.sdk.api.StatisticsApi; import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.ApiClient; @@ -17,10 +18,8 @@ * API tests for StatisticsApi */ public class StatisticsApiTest { - public ApiClient defaultClient = Configuration.getDefaultApiClient(); - public HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); - private final StatisticsApi api = new StatisticsApi(defaultClient); - + ApiClient oauthClient = new ApiClient(BW_USERNAME, BW_PASSWORD, null); + private final StatisticsApi api = new StatisticsApi(oauthClient); /** * Get Account Statistics * @@ -30,8 +29,6 @@ public class StatisticsApiTest { */ @Test public void getStatisticsTest() throws ApiException { - Basic.setUsername(BW_USERNAME); - Basic.setPassword(BW_PASSWORD); AccountStatistics response = api.getStatistics(BW_ACCOUNT_ID); From 88be4f52c4fc74831d4ea24e616f0bfa63f84c20 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:31:16 -0500 Subject: [PATCH 05/13] update bw yaml --- bandwidth.yml | 926 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 629 insertions(+), 297 deletions(-) diff --git a/bandwidth.yml b/bandwidth.yml index 084d00ad..9ab77fd9 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -1329,60 +1329,66 @@ paths: '500': $ref: '#/components/responses/mfaInternalServerError' servers: *ref_2 - /accounts/{accountId}/tnlookup: + /accounts/{accountId}/phoneNumberLookup: post: - summary: Create Lookup - description: Create a Phone Number Lookup Request. - operationId: createLookup + summary: Create Synchronous Number Lookup + description: >- + Creates a synchronous phone number lookup request. Maximum of 100 + telephone numbers per request. + operationId: createSyncLookup tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/accountId1' requestBody: - $ref: '#/components/requestBodies/createLookupRequest' + $ref: '#/components/requestBodies/createSyncLookupRequest' responses: - '202': - $ref: '#/components/responses/createLookupResponse' - '400': - $ref: '#/components/responses/tnLookupBadRequestError' - '401': - $ref: '#/components/responses/tnLookupUnauthorizedError' - '403': - $ref: '#/components/responses/tnLookupForbiddenError' - '415': - $ref: '#/components/responses/tnLookupMediaTypeError' - '429': - $ref: '#/components/responses/tnLookupTooManyRequestsError' - '500': - $ref: '#/components/responses/tnLookupInternalServerError' + '200': + $ref: '#/components/responses/createSyncLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' servers: &ref_3 - - url: https://numbers.bandwidth.com/api/v1 + - url: https://api.bandwidth.com/v2 description: Production - /accounts/{accountId}/tnlookup/{requestId}: + /accounts/{accountId}/phoneNumberLookup/bulk: + post: + summary: Create Asynchronous Bulk Number Lookup + description: >- + Creates an asynchronous bulk phone number lookup request. Maximum of + 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk + Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) + endpoint to check the status of the request and view the results. + operationId: createAsyncBulkLookup + tags: + - Phone Number Lookup + parameters: + - $ref: '#/components/parameters/accountId1' + requestBody: + $ref: '#/components/requestBodies/createAsyncBulkLookupRequest' + responses: + '202': + $ref: '#/components/responses/createAsyncBulkLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' + servers: *ref_3 + /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}: get: - summary: Get Lookup Request Status - description: Get an existing Phone Number Lookup Request. - operationId: getLookupStatus + summary: Get Asynchronous Bulk Number Lookup + description: >- + Get an existing [Asynchronous Bulk Number + Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use + this endpoint to check the status of the request and view the results. + operationId: getAsyncBulkLookup tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/accountId1' - $ref: '#/components/parameters/requestId' responses: '200': - $ref: '#/components/responses/getLookupResponse' - '400': - $ref: '#/components/responses/tnLookupBadRequestError' - '401': - $ref: '#/components/responses/tnLookupUnauthorizedError' - '403': - $ref: '#/components/responses/tnLookupForbiddenError' - '404': - $ref: '#/components/responses/tnLookupNotFoundError' - '429': - $ref: '#/components/responses/tnLookupTooManyRequestsError' - '500': - $ref: '#/components/responses/tnLookupInternalServerError' + $ref: '#/components/responses/getAsyncBulkLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' servers: *ref_3 /accounts/{accountId}/tollFreeVerification: post: @@ -2485,7 +2491,7 @@ components: $ref: '#/components/schemas/multiChannelAction' maxItems: 11 multiChannelAction: - oneOf: + anyOf: - $ref: '#/components/schemas/rbmActionBase' - $ref: '#/components/schemas/rbmActionDial' - $ref: '#/components/schemas/rbmActionViewLocation' @@ -2500,7 +2506,7 @@ components: CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' OPEN_URL: '#/components/schemas/rbmActionOpenUrl' REQUEST_LOCATION: '#/components/schemas/rbmActionBase' - multiChannelChannelListObject: + multiChannelChannelListObjectBase: type: object properties: from: @@ -2509,19 +2515,85 @@ components: $ref: '#/components/schemas/applicationId' channel: $ref: '#/components/schemas/multiChannelMessageChannelEnum' - content: - description: The content of the message. - oneOf: - - $ref: '#/components/schemas/rbmMessageContentText' - - $ref: '#/components/schemas/rbmMessageMedia' - - $ref: '#/components/schemas/rbmMessageContentRichCard' - - $ref: '#/components/schemas/smsMessageContent' - - $ref: '#/components/schemas/mmsMessageContent' required: - from - applicationId - channel + multiChannelChannelListRBMObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + description: The content of the message. + oneOf: + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' + required: - content + multiChannelChannelListSMSObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + $ref: '#/components/schemas/smsMessageContent' + required: + - content + multiChannelChannelListMMSObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + $ref: '#/components/schemas/mmsMessageContent' + required: + - content + multiChannelChannelListRBMResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListSMSResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListMMSResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListRequestObject: + anyOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + discriminator: + propertyName: channel + mapping: + RBM: '#/components/schemas/multiChannelChannelListRBMObject' + SMS: '#/components/schemas/multiChannelChannelListSMSObject' + MMS: '#/components/schemas/multiChannelChannelListMMSObject' + multiChannelChannelListOwnerObject: + type: object + properties: + owner: + type: string + description: >- + The Bandwidth senderId associated with the message. Identical to + 'from'. + required: + - owner + multiChannelChannelListResponseObject: + anyOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject' + discriminator: + propertyName: channel + mapping: + RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject' + SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject' + MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject' multiChannelMessageRequest: description: Multi-Channel Message Request type: object @@ -2535,7 +2607,7 @@ components: order they are listed. Once a message sends successfully, the others will be ignored. items: - $ref: '#/components/schemas/multiChannelChannelListObject' + $ref: '#/components/schemas/multiChannelChannelListRequestObject' maxItems: 4 tag: $ref: '#/components/schemas/tag' @@ -2568,17 +2640,7 @@ components: order they are listed. Once a message sends successfully, the others will be ignored. items: - allOf: - - $ref: '#/components/schemas/multiChannelChannelListObject' - - type: object - properties: - owner: - type: string - description: >- - The Bandwidth senderId associated with the message. - Identical to 'from'. - required: - - owner + $ref: '#/components/schemas/multiChannelChannelListResponseObject' maxItems: 4 tag: $ref: '#/components/schemas/tag' @@ -5367,112 +5429,291 @@ components: The message containing the reason behind the request being forbidden. example: Missing Authentication Token - lookupStatusEnum: + completedLookupStatusEnum: + type: string + enum: + - COMPLETE + - PARTIAL_COMPLETE + - FAILED + example: COMPLETE + inProgressLookupStatusEnum: type: string - description: >- - The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or - FAILED). enum: - IN_PROGRESS - COMPLETE - PARTIAL_COMPLETE - FAILED example: COMPLETE - lookupRequest: + deactivationEventEnum: + type: string + description: > + [DNI-Only](#section/DNI-Only). + + `DEACTIVATED` if the carrier reported a deactivation event for this + phone number. + enum: + - DEACTIVATED + latestMessageDeliveryStatusEnum: + type: string + description: >- + [DNI-Only](#section/DNI-Only). The current delivery status of the phone + number. + + - ACTIVE: A message was successfully sent to the number (delivery code + 0). + + - DEACTIVATED: A message was not delivered to a number (delivery code + 720) + + - UNKNOWN: Bandwidth cannot find an delivery status entry for the + number. + enum: + - ACTIVE + - DEACTIVATED + - UNKNOWN + lineTypeEnum: + type: string + enum: + - FIXED + - VOIP-FIXED + - MOBILE + - VOIP + example: MOBILE + requestId: + type: string + format: uuid + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + linkSchema: + title: Link + type: object + properties: + href: + type: string + description: URI of the link. + example: /relative/uri + rel: + type: string + description: Specifies the relationship between this link and the resource. + example: aRelatedResource + method: + type: string + description: HTTP method to be used. + example: GET + lookupErrorSchema: type: object - description: Create phone number lookup request. properties: - tns: + code: + type: string + description: Validation error code + example: NO-MATCH + description: + type: string + description: Description of validation error + example: Example error description + type: + type: string + description: Type of validation error + example: NumberInventory + meta: + type: object + properties: + phoneNumbers: + type: array + items: + type: string + description: Phone number experiencing the error. + example: + - '+13992077164' + - '+19196104424' + message: + type: string + description: Message describing the error + example: Invalid TNs + code: + type: integer + description: Error code associated with the message + example: 1001 + syncLookupRequest: + type: object + properties: + phoneNumbers: + description: Telephone numbers in E.164 format. type: array + minimum: 1 + maximum: 100 items: type: string + pattern: ^\+[1-9]\d{1,14}$ required: - - tns - createLookupResponse: + - phoneNumbers + asyncLookupRequest: type: object - description: >- - The request has been accepted for processing but not yet finished and in - a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). properties: - requestId: - type: string - description: The phone number lookup request ID from Bandwidth. - status: - $ref: '#/components/schemas/lookupStatusEnum' - lookupStatus: + phoneNumbers: + description: Telephone numbers in E.164 format. + type: array + minimum: 1 + maximum: 15000 + items: + type: string + pattern: ^\+[1-9]\d{1,14}$ + required: + - phoneNumbers + createSyncLookupResponse: type: object - description: >- - If requestId exists, the result for that request is returned. See the - Examples for details on the various responses that you can receive. - Generally, if you see a Response Code of 0 in a result for a TN, - information will be available for it. Any other Response Code will - indicate no information was available for the TN. properties: - requestId: - type: string - description: The requestId. - example: 004223a0-8b17-41b1-bf81-20732adf5590 - status: - $ref: '#/components/schemas/lookupStatusEnum' - result: + links: type: array - description: The carrier information results for the specified telephone number. items: - $ref: '#/components/schemas/lookupResult' - failedTelephoneNumbers: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/completedLookupStatusEnum' + results: + type: array + description: >- + The carrier information results for the specified telephone + numbers. + items: + $ref: '#/components/schemas/lookupResult' + errors: type: array - description: The telephone numbers whose lookup failed. items: - type: string - example: - - '+191955512345' + $ref: '#/components/schemas/lookupErrorSchema' + createAsyncBulkLookupResponse: + type: object + properties: + links: + type: array + description: Links for pagination (if applicable) + items: + $ref: '#/components/schemas/linkSchema' + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/inProgressLookupStatusEnum' + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + getAsyncBulkLookupResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/inProgressLookupStatusEnum' + results: + type: array + description: >- + The carrier information results for the specified telephone + number. + items: + $ref: '#/components/schemas/lookupResult' + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + lookupErrorResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' lookupResult: type: object description: Carrier information results for the specified telephone number. properties: - Response Code: - type: integer - description: Our vendor's response code. - example: 0 - Message: - type: string - description: Message associated with the response code. - example: NOERROR - E.164 Format: + phoneNumber: type: string description: The telephone number in E.164 format. - example: '+19195551234' - Formatted: - type: string - description: The formatted version of the telephone number. - example: (919) 555-1234 - Country: - type: string - description: The country of the telephone number. - example: US - Line Type: - type: string - description: The line type of the telephone number. - example: Mobile - Line Provider: + example: '+10072904498' + lineType: + $ref: '#/components/schemas/lineTypeEnum' + messagingProvider: type: string description: The messaging service provider of the telephone number. example: Verizon Wireless - Mobile Country Code: + voiceProvider: type: string - description: The first half of the Home Network Identity (HNI). - example: '310' - Mobile Network Code: + description: The voice service provider of the telephone number. + example: Verizon Wireless + countryCodeA3: type: string - description: The second half of the HNI. - example: '010' - tnLookupRequestError: - type: object - properties: - message: + description: >- + The country code of the telephone number in ISO 3166-1 alpha-3 + format. + example: USA + deactivationReporter: + type: string + description: > + [DNI-Only](#section/DNI-Only). + + The carrier that reported a deactivation event for this phone + number. + deactivationDate: type: string - description: A description of what validation error occurred. - example: example error message + format: date-time-local + description: >- + [DNI-Only](#section/DNI-Only). The datetime the carrier reported a + deactivation event. + example: 2025-06-20 18:35 + deactivationEvent: + $ref: '#/components/schemas/deactivationEventEnum' + latestMessageDeliveryStatus: + $ref: '#/components/schemas/latestMessageDeliveryStatusEnum' + initialMessageDeliveryStatusDate: + type: string + format: date + description: >- + [DNI-Only](#section/DNI-Only). The date the phone number entered the + status described in `latestMessageDeliveryStatus`. + + Think of this as the "start time" for that status. + + Value resets every time the `latestMessageDeliveryStatus` changes. + example: '2025-06-20' + latestMessageDeliveryStatusDate: + type: string + format: date + description: >- + [DNI-Only](#section/DNI-Only). The date bandwidth last received + delivery status information for this phone number. + + Use this field to understand how up-to-date the + `latestMessageDeliveryStatus` is. + + Value resets every time the `latestMessageDeliveryStatus` changes. + example: '2025-06-21' accountId1: type: string description: User's account ID. @@ -6719,109 +6960,68 @@ components: application/json: schema: $ref: '#/components/schemas/mfaRequestError' - createLookupResponse: + createSyncLookupResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/createSyncLookupResponse' + examples: + lookupCompleteWithDniExample: + $ref: '#/components/examples/lookupCompleteWithDniExample' + lookupCompleteExample: + $ref: '#/components/examples/lookupCompleteExample' + lookupPartialExample: + $ref: '#/components/examples/lookupPartialExample' + lookupFailedExample: + $ref: '#/components/examples/lookupFailedExample' + createAsyncBulkLookupResponse: description: Accepted content: application/json: schema: - $ref: '#/components/schemas/createLookupResponse' + $ref: '#/components/schemas/createAsyncBulkLookupResponse' examples: - lookupResponseExample: + lookupInProgressExample: $ref: '#/components/examples/lookupInProgressExample' - getLookupResponse: + getAsyncBulkLookupResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/lookupStatus' + $ref: '#/components/schemas/getAsyncBulkLookupResponse' examples: + lookupCompleteWithDniExample: + $ref: '#/components/examples/lookupCompleteWithDniExample' + lookupCompleteExample: + $ref: '#/components/examples/lookupCompleteExample' lookupInProgressExample: $ref: '#/components/examples/lookupInProgressExample' + lookupPartialExample: + $ref: '#/components/examples/lookupPartialExample' lookupFailedExample: $ref: '#/components/examples/lookupFailedExample' - lookupSingleNumberCompleteExample: - $ref: '#/components/examples/lookupSingleNumberCompleteExample' - lookupMultipleNumbersCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' - lookupMultipleNumbersPartialCompleteExample: - $ref: >- - #/components/examples/lookupMultipleNumbersPartialCompleteExample - lookupSingleNumberCompleteNoInfoExample: - $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' - tnLookupBadRequestError: + tnLookupDefaultResponse: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: '#/components/schemas/lookupErrorResponse' examples: badRequest: - summary: Example Bad Request Error - value: - message: 'Some tns do not match e164 format: 1234' - tnLookupUnauthorizedError: - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/tnLookupRequestError' - examples: + $ref: '#/components/examples/badRequestExample' unauthorized: - summary: Example Unauthorized Error - value: - message: Unauthorized - tnLookupForbiddenError: - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/tnLookupRequestError' - examples: + $ref: '#/components/examples/unauthorizedExample' forbidden: - summary: Example Forbidden Error - value: - message: >- - Authorization header requires 'Credential' parameter. - Authorization header requires 'Signature' parameter. - Authorization header requires 'SignedHeaders' parameter. - Authorization header requires existence of either a - 'X-Amz-Date' or a 'Date' header. Authorization=Basic - Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' - tnLookupMediaTypeError: - description: Unsupported Media Type - content: - application/json: - schema: - $ref: '#/components/schemas/tnLookupRequestError' - examples: - mediaType: - summary: Example Unsupported Media Type Error - value: - message: Content-Type must be application/json. - tnLookupNotFoundError: - description: Not Found - tnLookupTooManyRequestsError: - description: Too Many Requests - content: - application/json: - schema: - $ref: '#/components/schemas/tnLookupRequestError' - examples: - mediaType: - summary: Example Too Many Requests Error - value: - message: Too many requests. - tnLookupInternalServerError: - description: Internal Server Error - content: - application/json: - schema: - $ref: '#/components/schemas/tnLookupRequestError' - examples: + $ref: '#/components/examples/forbiddenExample' mediaType: - summary: Example Internal Server Error Error - value: - message: Request has not been passed further. + $ref: '#/components/examples/unsupportedMediaTypeExample' + notFound: + $ref: '#/components/examples/notFoundExample' + tooManyRequests: + $ref: '#/components/examples/tooManyRequestsExample' + internalServer: + $ref: '#/components/examples/internalServerErrorExample' getTollFreeVerificationStatusResponse: description: OK content: @@ -7404,14 +7604,23 @@ components: type: string description: Filter results to calls with specified call Disconnect Cause. example: hangup + accountId1: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: '9900000' requestId: - name: requestId in: path + name: requestId required: true schema: type: string - description: The phone number lookup request ID from Bandwidth. - example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 tfPhoneNumberPathParam: in: path name: phoneNumber @@ -7650,95 +7859,208 @@ components: type: validation description: 'Invalid answerUrl: only http and https are allowed.' singleNumberRequestExample: - summary: Example Number Lookup Request for One Number + summary: Number Lookup Request value: - tns: - - '+19195551234' + phoneNumbers: + - '+19196104423' multipleNumberRequestExample: - summary: Example Number Lookup Request for Multiple Numbers + summary: Number Lookup Request for Multiple Numbers value: - tns: - - '+19195551234' - - '+19195554321' + phoneNumbers: + - '+19196104423' + - '+19196104424' lookupInProgressExample: - summary: Example Lookup In Progress Response + summary: Numbers Lookup In Progress value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: IN_PROGRESS + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: IN_PROGRESS + results: [] + errors: [] lookupFailedExample: - summary: Example Lookup Failed Response + summary: Numbers Lookup Failed + value: + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: FAILED + results: [] + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry data + meta: + phoneNumbers: + - '+13992077164' + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupPartialExample: + summary: Numbers Lookup Partial Complete + value: + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: PARTIAL_COMPLETE + results: + - phoneNumber: '+19196104423' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: '+19196104424' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry data + meta: + phoneNumbers: + - '+13992077164' + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupCompleteExample: + summary: Numbers Lookup Complete (without DNI) + value: + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: '+10072904498' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: [] + lookupCompleteWithDniExample: + summary: Numbers Lookup Complete (with DNI) + value: + links: + - href: href + rel: rel + method: GET + data: + requestId: 20732adf-bf81-8b17-41b1-004223a05590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + countryCodeA3: USA + lineType: MOBILE + messagingProvider: T-MOBILE USA INC + voiceProvider: T-MOBILE USA INC + latestMessageDeliveryStatus: ACTIVE + initialMessageDeliveryStatusDate: '2025-05-14' + latestMessageDeliveryStatusDate: '2025-05-18' + - phoneNumber: '+10072904498' + countryCodeA3: USA + lineType: FIXED + voiceProvider: VERIZON + latestMessageDeliveryStatus: DEACTIVATED + initialMessageDeliveryStatusDate: '2025-09-05' + latestMessageDeliveryStatusDate: '2025-09-05' + - phoneNumber: '+10072904499' + lineType: MOBILE + countryCodeA3: USA + messagingProvider: VERIZON + voiceProvider: VERIZON + deactivationReporter: Verizon Wireless + deactivationDate: '2025-09-29 01:23:00' + deactivationEvent: DEACTIVATED + latestMessageDeliveryStatus: UNKNOWN + errors: [] + badRequestExample: + summary: Example Bad Request Error + value: + links: [] + data: {} + errors: + - type: bad-request + description: >- + Bad Request. Ensure that you have set the requestId as a URL path + parameter. + unauthorizedExample: + summary: Unauthorized Error + value: + links: [] + data: {} + errors: + - type: Unauthorized + description: You are not authorized to access this resource. + code: '1' + page: null + forbiddenExample: + summary: Forbidden Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: FAILED - failedTelephoneNumbers: - - '+191955512345' - lookupSingleNumberCompleteExample: - summary: Example Single Number Lookup Complete Response + links: [] + data: {} + errors: + - type: Forbidden + description: You do not have permission to access this resource. + code: '2' + page: null + unsupportedMediaTypeExample: + summary: Unsupported Media Type Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: '+19195551234' - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: '310' - Mobile Network Code: '010' - lookupMultipleNumbersCompleteExample: - summary: Example Multiple Numbers Lookup Complete Response + links: [] + data: {} + errors: + - type: invalid-content-type + description: >- + Invalid content-type. Ensure that your content-type header is set + to application/json. + notFoundExample: + summary: Not Found Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: '+19195551234' - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: '310' - Mobile Network Code: '010' - - Response Code: 0 - Message: NOERROR - E.164 Format: '+19195554321' - Formatted: (919) 555-4321 - Country: US - Line Type: Mobile - Line Provider: T-Mobile USA - Mobile Country Code: '310' - Mobile Network Code: '160' - lookupMultipleNumbersPartialCompleteExample: - summary: Example Multiple Numbers Lookup Partial Complete Response + links: [] + data: {} + errors: + - type: not-found + description: >- + RequestId not found. Ensure that the requestId used in the URL + path is valid and maps to a previous request that was submitted. + tooManyRequestsExample: + summary: Too Many Requests Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: PARTIAL_COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: '+19195551234' - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: '310' - Mobile Network Code: '010' - failedTelephoneNumbers: - - '+191955512345' - lookupSingleNumberCompleteNoInfoExample: - summary: Example Single Number Lookup Complete with No Information Response + links: [] + data: {} + errors: + - type: rate-limiting + description: >- + Rate limit exceeded. Wait for the time specified in the + Retry-After header before sending another request. + internalServerErrorExample: + summary: Internal Server Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 3 - Message: NXDOMAIN - E.164 Format: '+19195550000' - Formatted: (919) 555-0000 - Country: US + links: [] + data: {} + errors: + - code: '500' + type: unexpected-error + description: >- + Unexpected error. Please contact Bandwidth Support if your + requests are receiving this status code for an extended period of + time. requestBodies: createMessageRequest: content: @@ -8038,18 +8360,28 @@ components: application/json: schema: $ref: '#/components/schemas/verifyCodeRequest' - createLookupRequest: - description: Phone number lookup request. + createSyncLookupRequest: + description: Synchronous phone number lookup request. required: true content: application/json: schema: - $ref: '#/components/schemas/lookupRequest' + $ref: '#/components/schemas/syncLookupRequest' examples: singleNumberRequestExample: $ref: '#/components/examples/singleNumberRequestExample' multipleNumberRequestExample: $ref: '#/components/examples/multipleNumberRequestExample' + createAsyncBulkLookupRequest: + description: Asynchronous bulk phone number lookup request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/asyncLookupRequest' + examples: + multipleNumberRequestExample: + $ref: '#/components/examples/multipleNumberRequestExample' requestTollFreeVerificationRequest: description: Request for verification of a toll-free phone number. required: true From 5c6bace2424655d91b2d3702fb53058aeb0ef789 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:31:46 -0500 Subject: [PATCH 06/13] update SDK --- .openapi-generator/FILES | 72 +- README.md | 41 +- api/openapi.yaml | 1423 +++++++++++------ docs/AsyncLookupRequest.md | 13 + docs/CompletedLookupStatusEnum.md | 15 + docs/CreateAsyncBulkLookupResponse.md | 15 + docs/CreateAsyncBulkLookupResponseData.md | 15 + docs/CreateSyncLookupResponse.md | 15 + docs/CreateSyncLookupResponseData.md | 16 + docs/DeactivationEventEnum.md | 11 + docs/GetAsyncBulkLookupResponse.md | 15 + docs/GetAsyncBulkLookupResponseData.md | 16 + docs/InProgressLookupStatusEnum.md | 17 + docs/LatestMessageDeliveryStatusEnum.md | 15 + docs/LineTypeEnum.md | 17 + docs/LinkSchema.md | 15 + docs/LookupErrorResponse.md | 15 + docs/LookupErrorSchema.md | 16 + docs/LookupErrorSchemaMeta.md | 15 + docs/LookupResult.md | 20 +- docs/MultiChannelChannelListMMSObject.md | 16 + ...ultiChannelChannelListMMSResponseObject.md | 17 + docs/MultiChannelChannelListObjectBase.md | 15 + docs/MultiChannelChannelListOwnerObject.md | 13 + docs/MultiChannelChannelListRBMObject.md | 16 + ...ChannelChannelListRBMObjectAllOfContent.md | 21 + ...ultiChannelChannelListRBMResponseObject.md | 17 + docs/MultiChannelChannelListRequestObject.md | 16 + docs/MultiChannelChannelListResponseObject.md | 17 + docs/MultiChannelChannelListSMSObject.md | 16 + ...ultiChannelChannelListSMSResponseObject.md | 17 + docs/MultiChannelMessageRequest.md | 2 +- docs/MultiChannelMessageResponseData.md | 2 +- docs/PhoneNumberLookupApi.md | 142 +- docs/SyncLookupRequest.md | 13 + src/main/java/com/bandwidth/sdk/JSON.java | 54 +- .../sdk/api/PhoneNumberLookupApi.java | 342 ++-- .../sdk/model/AsyncLookupRequest.java | 308 ++++ .../sdk/model/CompletedLookupStatusEnum.java | 82 + .../model/CreateAsyncBulkLookupResponse.java | 390 +++++ .../CreateAsyncBulkLookupResponseData.java | 320 ++++ .../sdk/model/CreateSyncLookupResponse.java | 390 +++++ .../model/CreateSyncLookupResponseData.java | 371 +++++ .../sdk/model/DeactivationEventEnum.java | 78 + .../sdk/model/GetAsyncBulkLookupResponse.java | 390 +++++ .../model/GetAsyncBulkLookupResponseData.java | 371 +++++ .../sdk/model/InProgressLookupStatusEnum.java | 84 + .../LatestMessageDeliveryStatusEnum.java | 82 + .../com/bandwidth/sdk/model/LineTypeEnum.java | 84 + .../com/bandwidth/sdk/model/LinkSchema.java | 346 ++++ .../sdk/model/LookupErrorResponse.java | 385 +++++ .../sdk/model/LookupErrorSchema.java | 377 +++++ .../sdk/model/LookupErrorSchemaMeta.java | 354 ++++ .../com/bandwidth/sdk/model/LookupResult.java | 328 ++-- .../sdk/model/MultiChannelAction.java | 65 +- .../MultiChannelChannelListMMSObject.java | 382 +++++ ...tiChannelChannelListMMSResponseObject.java | 411 +++++ .../MultiChannelChannelListObjectBase.java | 353 ++++ .../MultiChannelChannelListOwnerObject.java | 295 ++++ .../MultiChannelChannelListRBMObject.java | 382 +++++ ...annelChannelListRBMObjectAllOfContent.java | 330 ++++ ...tiChannelChannelListRBMResponseObject.java | 411 +++++ .../MultiChannelChannelListRequestObject.java | 317 ++++ ...MultiChannelChannelListResponseObject.java | 317 ++++ .../MultiChannelChannelListSMSObject.java | 382 +++++ ...tiChannelChannelListSMSResponseObject.java | 411 +++++ .../sdk/model/MultiChannelMessageRequest.java | 14 +- .../MultiChannelMessageResponseData.java | 14 +- .../sdk/model/SyncLookupRequest.java | 308 ++++ 69 files changed, 10817 insertions(+), 848 deletions(-) create mode 100644 docs/AsyncLookupRequest.md create mode 100644 docs/CompletedLookupStatusEnum.md create mode 100644 docs/CreateAsyncBulkLookupResponse.md create mode 100644 docs/CreateAsyncBulkLookupResponseData.md create mode 100644 docs/CreateSyncLookupResponse.md create mode 100644 docs/CreateSyncLookupResponseData.md create mode 100644 docs/DeactivationEventEnum.md create mode 100644 docs/GetAsyncBulkLookupResponse.md create mode 100644 docs/GetAsyncBulkLookupResponseData.md create mode 100644 docs/InProgressLookupStatusEnum.md create mode 100644 docs/LatestMessageDeliveryStatusEnum.md create mode 100644 docs/LineTypeEnum.md create mode 100644 docs/LinkSchema.md create mode 100644 docs/LookupErrorResponse.md create mode 100644 docs/LookupErrorSchema.md create mode 100644 docs/LookupErrorSchemaMeta.md create mode 100644 docs/MultiChannelChannelListMMSObject.md create mode 100644 docs/MultiChannelChannelListMMSResponseObject.md create mode 100644 docs/MultiChannelChannelListObjectBase.md create mode 100644 docs/MultiChannelChannelListOwnerObject.md create mode 100644 docs/MultiChannelChannelListRBMObject.md create mode 100644 docs/MultiChannelChannelListRBMObjectAllOfContent.md create mode 100644 docs/MultiChannelChannelListRBMResponseObject.md create mode 100644 docs/MultiChannelChannelListRequestObject.md create mode 100644 docs/MultiChannelChannelListResponseObject.md create mode 100644 docs/MultiChannelChannelListSMSObject.md create mode 100644 docs/MultiChannelChannelListSMSResponseObject.md create mode 100644 docs/SyncLookupRequest.md create mode 100644 src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java create mode 100644 src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java create mode 100644 src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java create mode 100644 src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java create mode 100644 src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java create mode 100644 src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java create mode 100644 src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java create mode 100644 src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LinkSchema.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java create mode 100644 src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java create mode 100644 src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 52345def..4a422647 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,7 @@ docs/AccountStatistics.md docs/AdditionalDenialReason.md docs/Address.md docs/AnswerCallback.md +docs/AsyncLookupRequest.md docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md @@ -26,6 +27,7 @@ docs/CallbackMethodEnum.md docs/CallsApi.md docs/CardWidthEnum.md docs/CodeRequest.md +docs/CompletedLookupStatusEnum.md docs/Conference.md docs/ConferenceCompletedCallback.md docs/ConferenceCreatedCallback.md @@ -38,11 +40,15 @@ docs/ConferenceRedirectCallback.md docs/ConferenceStateEnum.md docs/ConferencesApi.md docs/Contact.md +docs/CreateAsyncBulkLookupResponse.md +docs/CreateAsyncBulkLookupResponseData.md docs/CreateCall.md docs/CreateCallResponse.md -docs/CreateLookupResponse.md docs/CreateMessageRequestError.md docs/CreateMultiChannelMessageResponse.md +docs/CreateSyncLookupResponse.md +docs/CreateSyncLookupResponseData.md +docs/DeactivationEventEnum.md docs/DisconnectCallback.md docs/Diversion.md docs/DtmfCallback.md @@ -53,18 +59,24 @@ docs/FailureWebhook.md docs/FieldError.md docs/FileFormatEnum.md docs/GatherCallback.md +docs/GetAsyncBulkLookupResponse.md +docs/GetAsyncBulkLookupResponseData.md +docs/InProgressLookupStatusEnum.md docs/InboundCallback.md docs/InboundCallbackMessage.md docs/InboundCallbackTypeEnum.md docs/InitiateCallback.md +docs/LatestMessageDeliveryStatusEnum.md +docs/LineTypeEnum.md docs/Link.md +docs/LinkSchema.md docs/LinksObject.md docs/ListMessageDirectionEnum.md docs/ListMessageItem.md -docs/LookupRequest.md +docs/LookupErrorResponse.md +docs/LookupErrorSchema.md +docs/LookupErrorSchemaMeta.md docs/LookupResult.md -docs/LookupStatus.md -docs/LookupStatusEnum.md docs/MachineDetectionCompleteCallback.md docs/MachineDetectionConfiguration.md docs/MachineDetectionModeEnum.md @@ -89,14 +101,22 @@ docs/MmsMessageContentFile.md docs/MultiChannelAction.md docs/MultiChannelActionCalendarEvent.md docs/MultiChannelApi.md -docs/MultiChannelChannelListObject.md -docs/MultiChannelChannelListObjectContent.md +docs/MultiChannelChannelListMMSObject.md +docs/MultiChannelChannelListMMSResponseObject.md +docs/MultiChannelChannelListObjectBase.md +docs/MultiChannelChannelListOwnerObject.md +docs/MultiChannelChannelListRBMObject.md +docs/MultiChannelChannelListRBMObjectAllOfContent.md +docs/MultiChannelChannelListRBMResponseObject.md +docs/MultiChannelChannelListRequestObject.md +docs/MultiChannelChannelListResponseObject.md +docs/MultiChannelChannelListSMSObject.md +docs/MultiChannelChannelListSMSResponseObject.md docs/MultiChannelError.md docs/MultiChannelMessageChannelEnum.md docs/MultiChannelMessageContent.md docs/MultiChannelMessageRequest.md docs/MultiChannelMessageResponseData.md -docs/MultiChannelMessageResponseDataChannelListInner.md docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md @@ -133,6 +153,7 @@ docs/StatusCallback.md docs/StatusCallbackMessage.md docs/StatusCallbackTypeEnum.md docs/StirShaken.md +docs/SyncLookupRequest.md docs/TelephoneNumber.md docs/TfvBasicAuthentication.md docs/TfvCallbackStatusEnum.md @@ -142,7 +163,6 @@ docs/TfvStatusEnum.md docs/TfvSubmissionInfo.md docs/TfvSubmissionWrapper.md docs/ThumbnailAlignmentEnum.md -docs/TnLookupRequestError.md docs/TollFreeVerificationApi.md docs/TranscribeRecording.md docs/Transcription.md @@ -214,6 +234,7 @@ src/main/java/com/bandwidth/sdk/model/AccountStatistics.java src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java src/main/java/com/bandwidth/sdk/model/Address.java src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -232,6 +253,7 @@ src/main/java/com/bandwidth/sdk/model/Callback.java src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java src/main/java/com/bandwidth/sdk/model/CodeRequest.java +src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java src/main/java/com/bandwidth/sdk/model/Conference.java src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -243,11 +265,15 @@ src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java src/main/java/com/bandwidth/sdk/model/Contact.java +src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java +src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java src/main/java/com/bandwidth/sdk/model/CreateCall.java src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java -src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java +src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java +src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java src/main/java/com/bandwidth/sdk/model/Diversion.java src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -258,18 +284,24 @@ src/main/java/com/bandwidth/sdk/model/FailureWebhook.java src/main/java/com/bandwidth/sdk/model/FieldError.java src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java src/main/java/com/bandwidth/sdk/model/GatherCallback.java +src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java +src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java +src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java src/main/java/com/bandwidth/sdk/model/InboundCallback.java src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java +src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java src/main/java/com/bandwidth/sdk/model/Link.java +src/main/java/com/bandwidth/sdk/model/LinkSchema.java src/main/java/com/bandwidth/sdk/model/LinksObject.java src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java src/main/java/com/bandwidth/sdk/model/ListMessageItem.java -src/main/java/com/bandwidth/sdk/model/LookupRequest.java +src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java +src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java +src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java src/main/java/com/bandwidth/sdk/model/LookupResult.java -src/main/java/com/bandwidth/sdk/model/LookupStatus.java -src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -290,14 +322,22 @@ src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java -src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java -src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java +src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java src/main/java/com/bandwidth/sdk/model/MultiChannelError.java src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java -src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java src/main/java/com/bandwidth/sdk/model/PageInfo.java src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -331,6 +371,7 @@ src/main/java/com/bandwidth/sdk/model/StatusCallback.java src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java src/main/java/com/bandwidth/sdk/model/StirShaken.java +src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java @@ -340,7 +381,6 @@ src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java -src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java src/main/java/com/bandwidth/sdk/model/Transcription.java src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java diff --git a/README.md b/README.md index 65c1ed97..65133813 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,9 @@ Class | Method | HTTP request | Description *MfaApi* | [**generateVoiceCode**](docs/MfaApi.md#generateVoiceCode) | **POST** /accounts/{accountId}/code/voice | Voice Authentication Code *MfaApi* | [**verifyCode**](docs/MfaApi.md#verifyCode) | **POST** /accounts/{accountId}/code/verify | Verify Authentication Code *MultiChannelApi* | [**createMultiChannelMessage**](docs/MultiChannelApi.md#createMultiChannelMessage) | **POST** /users/{accountId}/messages/multiChannel | Create Multi-Channel Message -*PhoneNumberLookupApi* | [**createLookup**](docs/PhoneNumberLookupApi.md#createLookup) | **POST** /accounts/{accountId}/tnlookup | Create Lookup -*PhoneNumberLookupApi* | [**getLookupStatus**](docs/PhoneNumberLookupApi.md#getLookupStatus) | **GET** /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status +*PhoneNumberLookupApi* | [**createAsyncBulkLookup**](docs/PhoneNumberLookupApi.md#createAsyncBulkLookup) | **POST** /accounts/{accountId}/phoneNumberLookup/bulk | Create Asynchronous Bulk Number Lookup +*PhoneNumberLookupApi* | [**createSyncLookup**](docs/PhoneNumberLookupApi.md#createSyncLookup) | **POST** /accounts/{accountId}/phoneNumberLookup | Create Synchronous Number Lookup +*PhoneNumberLookupApi* | [**getAsyncBulkLookup**](docs/PhoneNumberLookupApi.md#getAsyncBulkLookup) | **GET** /accounts/{accountId}/phoneNumberLookup/bulk/{requestId} | Get Asynchronous Bulk Number Lookup *RecordingsApi* | [**deleteRecording**](docs/RecordingsApi.md#deleteRecording) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording *RecordingsApi* | [**deleteRecordingMedia**](docs/RecordingsApi.md#deleteRecordingMedia) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Delete Recording Media *RecordingsApi* | [**deleteRecordingTranscription**](docs/RecordingsApi.md#deleteRecordingTranscription) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription @@ -183,6 +184,7 @@ Class | Method | HTTP request | Description - [AdditionalDenialReason](docs/AdditionalDenialReason.md) - [Address](docs/Address.md) - [AnswerCallback](docs/AnswerCallback.md) + - [AsyncLookupRequest](docs/AsyncLookupRequest.md) - [BlockedWebhook](docs/BlockedWebhook.md) - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) @@ -201,6 +203,7 @@ Class | Method | HTTP request | Description - [CallbackMethodEnum](docs/CallbackMethodEnum.md) - [CardWidthEnum](docs/CardWidthEnum.md) - [CodeRequest](docs/CodeRequest.md) + - [CompletedLookupStatusEnum](docs/CompletedLookupStatusEnum.md) - [Conference](docs/Conference.md) - [ConferenceCompletedCallback](docs/ConferenceCompletedCallback.md) - [ConferenceCreatedCallback](docs/ConferenceCreatedCallback.md) @@ -212,11 +215,15 @@ Class | Method | HTTP request | Description - [ConferenceRedirectCallback](docs/ConferenceRedirectCallback.md) - [ConferenceStateEnum](docs/ConferenceStateEnum.md) - [Contact](docs/Contact.md) + - [CreateAsyncBulkLookupResponse](docs/CreateAsyncBulkLookupResponse.md) + - [CreateAsyncBulkLookupResponseData](docs/CreateAsyncBulkLookupResponseData.md) - [CreateCall](docs/CreateCall.md) - [CreateCallResponse](docs/CreateCallResponse.md) - - [CreateLookupResponse](docs/CreateLookupResponse.md) - [CreateMessageRequestError](docs/CreateMessageRequestError.md) - [CreateMultiChannelMessageResponse](docs/CreateMultiChannelMessageResponse.md) + - [CreateSyncLookupResponse](docs/CreateSyncLookupResponse.md) + - [CreateSyncLookupResponseData](docs/CreateSyncLookupResponseData.md) + - [DeactivationEventEnum](docs/DeactivationEventEnum.md) - [DisconnectCallback](docs/DisconnectCallback.md) - [Diversion](docs/Diversion.md) - [DtmfCallback](docs/DtmfCallback.md) @@ -227,18 +234,24 @@ Class | Method | HTTP request | Description - [FieldError](docs/FieldError.md) - [FileFormatEnum](docs/FileFormatEnum.md) - [GatherCallback](docs/GatherCallback.md) + - [GetAsyncBulkLookupResponse](docs/GetAsyncBulkLookupResponse.md) + - [GetAsyncBulkLookupResponseData](docs/GetAsyncBulkLookupResponseData.md) + - [InProgressLookupStatusEnum](docs/InProgressLookupStatusEnum.md) - [InboundCallback](docs/InboundCallback.md) - [InboundCallbackMessage](docs/InboundCallbackMessage.md) - [InboundCallbackTypeEnum](docs/InboundCallbackTypeEnum.md) - [InitiateCallback](docs/InitiateCallback.md) + - [LatestMessageDeliveryStatusEnum](docs/LatestMessageDeliveryStatusEnum.md) + - [LineTypeEnum](docs/LineTypeEnum.md) - [Link](docs/Link.md) + - [LinkSchema](docs/LinkSchema.md) - [LinksObject](docs/LinksObject.md) - [ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md) - [ListMessageItem](docs/ListMessageItem.md) - - [LookupRequest](docs/LookupRequest.md) + - [LookupErrorResponse](docs/LookupErrorResponse.md) + - [LookupErrorSchema](docs/LookupErrorSchema.md) + - [LookupErrorSchemaMeta](docs/LookupErrorSchemaMeta.md) - [LookupResult](docs/LookupResult.md) - - [LookupStatus](docs/LookupStatus.md) - - [LookupStatusEnum](docs/LookupStatusEnum.md) - [MachineDetectionCompleteCallback](docs/MachineDetectionCompleteCallback.md) - [MachineDetectionConfiguration](docs/MachineDetectionConfiguration.md) - [MachineDetectionModeEnum](docs/MachineDetectionModeEnum.md) @@ -259,14 +272,22 @@ Class | Method | HTTP request | Description - [MmsMessageContentFile](docs/MmsMessageContentFile.md) - [MultiChannelAction](docs/MultiChannelAction.md) - [MultiChannelActionCalendarEvent](docs/MultiChannelActionCalendarEvent.md) - - [MultiChannelChannelListObject](docs/MultiChannelChannelListObject.md) - - [MultiChannelChannelListObjectContent](docs/MultiChannelChannelListObjectContent.md) + - [MultiChannelChannelListMMSObject](docs/MultiChannelChannelListMMSObject.md) + - [MultiChannelChannelListMMSResponseObject](docs/MultiChannelChannelListMMSResponseObject.md) + - [MultiChannelChannelListObjectBase](docs/MultiChannelChannelListObjectBase.md) + - [MultiChannelChannelListOwnerObject](docs/MultiChannelChannelListOwnerObject.md) + - [MultiChannelChannelListRBMObject](docs/MultiChannelChannelListRBMObject.md) + - [MultiChannelChannelListRBMObjectAllOfContent](docs/MultiChannelChannelListRBMObjectAllOfContent.md) + - [MultiChannelChannelListRBMResponseObject](docs/MultiChannelChannelListRBMResponseObject.md) + - [MultiChannelChannelListRequestObject](docs/MultiChannelChannelListRequestObject.md) + - [MultiChannelChannelListResponseObject](docs/MultiChannelChannelListResponseObject.md) + - [MultiChannelChannelListSMSObject](docs/MultiChannelChannelListSMSObject.md) + - [MultiChannelChannelListSMSResponseObject](docs/MultiChannelChannelListSMSResponseObject.md) - [MultiChannelError](docs/MultiChannelError.md) - [MultiChannelMessageChannelEnum](docs/MultiChannelMessageChannelEnum.md) - [MultiChannelMessageContent](docs/MultiChannelMessageContent.md) - [MultiChannelMessageRequest](docs/MultiChannelMessageRequest.md) - [MultiChannelMessageResponseData](docs/MultiChannelMessageResponseData.md) - - [MultiChannelMessageResponseDataChannelListInner](docs/MultiChannelMessageResponseDataChannelListInner.md) - [OptInWorkflow](docs/OptInWorkflow.md) - [PageInfo](docs/PageInfo.md) - [PriorityEnum](docs/PriorityEnum.md) @@ -300,6 +321,7 @@ Class | Method | HTTP request | Description - [StatusCallbackMessage](docs/StatusCallbackMessage.md) - [StatusCallbackTypeEnum](docs/StatusCallbackTypeEnum.md) - [StirShaken](docs/StirShaken.md) + - [SyncLookupRequest](docs/SyncLookupRequest.md) - [TelephoneNumber](docs/TelephoneNumber.md) - [TfvBasicAuthentication](docs/TfvBasicAuthentication.md) - [TfvCallbackStatusEnum](docs/TfvCallbackStatusEnum.md) @@ -309,7 +331,6 @@ Class | Method | HTTP request | Description - [TfvSubmissionInfo](docs/TfvSubmissionInfo.md) - [TfvSubmissionWrapper](docs/TfvSubmissionWrapper.md) - [ThumbnailAlignmentEnum](docs/ThumbnailAlignmentEnum.md) - - [TnLookupRequestError](docs/TnLookupRequestError.md) - [TranscribeRecording](docs/TranscribeRecording.md) - [Transcription](docs/Transcription.md) - [TranscriptionAvailableCallback](docs/TranscriptionAvailableCallback.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index fa2dfa31..e36e7be4 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4693,103 +4693,120 @@ paths: servers: - description: Production url: https://mfa.bandwidth.com/api/v1 - /accounts/{accountId}/tnlookup: + /accounts/{accountId}/phoneNumberLookup: post: - description: Create a Phone Number Lookup Request. - operationId: createLookup + description: Creates a synchronous phone number lookup request. Maximum of 100 + telephone numbers per request. + operationId: createSyncLookup parameters: - - description: Your Bandwidth Account ID. - example: "9900000" - explode: false + - explode: false in: path name: accountId required: true schema: + description: Your Bandwidth Account ID. + example: "9900000" type: string style: simple requestBody: - $ref: "#/components/requestBodies/createLookupRequest" + $ref: "#/components/requestBodies/createSyncLookupRequest" responses: - "202": + "200": content: application/json: examples: - lookupResponseExample: - $ref: "#/components/examples/lookupInProgressExample" + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" + lookupPartialExample: + $ref: "#/components/examples/lookupPartialExample" + lookupFailedExample: + $ref: "#/components/examples/lookupFailedExample" schema: - $ref: "#/components/schemas/createLookupResponse" - description: Accepted - "400": + $ref: "#/components/schemas/createSyncLookupResponse" + description: OK + default: content: application/json: examples: badRequest: - summary: Example Bad Request Error - value: - message: "Some tns do not match e164 format: 1234" - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Bad Request - "401": - content: - application/json: - examples: + $ref: "#/components/examples/badRequestExample" unauthorized: - summary: Example Unauthorized Error - value: - message: Unauthorized - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Unauthorized - "403": - content: - application/json: - examples: + $ref: "#/components/examples/unauthorizedExample" forbidden: - summary: Example Forbidden Error - value: - message: Authorization header requires 'Credential' parameter. - Authorization header requires 'Signature' parameter. Authorization - header requires 'SignedHeaders' parameter. Authorization header - requires existence of either a 'X-Amz-Date' or a 'Date' header. - Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Forbidden - "415": - content: - application/json: - examples: + $ref: "#/components/examples/forbiddenExample" mediaType: - summary: Example Unsupported Media Type Error - value: - message: Content-Type must be application/json. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Unsupported Media Type - "429": + $ref: "#/components/examples/unsupportedMediaTypeExample" + notFound: + $ref: "#/components/examples/notFoundExample" + tooManyRequests: + $ref: "#/components/examples/tooManyRequestsExample" + internalServer: + $ref: "#/components/examples/internalServerErrorExample" + schema: + $ref: "#/components/schemas/lookupErrorResponse" + description: Bad Request + summary: Create Synchronous Number Lookup + tags: + - Phone Number Lookup + x-content-type: application/json + x-accepts: + - application/json + servers: + - description: Production + url: https://api.bandwidth.com/v2 + /accounts/{accountId}/phoneNumberLookup/bulk: + post: + description: "Creates an asynchronous bulk phone number lookup request. Maximum\ + \ of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk\ + \ Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint\ + \ to check the status of the request and view the results." + operationId: createAsyncBulkLookup + parameters: + - explode: false + in: path + name: accountId + required: true + schema: + description: Your Bandwidth Account ID. + example: "9900000" + type: string + style: simple + requestBody: + $ref: "#/components/requestBodies/createAsyncBulkLookupRequest" + responses: + "202": content: application/json: examples: - mediaType: - summary: Example Too Many Requests Error - value: - message: Too many requests. + lookupInProgressExample: + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Too Many Requests - "500": + $ref: "#/components/schemas/createAsyncBulkLookupResponse" + description: Accepted + default: content: application/json: examples: + badRequest: + $ref: "#/components/examples/badRequestExample" + unauthorized: + $ref: "#/components/examples/unauthorizedExample" + forbidden: + $ref: "#/components/examples/forbiddenExample" mediaType: - summary: Example Internal Server Error Error - value: - message: Request has not been passed further. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Internal Server Error - summary: Create Lookup + $ref: "#/components/examples/unsupportedMediaTypeExample" + notFound: + $ref: "#/components/examples/notFoundExample" + tooManyRequests: + $ref: "#/components/examples/tooManyRequestsExample" + internalServer: + $ref: "#/components/examples/internalServerErrorExample" + schema: + $ref: "#/components/schemas/lookupErrorResponse" + description: Bad Request + summary: Create Asynchronous Bulk Number Lookup tags: - Phone Number Lookup x-content-type: application/json @@ -4797,28 +4814,30 @@ paths: - application/json servers: - description: Production - url: https://numbers.bandwidth.com/api/v1 - /accounts/{accountId}/tnlookup/{requestId}: + url: https://api.bandwidth.com/v2 + /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}: get: - description: Get an existing Phone Number Lookup Request. - operationId: getLookupStatus + description: "Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup).\ + \ Use this endpoint to check the status of the request and view the results." + operationId: getAsyncBulkLookup parameters: - - description: Your Bandwidth Account ID. - example: "9900000" - explode: false + - explode: false in: path name: accountId required: true schema: + description: Your Bandwidth Account ID. + example: "9900000" type: string style: simple - - description: The phone number lookup request ID from Bandwidth. - example: 004223a0-8b17-41b1-bf81-20732adf5590 - explode: false + - explode: false in: path name: requestId required: true schema: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid type: string style: simple responses: @@ -4826,90 +4845,48 @@ paths: content: application/json: examples: + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" lookupInProgressExample: $ref: "#/components/examples/lookupInProgressExample" + lookupPartialExample: + $ref: "#/components/examples/lookupPartialExample" lookupFailedExample: $ref: "#/components/examples/lookupFailedExample" - lookupSingleNumberCompleteExample: - $ref: "#/components/examples/lookupSingleNumberCompleteExample" - lookupMultipleNumbersCompleteExample: - $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" - lookupMultipleNumbersPartialCompleteExample: - $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" - lookupSingleNumberCompleteNoInfoExample: - $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" - schema: - $ref: "#/components/schemas/lookupStatus" + schema: + $ref: "#/components/schemas/getAsyncBulkLookupResponse" description: OK - "400": + default: content: application/json: examples: badRequest: - summary: Example Bad Request Error - value: - message: "Some tns do not match e164 format: 1234" - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Bad Request - "401": - content: - application/json: - examples: + $ref: "#/components/examples/badRequestExample" unauthorized: - summary: Example Unauthorized Error - value: - message: Unauthorized - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Unauthorized - "403": - content: - application/json: - examples: + $ref: "#/components/examples/unauthorizedExample" forbidden: - summary: Example Forbidden Error - value: - message: Authorization header requires 'Credential' parameter. - Authorization header requires 'Signature' parameter. Authorization - header requires 'SignedHeaders' parameter. Authorization header - requires existence of either a 'X-Amz-Date' or a 'Date' header. - Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Forbidden - "404": - description: Not Found - "429": - content: - application/json: - examples: + $ref: "#/components/examples/forbiddenExample" mediaType: - summary: Example Too Many Requests Error - value: - message: Too many requests. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Too Many Requests - "500": - content: - application/json: - examples: - mediaType: - summary: Example Internal Server Error Error - value: - message: Request has not been passed further. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Internal Server Error - summary: Get Lookup Request Status + $ref: "#/components/examples/unsupportedMediaTypeExample" + notFound: + $ref: "#/components/examples/notFoundExample" + tooManyRequests: + $ref: "#/components/examples/tooManyRequestsExample" + internalServer: + $ref: "#/components/examples/internalServerErrorExample" + schema: + $ref: "#/components/schemas/lookupErrorResponse" + description: Bad Request + summary: Get Asynchronous Bulk Number Lookup tags: - Phone Number Lookup x-accepts: - application/json servers: - description: Production - url: https://numbers.bandwidth.com/api/v1 + url: https://api.bandwidth.com/v2 /accounts/{accountId}/tollFreeVerification: post: callbacks: @@ -6212,95 +6189,204 @@ components: type: validation description: "Invalid answerUrl: only http and https are allowed." singleNumberRequestExample: - summary: Example Number Lookup Request for One Number + summary: Number Lookup Request value: - tns: - - "+19195551234" + phoneNumbers: + - "+19196104423" multipleNumberRequestExample: - summary: Example Number Lookup Request for Multiple Numbers + summary: Number Lookup Request for Multiple Numbers value: - tns: - - "+19195551234" - - "+19195554321" + phoneNumbers: + - "+19196104423" + - "+19196104424" lookupInProgressExample: - summary: Example Lookup In Progress Response + summary: Numbers Lookup In Progress value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: IN_PROGRESS + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: IN_PROGRESS + results: [] + errors: [] lookupFailedExample: - summary: Example Lookup Failed Response + summary: Numbers Lookup Failed value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: FAILED - failedTelephoneNumbers: - - "+191955512345" - lookupSingleNumberCompleteExample: - summary: Example Single Number Lookup Complete Response + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: FAILED + results: [] + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry + data + meta: + phoneNumbers: + - "+13992077164" + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupPartialExample: + summary: Numbers Lookup Partial Complete value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: "310" - Mobile Network Code: "010" - lookupMultipleNumbersCompleteExample: - summary: Example Multiple Numbers Lookup Complete Response + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: PARTIAL_COMPLETE + results: + - phoneNumber: "+19196104423" + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: "+19196104424" + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry + data + meta: + phoneNumbers: + - "+13992077164" + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupCompleteExample: + summary: Numbers Lookup Complete (without DNI) value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: "310" - Mobile Network Code: "010" - - Response Code: 0 - Message: NOERROR - E.164 Format: "+19195554321" - Formatted: (919) 555-4321 - Country: US - Line Type: Mobile - Line Provider: T-Mobile USA - Mobile Country Code: "310" - Mobile Network Code: "160" - lookupMultipleNumbersPartialCompleteExample: - summary: Example Multiple Numbers Lookup Partial Complete Response + links: + - href: href + rel: rel + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + results: + - phoneNumber: "+10072904497" + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: "+10072904498" + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: [] + lookupCompleteWithDniExample: + summary: Numbers Lookup Complete (with DNI) value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: PARTIAL_COMPLETE - result: - - Response Code: 0 - Message: NOERROR - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Country: US - Line Type: Mobile - Line Provider: Verizon Wireless - Mobile Country Code: "310" - Mobile Network Code: "010" - failedTelephoneNumbers: - - "+191955512345" - lookupSingleNumberCompleteNoInfoExample: - summary: Example Single Number Lookup Complete with No Information Response + links: + - href: href + rel: rel + method: GET + data: + requestId: 20732adf-bf81-8b17-41b1-004223a05590 + status: COMPLETE + results: + - phoneNumber: "+10072904497" + countryCodeA3: USA + lineType: MOBILE + messagingProvider: T-MOBILE USA INC + voiceProvider: T-MOBILE USA INC + latestMessageDeliveryStatus: ACTIVE + initialMessageDeliveryStatusDate: 2025-05-14 + latestMessageDeliveryStatusDate: 2025-05-18 + - phoneNumber: "+10072904498" + countryCodeA3: USA + lineType: FIXED + voiceProvider: VERIZON + latestMessageDeliveryStatus: DEACTIVATED + initialMessageDeliveryStatusDate: 2025-09-05 + latestMessageDeliveryStatusDate: 2025-09-05 + - phoneNumber: "+10072904499" + lineType: MOBILE + countryCodeA3: USA + messagingProvider: VERIZON + voiceProvider: VERIZON + deactivationReporter: Verizon Wireless + deactivationDate: 2025-09-29 01:23:00 + deactivationEvent: DEACTIVATED + latestMessageDeliveryStatus: UNKNOWN + errors: [] + badRequestExample: + summary: Example Bad Request Error value: - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - status: COMPLETE - result: - - Response Code: 3 - Message: NXDOMAIN - E.164 Format: "+19195550000" - Formatted: (919) 555-0000 - Country: US + links: [] + data: {} + errors: + - type: bad-request + description: Bad Request. Ensure that you have set the requestId as a URL + path parameter. + unauthorizedExample: + summary: Unauthorized Error + value: + links: [] + data: {} + errors: + - type: Unauthorized + description: You are not authorized to access this resource. + code: "1" + page: null + forbiddenExample: + summary: Forbidden Error + value: + links: [] + data: {} + errors: + - type: Forbidden + description: You do not have permission to access this resource. + code: "2" + page: null + unsupportedMediaTypeExample: + summary: Unsupported Media Type Error + value: + links: [] + data: {} + errors: + - type: invalid-content-type + description: Invalid content-type. Ensure that your content-type header + is set to application/json. + notFoundExample: + summary: Not Found Error + value: + links: [] + data: {} + errors: + - type: not-found + description: RequestId not found. Ensure that the requestId used in the + URL path is valid and maps to a previous request that was submitted. + tooManyRequestsExample: + summary: Too Many Requests Error + value: + links: [] + data: {} + errors: + - type: rate-limiting + description: Rate limit exceeded. Wait for the time specified in the Retry-After + header before sending another request. + internalServerErrorExample: + summary: Internal Server Error + value: + links: [] + data: {} + errors: + - code: "500" + type: unexpected-error + description: Unexpected error. Please contact Bandwidth Support if your + requests are receiving this status code for an extended period of time. parameters: accountId: description: Your Bandwidth Account ID. @@ -6841,14 +6927,25 @@ components: schema: type: string style: form + accountId1: + explode: false + in: path + name: accountId + required: true + schema: + description: Your Bandwidth Account ID. + example: "9900000" + type: string + style: simple requestId: - description: The phone number lookup request ID from Bandwidth. - example: 004223a0-8b17-41b1-bf81-20732adf5590 explode: false in: path name: requestId required: true schema: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid type: string style: simple tfPhoneNumberPathParam: @@ -7169,7 +7266,7 @@ components: $ref: "#/components/schemas/verifyCodeRequest" description: MFA code verify request body. required: true - createLookupRequest: + createSyncLookupRequest: content: application/json: examples: @@ -7178,8 +7275,18 @@ components: multipleNumberRequestExample: $ref: "#/components/examples/multipleNumberRequestExample" schema: - $ref: "#/components/schemas/lookupRequest" - description: Phone number lookup request. + $ref: "#/components/schemas/syncLookupRequest" + description: Synchronous phone number lookup request. + required: true + createAsyncBulkLookupRequest: + content: + application/json: + examples: + multipleNumberRequestExample: + $ref: "#/components/examples/multipleNumberRequestExample" + schema: + $ref: "#/components/schemas/asyncLookupRequest" + description: Asynchronous bulk phone number lookup request. required: true requestTollFreeVerificationRequest: content: @@ -7685,106 +7792,68 @@ components: schema: $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error - createLookupResponse: + createSyncLookupResponse: + content: + application/json: + examples: + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" + lookupPartialExample: + $ref: "#/components/examples/lookupPartialExample" + lookupFailedExample: + $ref: "#/components/examples/lookupFailedExample" + schema: + $ref: "#/components/schemas/createSyncLookupResponse" + description: OK + createAsyncBulkLookupResponse: content: application/json: examples: - lookupResponseExample: + lookupInProgressExample: $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: "#/components/schemas/createLookupResponse" + $ref: "#/components/schemas/createAsyncBulkLookupResponse" description: Accepted - getLookupResponse: + getAsyncBulkLookupResponse: content: application/json: examples: + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" lookupInProgressExample: $ref: "#/components/examples/lookupInProgressExample" + lookupPartialExample: + $ref: "#/components/examples/lookupPartialExample" lookupFailedExample: $ref: "#/components/examples/lookupFailedExample" - lookupSingleNumberCompleteExample: - $ref: "#/components/examples/lookupSingleNumberCompleteExample" - lookupMultipleNumbersCompleteExample: - $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" - lookupMultipleNumbersPartialCompleteExample: - $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" - lookupSingleNumberCompleteNoInfoExample: - $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" - schema: - $ref: "#/components/schemas/lookupStatus" + schema: + $ref: "#/components/schemas/getAsyncBulkLookupResponse" description: OK - tnLookupBadRequestError: + tnLookupDefaultResponse: content: application/json: examples: badRequest: - summary: Example Bad Request Error - value: - message: "Some tns do not match e164 format: 1234" - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Bad Request - tnLookupUnauthorizedError: - content: - application/json: - examples: + $ref: "#/components/examples/badRequestExample" unauthorized: - summary: Example Unauthorized Error - value: - message: Unauthorized - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Unauthorized - tnLookupForbiddenError: - content: - application/json: - examples: + $ref: "#/components/examples/unauthorizedExample" forbidden: - summary: Example Forbidden Error - value: - message: Authorization header requires 'Credential' parameter. Authorization - header requires 'Signature' parameter. Authorization header requires - 'SignedHeaders' parameter. Authorization header requires existence - of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic - Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Forbidden - tnLookupMediaTypeError: - content: - application/json: - examples: - mediaType: - summary: Example Unsupported Media Type Error - value: - message: Content-Type must be application/json. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Unsupported Media Type - tnLookupNotFoundError: - description: Not Found - tnLookupTooManyRequestsError: - content: - application/json: - examples: + $ref: "#/components/examples/forbiddenExample" mediaType: - summary: Example Too Many Requests Error - value: - message: Too many requests. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Too Many Requests - tnLookupInternalServerError: - content: - application/json: - examples: - mediaType: - summary: Example Internal Server Error Error - value: - message: Request has not been passed further. - schema: - $ref: "#/components/schemas/tnLookupRequestError" - description: Internal Server Error + $ref: "#/components/examples/unsupportedMediaTypeExample" + notFound: + $ref: "#/components/examples/notFoundExample" + tooManyRequests: + $ref: "#/components/examples/tooManyRequestsExample" + internalServer: + $ref: "#/components/examples/internalServerErrorExample" + schema: + $ref: "#/components/schemas/lookupErrorResponse" + description: Bad Request getTollFreeVerificationStatusResponse: content: application/json: @@ -9054,6 +9123,12 @@ components: 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" discriminator: mapping: REPLY: "#/components/schemas/rbmActionBase" @@ -9063,13 +9138,7 @@ components: OPEN_URL: "#/components/schemas/rbmActionOpenUrl" REQUEST_LOCATION: "#/components/schemas/rbmActionBase" propertyName: type - oneOf: - - $ref: "#/components/schemas/rbmActionBase" - - $ref: "#/components/schemas/rbmActionDial" - - $ref: "#/components/schemas/rbmActionViewLocation" - - $ref: "#/components/schemas/multiChannelActionCalendarEvent" - - $ref: "#/components/schemas/rbmActionOpenUrl" - multiChannelChannelListObject: + multiChannelChannelListObjectBase: properties: from: description: The sender ID of the message. This could be an alphanumeric @@ -9083,14 +9152,109 @@ components: type: string channel: $ref: "#/components/schemas/multiChannelMessageChannelEnum" - content: - $ref: "#/components/schemas/multiChannelChannelListObject_content" required: - applicationId - channel - - content - from type: object + multiChannelChannelListRBMObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - properties: + content: + $ref: "#/components/schemas/multiChannelChannelListRBMObject_allOf_content" + type: object + required: + - content + multiChannelChannelListSMSObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - properties: + content: + $ref: "#/components/schemas/smsMessageContent" + type: object + required: + - content + multiChannelChannelListMMSObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" + - properties: + content: + $ref: "#/components/schemas/mmsMessageContent" + type: object + required: + - content + multiChannelChannelListRBMResponseObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListRBMObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + example: + owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + multiChannelChannelListSMSResponseObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListSMSObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + multiChannelChannelListMMSResponseObject: + allOf: + - $ref: "#/components/schemas/multiChannelChannelListMMSObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" + multiChannelChannelListRequestObject: + anyOf: + - $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" + propertyName: channel + multiChannelChannelListOwnerObject: + properties: + owner: + description: The Bandwidth senderId associated with the message. Identical + to 'from'. + type: string + required: + - owner + type: object + multiChannelChannelListResponseObject: + anyOf: + - $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" + propertyName: channel multiChannelMessageRequest: description: Multi-Channel Message Request properties: @@ -9103,7 +9267,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: "#/components/schemas/multiChannelChannelListObject" + $ref: "#/components/schemas/multiChannelChannelListRequestObject" maxItems: 4 type: array tag: @@ -9270,7 +9434,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: "#/components/schemas/multiChannelMessageResponseData_channelList_inner" + $ref: "#/components/schemas/multiChannelChannelListResponseObject" maxItems: 4 type: array tag: @@ -13038,9 +13202,14 @@ components: example: Missing Authentication Token type: string type: object - lookupStatusEnum: - description: "The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE,\ - \ or FAILED)." + completedLookupStatusEnum: + enum: + - COMPLETE + - PARTIAL_COMPLETE + - FAILED + example: COMPLETE + type: string + inProgressLookupStatusEnum: enum: - IN_PROGRESS - COMPLETE @@ -13048,137 +13217,377 @@ components: - FAILED example: COMPLETE type: string - lookupRequest: - description: Create phone number lookup request. + deactivationEventEnum: + description: | + [DNI-Only](#section/DNI-Only). + `DEACTIVATED` if the carrier reported a deactivation event for this phone number. + enum: + - DEACTIVATED + type: string + latestMessageDeliveryStatusEnum: + description: |- + [DNI-Only](#section/DNI-Only). The current delivery status of the phone number. + - ACTIVE: A message was successfully sent to the number (delivery code 0). + - DEACTIVATED: A message was not delivered to a number (delivery code 720) + - UNKNOWN: Bandwidth cannot find an delivery status entry for the number. + enum: + - ACTIVE + - DEACTIVATED + - UNKNOWN + type: string + lineTypeEnum: + enum: + - FIXED + - VOIP-FIXED + - MOBILE + - VOIP + example: MOBILE + type: string + requestId: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid + type: string + linkSchema: + example: + method: GET + rel: aRelatedResource + href: /relative/uri + properties: + href: + description: URI of the link. + example: /relative/uri + type: string + rel: + description: Specifies the relationship between this link and the resource. + example: aRelatedResource + type: string + method: + description: HTTP method to be used. + example: GET + type: string + title: Link + type: object + lookupErrorSchema: + example: + code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + properties: + code: + description: Validation error code + example: NO-MATCH + type: string + description: + description: Description of validation error + example: Example error description + type: string + type: + description: Type of validation error + example: NumberInventory + type: string + meta: + $ref: "#/components/schemas/lookupErrorSchema_meta" + type: object + syncLookupRequest: properties: - tns: + phoneNumbers: + description: Telephone numbers in E.164 format. items: + pattern: "^\\+[1-9]\\d{1,14}$" type: string + maximum: 100 + minimum: 1 type: array required: - - tns + - phoneNumbers type: object - createLookupResponse: - description: "The request has been accepted for processing but not yet finished\ - \ and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED)." + asyncLookupRequest: + properties: + phoneNumbers: + description: Telephone numbers in E.164 format. + items: + pattern: "^\\+[1-9]\\d{1,14}$" + type: string + maximum: 15000 + minimum: 1 + type: array + required: + - phoneNumbers + type: object + createSyncLookupResponse: example: - requestId: requestId - status: COMPLETE + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + results: + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + links: [] + errors: + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory properties: - requestId: - description: The phone number lookup request ID from Bandwidth. - type: string - status: - $ref: "#/components/schemas/lookupStatusEnum" + links: + example: [] + items: + $ref: "#/components/schemas/linkSchema" + type: array + data: + $ref: "#/components/schemas/createSyncLookupResponse_data" + errors: + items: + $ref: "#/components/schemas/lookupErrorSchema" + type: array type: object - lookupStatus: - description: "If requestId exists, the result for that request is returned.\ - \ See the Examples for details on the various responses that you can receive.\ - \ Generally, if you see a Response Code of 0 in a result for a TN, information\ - \ will be available for it. Any other Response Code will indicate no information\ - \ was available for the TN." + createAsyncBulkLookupResponse: example: - result: - - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Line Provider: Verizon Wireless - Message: NOERROR - Line Type: Mobile - Country: US - Mobile Country Code: "310" - Mobile Network Code: "010" - Response Code: 0 - - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Line Provider: Verizon Wireless - Message: NOERROR - Line Type: Mobile - Country: US - Mobile Country Code: "310" - Mobile Network Code: "010" - Response Code: 0 - requestId: 004223a0-8b17-41b1-bf81-20732adf5590 - failedTelephoneNumbers: - - "+191955512345" - status: COMPLETE + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + links: + - method: GET + rel: aRelatedResource + href: /relative/uri + - method: GET + rel: aRelatedResource + href: /relative/uri + errors: + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory properties: - requestId: - description: The requestId. - example: 004223a0-8b17-41b1-bf81-20732adf5590 - type: string - status: - $ref: "#/components/schemas/lookupStatusEnum" - result: - description: The carrier information results for the specified telephone - number. + links: + description: Links for pagination (if applicable) items: - $ref: "#/components/schemas/lookupResult" + $ref: "#/components/schemas/linkSchema" type: array - failedTelephoneNumbers: - description: The telephone numbers whose lookup failed. - example: - - "+191955512345" + data: + $ref: "#/components/schemas/createAsyncBulkLookupResponse_data" + errors: items: - type: string + $ref: "#/components/schemas/lookupErrorSchema" + type: array + type: object + getAsyncBulkLookupResponse: + example: + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + results: + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + links: [] + errors: + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + properties: + links: + example: [] + items: + $ref: "#/components/schemas/linkSchema" + type: array + data: + $ref: "#/components/schemas/getAsyncBulkLookupResponse_data" + errors: + items: + $ref: "#/components/schemas/lookupErrorSchema" + type: array + type: object + lookupErrorResponse: + example: + data: "{}" + links: [] + errors: + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + - code: NO-MATCH + meta: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + description: Example error description + type: NumberInventory + properties: + links: + example: [] + items: + $ref: "#/components/schemas/linkSchema" + type: array + data: + description: The phone number lookup response data + type: object + errors: + items: + $ref: "#/components/schemas/lookupErrorSchema" type: array type: object lookupResult: description: Carrier information results for the specified telephone number. example: - E.164 Format: "+19195551234" - Formatted: (919) 555-1234 - Line Provider: Verizon Wireless - Message: NOERROR - Line Type: Mobile - Country: US - Mobile Country Code: "310" - Mobile Network Code: "010" - Response Code: 0 + deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 properties: - Response Code: - description: Our vendor's response code. - example: 0 - type: integer - Message: - description: Message associated with the response code. - example: NOERROR - type: string - E.164 Format: + phoneNumber: description: The telephone number in E.164 format. - example: "+19195551234" - type: string - Formatted: - description: The formatted version of the telephone number. - example: (919) 555-1234 - type: string - Country: - description: The country of the telephone number. - example: US - type: string - Line Type: - description: The line type of the telephone number. - example: Mobile + example: "+10072904498" type: string - Line Provider: + lineType: + $ref: "#/components/schemas/lineTypeEnum" + messagingProvider: description: The messaging service provider of the telephone number. example: Verizon Wireless type: string - Mobile Country Code: - description: The first half of the Home Network Identity (HNI). - example: "310" + voiceProvider: + description: The voice service provider of the telephone number. + example: Verizon Wireless type: string - Mobile Network Code: - description: The second half of the HNI. - example: "010" + countryCodeA3: + description: The country code of the telephone number in ISO 3166-1 alpha-3 + format. + example: USA type: string - type: object - tnLookupRequestError: - example: - message: example error message - properties: - message: - description: A description of what validation error occurred. - example: example error message + deactivationReporter: + description: | + [DNI-Only](#section/DNI-Only). + The carrier that reported a deactivation event for this phone number. + type: string + deactivationDate: + description: "[DNI-Only](#section/DNI-Only). The datetime the carrier reported\ + \ a deactivation event." + example: 2025-06-20 18:35 + format: date-time-local + type: string + deactivationEvent: + $ref: "#/components/schemas/deactivationEventEnum" + latestMessageDeliveryStatus: + $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\ + \ as the \"start time\" for that status.\nValue resets every time the\ + \ `latestMessageDeliveryStatus` changes." + example: 2025-06-20 + format: date + type: string + latestMessageDeliveryStatusDate: + description: "[DNI-Only](#section/DNI-Only). The date bandwidth last received\ + \ delivery status information for this phone number. \nUse this field\ + \ to understand how up-to-date the `latestMessageDeliveryStatus` is.\n\ + Value resets every time the `latestMessageDeliveryStatus` changes." + example: 2025-06-21 + format: date type: string type: object accountId1: @@ -14361,53 +14770,137 @@ components: type: object required: - height - multiChannelChannelListObject_content: + 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/smsMessageContent" - - $ref: "#/components/schemas/mmsMessageContent" - multiChannelMessageResponseData_channelList_inner: - allOf: - - $ref: "#/components/schemas/multiChannelChannelListObject" - - properties: - owner: - description: The Bandwidth senderId associated with the message. Identical - to 'from'. + lookupErrorSchema_meta: + example: + code: 1001 + message: Invalid TNs + phoneNumbers: + - "+13992077164" + - "+19196104424" + properties: + phoneNumbers: + example: + - "+13992077164" + - "+19196104424" + items: + description: Phone number experiencing the error. type: string - required: - - owner - type: object + type: array + message: + description: Message describing the error + example: Invalid TNs + type: string + code: + description: Error code associated with the message + example: 1001 + type: integer + type: object + createSyncLookupResponse_data: + description: The phone number lookup response data example: - owner: owner - channel: RBM - from: BandwidthRBM - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - content: - suggestions: - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world - type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world - type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world - type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world - type: REPLY - - postbackData: !!binary |- - U0dWc2JHOGdkMjl5YkdRPQ== - text: Hello world - type: REPLY - text: Hello world + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + results: + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + properties: + requestId: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid + type: string + status: + $ref: "#/components/schemas/completedLookupStatusEnum" + results: + description: The carrier information results for the specified telephone + numbers. + items: + $ref: "#/components/schemas/lookupResult" + type: array + type: object + createAsyncBulkLookupResponse_data: + description: The phone number lookup response data + example: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + properties: + requestId: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid + type: string + status: + $ref: "#/components/schemas/inProgressLookupStatusEnum" + type: object + getAsyncBulkLookupResponse_data: + description: The phone number lookup response data + example: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + results: + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + - deactivationEvent: DEACTIVATED + messagingProvider: Verizon Wireless + deactivationDate: 2025-06-20 18:35 + latestMessageDeliveryStatus: ACTIVE + phoneNumber: "+10072904498" + countryCodeA3: USA + initialMessageDeliveryStatusDate: 2025-06-20 + lineType: MOBILE + deactivationReporter: deactivationReporter + voiceProvider: Verizon Wireless + latestMessageDeliveryStatusDate: 2025-06-21 + status: COMPLETE + properties: + requestId: + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + format: uuid + type: string + status: + $ref: "#/components/schemas/inProgressLookupStatusEnum" + results: + description: The carrier information results for the specified telephone + number. + items: + $ref: "#/components/schemas/lookupResult" + type: array + type: object webhookSubscription_basicAuthentication: description: "Basic authentication credentials are not required, but if present,\ \ both username and password must be provided." diff --git a/docs/AsyncLookupRequest.md b/docs/AsyncLookupRequest.md new file mode 100644 index 00000000..ab5ad863 --- /dev/null +++ b/docs/AsyncLookupRequest.md @@ -0,0 +1,13 @@ + + +# AsyncLookupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**phoneNumbers** | **List<String>** | Telephone numbers in E.164 format. | | + + + diff --git a/docs/CompletedLookupStatusEnum.md b/docs/CompletedLookupStatusEnum.md new file mode 100644 index 00000000..fa902bfb --- /dev/null +++ b/docs/CompletedLookupStatusEnum.md @@ -0,0 +1,15 @@ + + +# CompletedLookupStatusEnum + +## Enum + + +* `COMPLETE` (value: `"COMPLETE"`) + +* `PARTIAL_COMPLETE` (value: `"PARTIAL_COMPLETE"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/CreateAsyncBulkLookupResponse.md b/docs/CreateAsyncBulkLookupResponse.md new file mode 100644 index 00000000..8c557566 --- /dev/null +++ b/docs/CreateAsyncBulkLookupResponse.md @@ -0,0 +1,15 @@ + + +# CreateAsyncBulkLookupResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**links** | [**List<LinkSchema>**](LinkSchema.md) | Links for pagination (if applicable) | [optional] | +|**data** | [**CreateAsyncBulkLookupResponseData**](CreateAsyncBulkLookupResponseData.md) | | [optional] | +|**errors** | [**List<LookupErrorSchema>**](LookupErrorSchema.md) | | [optional] | + + + diff --git a/docs/CreateAsyncBulkLookupResponseData.md b/docs/CreateAsyncBulkLookupResponseData.md new file mode 100644 index 00000000..b6fcba96 --- /dev/null +++ b/docs/CreateAsyncBulkLookupResponseData.md @@ -0,0 +1,15 @@ + + +# CreateAsyncBulkLookupResponseData + +The phone number lookup response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestId** | **UUID** | The phone number lookup request ID from Bandwidth. | [optional] | +|**status** | **InProgressLookupStatusEnum** | | [optional] | + + + diff --git a/docs/CreateSyncLookupResponse.md b/docs/CreateSyncLookupResponse.md new file mode 100644 index 00000000..b92b2c26 --- /dev/null +++ b/docs/CreateSyncLookupResponse.md @@ -0,0 +1,15 @@ + + +# CreateSyncLookupResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**links** | [**List<LinkSchema>**](LinkSchema.md) | | [optional] | +|**data** | [**CreateSyncLookupResponseData**](CreateSyncLookupResponseData.md) | | [optional] | +|**errors** | [**List<LookupErrorSchema>**](LookupErrorSchema.md) | | [optional] | + + + diff --git a/docs/CreateSyncLookupResponseData.md b/docs/CreateSyncLookupResponseData.md new file mode 100644 index 00000000..918d5c57 --- /dev/null +++ b/docs/CreateSyncLookupResponseData.md @@ -0,0 +1,16 @@ + + +# CreateSyncLookupResponseData + +The phone number lookup response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestId** | **UUID** | The phone number lookup request ID from Bandwidth. | [optional] | +|**status** | **CompletedLookupStatusEnum** | | [optional] | +|**results** | [**List<LookupResult>**](LookupResult.md) | The carrier information results for the specified telephone numbers. | [optional] | + + + diff --git a/docs/DeactivationEventEnum.md b/docs/DeactivationEventEnum.md new file mode 100644 index 00000000..a9c94287 --- /dev/null +++ b/docs/DeactivationEventEnum.md @@ -0,0 +1,11 @@ + + +# DeactivationEventEnum + +## Enum + + +* `DEACTIVATED` (value: `"DEACTIVATED"`) + + + diff --git a/docs/GetAsyncBulkLookupResponse.md b/docs/GetAsyncBulkLookupResponse.md new file mode 100644 index 00000000..dd1eaffc --- /dev/null +++ b/docs/GetAsyncBulkLookupResponse.md @@ -0,0 +1,15 @@ + + +# GetAsyncBulkLookupResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**links** | [**List<LinkSchema>**](LinkSchema.md) | | [optional] | +|**data** | [**GetAsyncBulkLookupResponseData**](GetAsyncBulkLookupResponseData.md) | | [optional] | +|**errors** | [**List<LookupErrorSchema>**](LookupErrorSchema.md) | | [optional] | + + + diff --git a/docs/GetAsyncBulkLookupResponseData.md b/docs/GetAsyncBulkLookupResponseData.md new file mode 100644 index 00000000..b1f5a3e3 --- /dev/null +++ b/docs/GetAsyncBulkLookupResponseData.md @@ -0,0 +1,16 @@ + + +# GetAsyncBulkLookupResponseData + +The phone number lookup response data + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**requestId** | **UUID** | The phone number lookup request ID from Bandwidth. | [optional] | +|**status** | **InProgressLookupStatusEnum** | | [optional] | +|**results** | [**List<LookupResult>**](LookupResult.md) | The carrier information results for the specified telephone number. | [optional] | + + + diff --git a/docs/InProgressLookupStatusEnum.md b/docs/InProgressLookupStatusEnum.md new file mode 100644 index 00000000..62653e42 --- /dev/null +++ b/docs/InProgressLookupStatusEnum.md @@ -0,0 +1,17 @@ + + +# InProgressLookupStatusEnum + +## Enum + + +* `IN_PROGRESS` (value: `"IN_PROGRESS"`) + +* `COMPLETE` (value: `"COMPLETE"`) + +* `PARTIAL_COMPLETE` (value: `"PARTIAL_COMPLETE"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/LatestMessageDeliveryStatusEnum.md b/docs/LatestMessageDeliveryStatusEnum.md new file mode 100644 index 00000000..b90b2cbe --- /dev/null +++ b/docs/LatestMessageDeliveryStatusEnum.md @@ -0,0 +1,15 @@ + + +# LatestMessageDeliveryStatusEnum + +## Enum + + +* `ACTIVE` (value: `"ACTIVE"`) + +* `DEACTIVATED` (value: `"DEACTIVATED"`) + +* `UNKNOWN` (value: `"UNKNOWN"`) + + + diff --git a/docs/LineTypeEnum.md b/docs/LineTypeEnum.md new file mode 100644 index 00000000..d26e290f --- /dev/null +++ b/docs/LineTypeEnum.md @@ -0,0 +1,17 @@ + + +# LineTypeEnum + +## Enum + + +* `FIXED` (value: `"FIXED"`) + +* `VOIP_FIXED` (value: `"VOIP-FIXED"`) + +* `MOBILE` (value: `"MOBILE"`) + +* `VOIP` (value: `"VOIP"`) + + + diff --git a/docs/LinkSchema.md b/docs/LinkSchema.md new file mode 100644 index 00000000..2b5d0089 --- /dev/null +++ b/docs/LinkSchema.md @@ -0,0 +1,15 @@ + + +# LinkSchema + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**href** | **String** | URI of the link. | [optional] | +|**rel** | **String** | Specifies the relationship between this link and the resource. | [optional] | +|**method** | **String** | HTTP method to be used. | [optional] | + + + diff --git a/docs/LookupErrorResponse.md b/docs/LookupErrorResponse.md new file mode 100644 index 00000000..544893e0 --- /dev/null +++ b/docs/LookupErrorResponse.md @@ -0,0 +1,15 @@ + + +# LookupErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**links** | [**List<LinkSchema>**](LinkSchema.md) | | [optional] | +|**data** | **Object** | The phone number lookup response data | [optional] | +|**errors** | [**List<LookupErrorSchema>**](LookupErrorSchema.md) | | [optional] | + + + diff --git a/docs/LookupErrorSchema.md b/docs/LookupErrorSchema.md new file mode 100644 index 00000000..207ca9d9 --- /dev/null +++ b/docs/LookupErrorSchema.md @@ -0,0 +1,16 @@ + + +# LookupErrorSchema + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **String** | Validation error code | [optional] | +|**description** | **String** | Description of validation error | [optional] | +|**type** | **String** | Type of validation error | [optional] | +|**meta** | [**LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] | + + + diff --git a/docs/LookupErrorSchemaMeta.md b/docs/LookupErrorSchemaMeta.md new file mode 100644 index 00000000..261df19d --- /dev/null +++ b/docs/LookupErrorSchemaMeta.md @@ -0,0 +1,15 @@ + + +# LookupErrorSchemaMeta + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**phoneNumbers** | **List<String>** | | [optional] | +|**message** | **String** | Message describing the error | [optional] | +|**code** | **Integer** | Error code associated with the message | [optional] | + + + diff --git a/docs/LookupResult.md b/docs/LookupResult.md index e2f23396..21e16602 100644 --- a/docs/LookupResult.md +++ b/docs/LookupResult.md @@ -8,15 +8,17 @@ Carrier information results for the specified telephone number. | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**responseCode** | **Integer** | Our vendor's response code. | [optional] | -|**message** | **String** | Message associated with the response code. | [optional] | -|**e164Format** | **String** | The telephone number in E.164 format. | [optional] | -|**formatted** | **String** | The formatted version of the telephone number. | [optional] | -|**country** | **String** | The country of the telephone number. | [optional] | -|**lineType** | **String** | The line type of the telephone number. | [optional] | -|**lineProvider** | **String** | The messaging service provider of the telephone number. | [optional] | -|**mobileCountryCode** | **String** | The first half of the Home Network Identity (HNI). | [optional] | -|**mobileNetworkCode** | **String** | The second half of the HNI. | [optional] | +|**phoneNumber** | **String** | The telephone number in E.164 format. | [optional] | +|**lineType** | **LineTypeEnum** | | [optional] | +|**messagingProvider** | **String** | The messaging service provider of the telephone number. | [optional] | +|**voiceProvider** | **String** | The voice service provider of the telephone number. | [optional] | +|**countryCodeA3** | **String** | The country code of the telephone number in ISO 3166-1 alpha-3 format. | [optional] | +|**deactivationReporter** | **String** | [DNI-Only](#section/DNI-Only). The carrier that reported a deactivation event for this phone number. | [optional] | +|**deactivationDate** | **String** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] | +|**deactivationEvent** | **DeactivationEventEnum** | | [optional] | +|**latestMessageDeliveryStatus** | **LatestMessageDeliveryStatusEnum** | | [optional] | +|**initialMessageDeliveryStatusDate** | **LocalDate** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] | +|**latestMessageDeliveryStatusDate** | **LocalDate** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. | [optional] | diff --git a/docs/MultiChannelChannelListMMSObject.md b/docs/MultiChannelChannelListMMSObject.md new file mode 100644 index 00000000..2a68d85f --- /dev/null +++ b/docs/MultiChannelChannelListMMSObject.md @@ -0,0 +1,16 @@ + + +# MultiChannelChannelListMMSObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MmsMessageContent**](MmsMessageContent.md) | | | + + + diff --git a/docs/MultiChannelChannelListMMSResponseObject.md b/docs/MultiChannelChannelListMMSResponseObject.md new file mode 100644 index 00000000..1de95515 --- /dev/null +++ b/docs/MultiChannelChannelListMMSResponseObject.md @@ -0,0 +1,17 @@ + + +# MultiChannelChannelListMMSResponseObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MmsMessageContent**](MmsMessageContent.md) | | | +|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | + + + diff --git a/docs/MultiChannelChannelListObjectBase.md b/docs/MultiChannelChannelListObjectBase.md new file mode 100644 index 00000000..63625632 --- /dev/null +++ b/docs/MultiChannelChannelListObjectBase.md @@ -0,0 +1,15 @@ + + +# MultiChannelChannelListObjectBase + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | + + + diff --git a/docs/MultiChannelChannelListOwnerObject.md b/docs/MultiChannelChannelListOwnerObject.md new file mode 100644 index 00000000..327a4873 --- /dev/null +++ b/docs/MultiChannelChannelListOwnerObject.md @@ -0,0 +1,13 @@ + + +# MultiChannelChannelListOwnerObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | + + + diff --git a/docs/MultiChannelChannelListRBMObject.md b/docs/MultiChannelChannelListRBMObject.md new file mode 100644 index 00000000..ad90bcbe --- /dev/null +++ b/docs/MultiChannelChannelListRBMObject.md @@ -0,0 +1,16 @@ + + +# MultiChannelChannelListRBMObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | | + + + diff --git a/docs/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/MultiChannelChannelListRBMObjectAllOfContent.md new file mode 100644 index 00000000..6ff58ab3 --- /dev/null +++ b/docs/MultiChannelChannelListRBMObjectAllOfContent.md @@ -0,0 +1,21 @@ + + +# MultiChannelChannelListRBMObjectAllOfContent + +The content of the message. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**text** | **String** | The text associated with the message. Must be 3270 characters or less | | +|**suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | +|**media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | | +|**orientation** | **StandaloneCardOrientationEnum** | | | +|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | | +|**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | | +|**cardWidth** | **CardWidthEnum** | | | +|**cardContents** | [**List<RbmCardContent>**](RbmCardContent.md) | | | + + + diff --git a/docs/MultiChannelChannelListRBMResponseObject.md b/docs/MultiChannelChannelListRBMResponseObject.md new file mode 100644 index 00000000..6a46779b --- /dev/null +++ b/docs/MultiChannelChannelListRBMResponseObject.md @@ -0,0 +1,17 @@ + + +# MultiChannelChannelListRBMResponseObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | | +|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | + + + diff --git a/docs/MultiChannelChannelListRequestObject.md b/docs/MultiChannelChannelListRequestObject.md new file mode 100644 index 00000000..097021c5 --- /dev/null +++ b/docs/MultiChannelChannelListRequestObject.md @@ -0,0 +1,16 @@ + + +# MultiChannelChannelListRequestObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MmsMessageContent**](MmsMessageContent.md) | | | + + + diff --git a/docs/MultiChannelChannelListResponseObject.md b/docs/MultiChannelChannelListResponseObject.md new file mode 100644 index 00000000..3983973a --- /dev/null +++ b/docs/MultiChannelChannelListResponseObject.md @@ -0,0 +1,17 @@ + + +# MultiChannelChannelListResponseObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**MmsMessageContent**](MmsMessageContent.md) | | | +|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | + + + diff --git a/docs/MultiChannelChannelListSMSObject.md b/docs/MultiChannelChannelListSMSObject.md new file mode 100644 index 00000000..1ffde1f0 --- /dev/null +++ b/docs/MultiChannelChannelListSMSObject.md @@ -0,0 +1,16 @@ + + +# MultiChannelChannelListSMSObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**SmsMessageContent**](SmsMessageContent.md) | | | + + + diff --git a/docs/MultiChannelChannelListSMSResponseObject.md b/docs/MultiChannelChannelListSMSResponseObject.md new file mode 100644 index 00000000..84246b1e --- /dev/null +++ b/docs/MultiChannelChannelListSMSResponseObject.md @@ -0,0 +1,17 @@ + + +# MultiChannelChannelListSMSResponseObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | +|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | +|**channel** | **MultiChannelMessageChannelEnum** | | | +|**content** | [**SmsMessageContent**](SmsMessageContent.md) | | | +|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | + + + diff --git a/docs/MultiChannelMessageRequest.md b/docs/MultiChannelMessageRequest.md index 9d1e87e2..7c33d83b 100644 --- a/docs/MultiChannelMessageRequest.md +++ b/docs/MultiChannelMessageRequest.md @@ -9,7 +9,7 @@ Multi-Channel Message Request | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**to** | **String** | The phone number the message should be sent to in E164 format. | | -|**channelList** | [**List<MultiChannelChannelListObject>**](MultiChannelChannelListObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | | +|**channelList** | [**List<MultiChannelChannelListRequestObject>**](MultiChannelChannelListRequestObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | | |**tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] | |**priority** | **PriorityEnum** | | [optional] | |**expiration** | **OffsetDateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] | diff --git a/docs/MultiChannelMessageResponseData.md b/docs/MultiChannelMessageResponseData.md index b91e8678..8320fd14 100644 --- a/docs/MultiChannelMessageResponseData.md +++ b/docs/MultiChannelMessageResponseData.md @@ -12,7 +12,7 @@ The data returned in a multichannel message response. |**time** | **OffsetDateTime** | The time the message was received by the Bandwidth API. | | |**direction** | **MessageDirectionEnum** | | | |**to** | **Set<String>** | The destination phone number(s) of the message, in E164 format. | | -|**channelList** | [**List<MultiChannelMessageResponseDataChannelListInner>**](MultiChannelMessageResponseDataChannelListInner.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | | +|**channelList** | [**List<MultiChannelChannelListResponseObject>**](MultiChannelChannelListResponseObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | | |**tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] | |**priority** | **PriorityEnum** | | [optional] | |**expiration** | **OffsetDateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] | diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index 4ef1f76d..38c0c987 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -4,17 +4,18 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createLookup**](PhoneNumberLookupApi.md#createLookup) | **POST** /accounts/{accountId}/tnlookup | Create Lookup | -| [**getLookupStatus**](PhoneNumberLookupApi.md#getLookupStatus) | **GET** /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status | +| [**createAsyncBulkLookup**](PhoneNumberLookupApi.md#createAsyncBulkLookup) | **POST** /accounts/{accountId}/phoneNumberLookup/bulk | Create Asynchronous Bulk Number Lookup | +| [**createSyncLookup**](PhoneNumberLookupApi.md#createSyncLookup) | **POST** /accounts/{accountId}/phoneNumberLookup | Create Synchronous Number Lookup | +| [**getAsyncBulkLookup**](PhoneNumberLookupApi.md#getAsyncBulkLookup) | **GET** /accounts/{accountId}/phoneNumberLookup/bulk/{requestId} | Get Asynchronous Bulk Number Lookup | - -# **createLookup** -> CreateLookupResponse createLookup(accountId, lookupRequest) + +# **createAsyncBulkLookup** +> CreateAsyncBulkLookupResponse createAsyncBulkLookup(accountId, asyncLookupRequest) -Create Lookup +Create Asynchronous Bulk Number Lookup -Create a Phone Number Lookup Request. +Creates an asynchronous bulk phone number lookup request. Maximum of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint to check the status of the request and view the results. ### Example ```java @@ -41,13 +42,13 @@ public class Example { OAuth2.setAccessToken("YOUR ACCESS TOKEN"); PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID. - LookupRequest lookupRequest = new LookupRequest(); // LookupRequest | Phone number lookup request. + String accountId = "9900000"; // String | + AsyncLookupRequest asyncLookupRequest = new AsyncLookupRequest(); // AsyncLookupRequest | Asynchronous bulk phone number lookup request. try { - CreateLookupResponse result = apiInstance.createLookup(accountId, lookupRequest); + CreateAsyncBulkLookupResponse result = apiInstance.createAsyncBulkLookup(accountId, asyncLookupRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PhoneNumberLookupApi#createLookup"); + System.err.println("Exception when calling PhoneNumberLookupApi#createAsyncBulkLookup"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -61,12 +62,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID. | | -| **lookupRequest** | [**LookupRequest**](LookupRequest.md)| Phone number lookup request. | | +| **accountId** | **String**| | | +| **asyncLookupRequest** | [**AsyncLookupRequest**](AsyncLookupRequest.md)| Asynchronous bulk phone number lookup request. | | ### Return type -[**CreateLookupResponse**](CreateLookupResponse.md) +[**CreateAsyncBulkLookupResponse**](CreateAsyncBulkLookupResponse.md) ### Authorization @@ -81,20 +82,15 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **202** | Accepted | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **415** | Unsupported Media Type | - | -| **429** | Too Many Requests | - | -| **500** | Internal Server Error | - | +| **0** | Bad Request | - | - -# **getLookupStatus** -> LookupStatus getLookupStatus(accountId, requestId) + +# **createSyncLookup** +> CreateSyncLookupResponse createSyncLookup(accountId, syncLookupRequest) -Get Lookup Request Status +Create Synchronous Number Lookup -Get an existing Phone Number Lookup Request. +Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. ### Example ```java @@ -121,13 +117,13 @@ public class Example { OAuth2.setAccessToken("YOUR ACCESS TOKEN"); PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); - String accountId = "9900000"; // String | Your Bandwidth Account ID. - String requestId = "004223a0-8b17-41b1-bf81-20732adf5590"; // String | The phone number lookup request ID from Bandwidth. + String accountId = "9900000"; // String | + SyncLookupRequest syncLookupRequest = new SyncLookupRequest(); // SyncLookupRequest | Synchronous phone number lookup request. try { - LookupStatus result = apiInstance.getLookupStatus(accountId, requestId); + CreateSyncLookupResponse result = apiInstance.createSyncLookup(accountId, syncLookupRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PhoneNumberLookupApi#getLookupStatus"); + System.err.println("Exception when calling PhoneNumberLookupApi#createSyncLookup"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -141,12 +137,87 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **accountId** | **String**| Your Bandwidth Account ID. | | -| **requestId** | **String**| The phone number lookup request ID from Bandwidth. | | +| **accountId** | **String**| | | +| **syncLookupRequest** | [**SyncLookupRequest**](SyncLookupRequest.md)| Synchronous phone number lookup request. | | ### Return type -[**LookupStatus**](LookupStatus.md) +[**CreateSyncLookupResponse**](CreateSyncLookupResponse.md) + +### Authorization + +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **0** | Bad Request | - | + + +# **getAsyncBulkLookup** +> GetAsyncBulkLookupResponse getAsyncBulkLookup(accountId, requestId) + +Get Asynchronous Bulk Number Lookup + +Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use this endpoint to check the status of the request and view the results. + +### Example +```java +// Import classes: +import com.bandwidth.sdk.ApiClient; +import com.bandwidth.sdk.ApiException; +import com.bandwidth.sdk.Configuration; +import com.bandwidth.sdk.auth.*; +import com.bandwidth.sdk.models.*; +import com.bandwidth.sdk.api.PhoneNumberLookupApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure HTTP basic authorization: Basic + HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + 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 | + try { + GetAsyncBulkLookupResponse result = apiInstance.getAsyncBulkLookup(accountId, requestId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PhoneNumberLookupApi#getAsyncBulkLookup"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| | | +| **requestId** | **UUID**| | | + +### Return type + +[**GetAsyncBulkLookupResponse**](GetAsyncBulkLookupResponse.md) ### Authorization @@ -161,10 +232,5 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | -| **429** | Too Many Requests | - | -| **500** | Internal Server Error | - | +| **0** | Bad Request | - | diff --git a/docs/SyncLookupRequest.md b/docs/SyncLookupRequest.md new file mode 100644 index 00000000..80c63ca3 --- /dev/null +++ b/docs/SyncLookupRequest.md @@ -0,0 +1,13 @@ + + +# SyncLookupRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**phoneNumbers** | **List<String>** | Telephone numbers in E.164 format. | | + + + diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 1e4c3dae..518e07dd 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -91,6 +91,30 @@ public Class getClassForEl return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); } + }) + .registerTypeSelector(com.bandwidth.sdk.model.MultiChannelChannelListRequestObject.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("MMS", com.bandwidth.sdk.model.MultiChannelChannelListMMSObject.class); + classByDiscriminatorValue.put("RBM", com.bandwidth.sdk.model.MultiChannelChannelListRBMObject.class); + classByDiscriminatorValue.put("SMS", com.bandwidth.sdk.model.MultiChannelChannelListSMSObject.class); + classByDiscriminatorValue.put("multiChannelChannelListRequestObject", com.bandwidth.sdk.model.MultiChannelChannelListRequestObject.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "channel")); + } + }) + .registerTypeSelector(com.bandwidth.sdk.model.MultiChannelChannelListResponseObject.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("MMS", com.bandwidth.sdk.model.MultiChannelChannelListMMSResponseObject.class); + classByDiscriminatorValue.put("RBM", com.bandwidth.sdk.model.MultiChannelChannelListRBMResponseObject.class); + classByDiscriminatorValue.put("SMS", com.bandwidth.sdk.model.MultiChannelChannelListSMSResponseObject.class); + classByDiscriminatorValue.put("multiChannelChannelListResponseObject", com.bandwidth.sdk.model.MultiChannelChannelListResponseObject.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "channel")); + } }) ; GsonBuilder builder = fireBuilder.createGsonBuilder(); @@ -131,6 +155,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.AdditionalDenialReason.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Address.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.AnswerCallback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.AsyncLookupRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BlockedWebhook.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeTargetCompleteCallback.CustomTypeAdapterFactory()); @@ -151,11 +176,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ConferenceRecordingMetadata.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ConferenceRedirectCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Contact.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateAsyncBulkLookupResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateCall.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateCallResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateLookupResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateMessageRequestError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateMultiChannelMessageResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateSyncLookupResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CreateSyncLookupResponseData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.DisconnectCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Diversion.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.DtmfCallback.CustomTypeAdapterFactory()); @@ -165,15 +193,19 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.FailureWebhook.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.FieldError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.GatherCallback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.GetAsyncBulkLookupResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.InboundCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.InboundCallbackMessage.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.InitiateCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Link.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LinkSchema.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LinksObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.ListMessageItem.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupErrorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupErrorSchema.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupErrorSchemaMeta.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupResult.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.LookupStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MachineDetectionCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MachineDetectionConfiguration.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MachineDetectionResult.CustomTypeAdapterFactory()); @@ -190,13 +222,21 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MmsMessageContentFile.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelAction.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelActionCalendarEvent.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListObject.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListObjectContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListMMSObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListMMSResponseObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListObjectBase.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListOwnerObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListRBMObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListRBMObjectAllOfContent.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListRBMResponseObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListRequestObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListResponseObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListSMSObject.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelChannelListSMSResponseObject.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelMessageContent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelMessageRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelMessageResponseData.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.MultiChannelMessageResponseDataChannelListInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.OptInWorkflow.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.PageInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.RbmActionBase.CustomTypeAdapterFactory()); @@ -222,13 +262,13 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.StatusCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.StatusCallbackMessage.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.StirShaken.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.SyncLookupRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TelephoneNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TfvBasicAuthentication.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TfvError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TfvStatus.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TfvSubmissionInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TfvSubmissionWrapper.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TnLookupRequestError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TranscribeRecording.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Transcription.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.TranscriptionAvailableCallback.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java index 41a18153..163ec2dc 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -27,10 +27,13 @@ import java.io.IOException; -import com.bandwidth.sdk.model.CreateLookupResponse; -import com.bandwidth.sdk.model.LookupRequest; -import com.bandwidth.sdk.model.LookupStatus; -import com.bandwidth.sdk.model.TnLookupRequestError; +import com.bandwidth.sdk.model.AsyncLookupRequest; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.CreateSyncLookupResponse; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.LookupErrorResponse; +import com.bandwidth.sdk.model.SyncLookupRequest; +import java.util.UUID; import java.lang.reflect.Type; import java.util.ArrayList; @@ -76,9 +79,9 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for createLookup - * @param accountId Your Bandwidth Account ID. (required) - * @param lookupRequest Phone number lookup request. (required) + * Build call for createAsyncBulkLookup + * @param accountId (required) + * @param asyncLookupRequest Asynchronous bulk phone number lookup request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -87,18 +90,13 @@ public void setCustomBaseUrl(String customBaseUrl) { Response Details Status Code Description Response Headers 202 Accepted - - 400 Bad Request - - 401 Unauthorized - - 403 Forbidden - - 415 Unsupported Media Type - - 429 Too Many Requests - - 500 Internal Server Error - + 0 Bad Request - */ - public okhttp3.Call createLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAsyncBulkLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; + String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; // Determine Base Path to Use if (localCustomBaseUrl != null){ @@ -109,10 +107,10 @@ public okhttp3.Call createLookupCall(@javax.annotation.Nonnull String accountId, basePath = null; } - Object localVarPostBody = lookupRequest; + Object localVarPostBody = asyncLookupRequest; // create path and map variables - String localVarPath = "/accounts/{accountId}/tnlookup" + String localVarPath = "/accounts/{accountId}/phoneNumberLookup/bulk" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); List localVarQueryParams = new ArrayList(); @@ -142,77 +140,67 @@ public okhttp3.Call createLookupCall(@javax.annotation.Nonnull String accountId, } @SuppressWarnings("rawtypes") - private okhttp3.Call createLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createAsyncBulkLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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 createLookup(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling createAsyncBulkLookup(Async)"); } - // verify the required parameter 'lookupRequest' is set - if (lookupRequest == null) { - throw new ApiException("Missing the required parameter 'lookupRequest' when calling createLookup(Async)"); + // verify the required parameter 'asyncLookupRequest' is set + if (asyncLookupRequest == null) { + throw new ApiException("Missing the required parameter 'asyncLookupRequest' when calling createAsyncBulkLookup(Async)"); } - return createLookupCall(accountId, lookupRequest, _callback); + return createAsyncBulkLookupCall(accountId, asyncLookupRequest, _callback); } /** - * Create Lookup - * Create a Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param lookupRequest Phone number lookup request. (required) - * @return CreateLookupResponse + * Create Asynchronous Bulk Number Lookup + * Creates an asynchronous bulk phone number lookup request. Maximum of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param asyncLookupRequest Asynchronous bulk phone number lookup request. (required) + * @return CreateAsyncBulkLookupResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - - - +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
429 Too Many Requests -
500 Internal Server Error -
0 Bad Request -
*/ - public CreateLookupResponse createLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { - ApiResponse localVarResp = createLookupWithHttpInfo(accountId, lookupRequest); + public CreateAsyncBulkLookupResponse createAsyncBulkLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest) throws ApiException { + ApiResponse localVarResp = createAsyncBulkLookupWithHttpInfo(accountId, asyncLookupRequest); return localVarResp.getData(); } /** - * Create Lookup - * Create a Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param lookupRequest Phone number lookup request. (required) - * @return ApiResponse<CreateLookupResponse> + * Create Asynchronous Bulk Number Lookup + * Creates an asynchronous bulk phone number lookup request. Maximum of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param asyncLookupRequest Asynchronous bulk phone number lookup request. (required) + * @return ApiResponse<CreateAsyncBulkLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - - - +
Response Details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
415 Unsupported Media Type -
429 Too Many Requests -
500 Internal Server Error -
0 Bad Request -
*/ - public ApiResponse createLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { - okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse createAsyncBulkLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest) throws ApiException { + okhttp3.Call localVarCall = createAsyncBulkLookupValidateBeforeCall(accountId, asyncLookupRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Create Lookup (asynchronously) - * Create a Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param lookupRequest Phone number lookup request. (required) + * Create Asynchronous Bulk Number Lookup (asynchronously) + * Creates an asynchronous bulk phone number lookup request. Maximum of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param asyncLookupRequest Asynchronous bulk phone number lookup request. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -221,25 +209,20 @@ public ApiResponse createLookupWithHttpInfo(@javax.annotat Response Details Status Code Description Response Headers 202 Accepted - - 400 Bad Request - - 401 Unauthorized - - 403 Forbidden - - 415 Unsupported Media Type - - 429 Too Many Requests - - 500 Internal Server Error - + 0 Bad Request - */ - public okhttp3.Call createLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAsyncBulkLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull AsyncLookupRequest asyncLookupRequest, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = createAsyncBulkLookupValidateBeforeCall(accountId, asyncLookupRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getLookupStatus - * @param accountId Your Bandwidth Account ID. (required) - * @param requestId The phone number lookup request ID from Bandwidth. (required) + * Build call for createSyncLookup + * @param accountId (required) + * @param syncLookupRequest Synchronous phone number lookup request. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -248,18 +231,154 @@ public okhttp3.Call createLookupAsync(@javax.annotation.Nonnull String accountId Response Details Status Code Description Response Headers 200 OK - - 400 Bad Request - - 401 Unauthorized - - 403 Forbidden - - 404 Not Found - - 429 Too Many Requests - - 500 Internal Server Error - + 0 Bad Request - */ - public okhttp3.Call getLookupStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createSyncLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers - String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; + String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = syncLookupRequest; + + // create path and map variables + String localVarPath = "/accounts/{accountId}/phoneNumberLookup" + .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + 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 { + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException("Missing the required parameter 'accountId' when calling createSyncLookup(Async)"); + } + + // verify the required parameter 'syncLookupRequest' is set + if (syncLookupRequest == null) { + throw new ApiException("Missing the required parameter 'syncLookupRequest' when calling createSyncLookup(Async)"); + } + + return createSyncLookupCall(accountId, syncLookupRequest, _callback); + + } + + /** + * Create Synchronous Number Lookup + * Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. + * @param accountId (required) + * @param syncLookupRequest Synchronous phone number lookup request. (required) + * @return CreateSyncLookupResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Bad Request -
+ */ + public CreateSyncLookupResponse createSyncLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest) throws ApiException { + ApiResponse localVarResp = createSyncLookupWithHttpInfo(accountId, syncLookupRequest); + return localVarResp.getData(); + } + + /** + * Create Synchronous Number Lookup + * Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. + * @param accountId (required) + * @param syncLookupRequest Synchronous phone number lookup request. (required) + * @return ApiResponse<CreateSyncLookupResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Bad Request -
+ */ + public ApiResponse createSyncLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest) throws ApiException { + okhttp3.Call localVarCall = createSyncLookupValidateBeforeCall(accountId, syncLookupRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create Synchronous Number Lookup (asynchronously) + * Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. + * @param accountId (required) + * @param syncLookupRequest Synchronous phone number lookup request. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Bad Request -
+ */ + public okhttp3.Call createSyncLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull SyncLookupRequest syncLookupRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createSyncLookupValidateBeforeCall(accountId, syncLookupRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAsyncBulkLookup + * @param accountId (required) + * @param requestId (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
0 Bad Request -
+ */ + public okhttp3.Call getAsyncBulkLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { "https://api.bandwidth.com/v2" }; // Determine Base Path to Use if (localCustomBaseUrl != null){ @@ -273,7 +392,7 @@ public okhttp3.Call getLookupStatusCall(@javax.annotation.Nonnull String account Object localVarPostBody = null; // create path and map variables - String localVarPath = "/accounts/{accountId}/tnlookup/{requestId}" + String localVarPath = "/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}" .replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString())) .replace("{" + "requestId" + "}", localVarApiClient.escapeString(requestId.toString())); @@ -303,77 +422,67 @@ public okhttp3.Call getLookupStatusCall(@javax.annotation.Nonnull String account } @SuppressWarnings("rawtypes") - private okhttp3.Call getLookupStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAsyncBulkLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull 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 getLookupStatus(Async)"); + throw new ApiException("Missing the required parameter 'accountId' when calling getAsyncBulkLookup(Async)"); } // verify the required parameter 'requestId' is set if (requestId == null) { - throw new ApiException("Missing the required parameter 'requestId' when calling getLookupStatus(Async)"); + throw new ApiException("Missing the required parameter 'requestId' when calling getAsyncBulkLookup(Async)"); } - return getLookupStatusCall(accountId, requestId, _callback); + return getAsyncBulkLookupCall(accountId, requestId, _callback); } /** - * Get Lookup Request Status - * Get an existing Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param requestId The phone number lookup request ID from Bandwidth. (required) - * @return LookupStatus + * Get Asynchronous Bulk Number Lookup + * Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use this endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param requestId (required) + * @return GetAsyncBulkLookupResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - - - +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
500 Internal Server Error -
0 Bad Request -
*/ - public LookupStatus getLookupStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { - ApiResponse localVarResp = getLookupStatusWithHttpInfo(accountId, requestId); + public GetAsyncBulkLookupResponse getAsyncBulkLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId) throws ApiException { + ApiResponse localVarResp = getAsyncBulkLookupWithHttpInfo(accountId, requestId); return localVarResp.getData(); } /** - * Get Lookup Request Status - * Get an existing Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param requestId The phone number lookup request ID from Bandwidth. (required) - * @return ApiResponse<LookupStatus> + * Get Asynchronous Bulk Number Lookup + * Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use this endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param requestId (required) + * @return ApiResponse<GetAsyncBulkLookupResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - - - +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
500 Internal Server Error -
0 Bad Request -
*/ - public ApiResponse getLookupStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { - okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(accountId, requestId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse getAsyncBulkLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId) throws ApiException { + okhttp3.Call localVarCall = getAsyncBulkLookupValidateBeforeCall(accountId, requestId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get Lookup Request Status (asynchronously) - * Get an existing Phone Number Lookup Request. - * @param accountId Your Bandwidth Account ID. (required) - * @param requestId The phone number lookup request ID from Bandwidth. (required) + * Get Asynchronous Bulk Number Lookup (asynchronously) + * Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use this endpoint to check the status of the request and view the results. + * @param accountId (required) + * @param requestId (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -382,18 +491,13 @@ public ApiResponse getLookupStatusWithHttpInfo(@javax.annotation.N Response Details Status Code Description Response Headers 200 OK - - 400 Bad Request - - 401 Unauthorized - - 403 Forbidden - - 404 Not Found - - 429 Too Many Requests - - 500 Internal Server Error - + 0 Bad Request - */ - public okhttp3.Call getLookupStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAsyncBulkLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull UUID requestId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(accountId, requestId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAsyncBulkLookupValidateBeforeCall(accountId, requestId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java new file mode 100644 index 00000000..0f67835f --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java @@ -0,0 +1,308 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * AsyncLookupRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class AsyncLookupRequest { + public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) + @javax.annotation.Nonnull + private List phoneNumbers = new ArrayList<>(); + + public AsyncLookupRequest() { + } + + public AsyncLookupRequest phoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public AsyncLookupRequest addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList<>(); + } + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Telephone numbers in E.164 format. + * @return phoneNumbers + */ + @javax.annotation.Nonnull + public List getPhoneNumbers() { + return phoneNumbers; + } + + public void setPhoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AsyncLookupRequest instance itself + */ + public AsyncLookupRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AsyncLookupRequest asyncLookupRequest = (AsyncLookupRequest) o; + return Objects.equals(this.phoneNumbers, asyncLookupRequest.phoneNumbers)&& + Objects.equals(this.additionalProperties, asyncLookupRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AsyncLookupRequest {\n"); + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("phoneNumbers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("phoneNumbers")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AsyncLookupRequest + */ + 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())); + } + } + + // 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AsyncLookupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AsyncLookupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AsyncLookupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AsyncLookupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AsyncLookupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AsyncLookupRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AsyncLookupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AsyncLookupRequest + * @throws IOException if the JSON string is invalid with respect to AsyncLookupRequest + */ + public static AsyncLookupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AsyncLookupRequest.class); + } + + /** + * Convert an instance of AsyncLookupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.java new file mode 100644 index 00000000..4198e986 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/CompletedLookupStatusEnum.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.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets completedLookupStatusEnum + */ +@JsonAdapter(CompletedLookupStatusEnum.Adapter.class) +public enum CompletedLookupStatusEnum { + + COMPLETE("COMPLETE"), + + PARTIAL_COMPLETE("PARTIAL_COMPLETE"), + + FAILED("FAILED"); + + private String value; + + CompletedLookupStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static CompletedLookupStatusEnum fromValue(String value) { + for (CompletedLookupStatusEnum b : CompletedLookupStatusEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final CompletedLookupStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public CompletedLookupStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return CompletedLookupStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + CompletedLookupStatusEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java new file mode 100644 index 00000000..1deefc51 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java @@ -0,0 +1,390 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * CreateAsyncBulkLookupResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CreateAsyncBulkLookupResponse { + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + @javax.annotation.Nullable + private List links = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private CreateAsyncBulkLookupResponseData data; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors = new ArrayList<>(); + + public CreateAsyncBulkLookupResponse() { + } + + public CreateAsyncBulkLookupResponse links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public CreateAsyncBulkLookupResponse addLinksItem(LinkSchema linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Links for pagination (if applicable) + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public CreateAsyncBulkLookupResponse data(@javax.annotation.Nullable CreateAsyncBulkLookupResponseData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public CreateAsyncBulkLookupResponseData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable CreateAsyncBulkLookupResponseData data) { + this.data = data; + } + + + public CreateAsyncBulkLookupResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public CreateAsyncBulkLookupResponse addErrorsItem(LookupErrorSchema errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAsyncBulkLookupResponse instance itself + */ + public CreateAsyncBulkLookupResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAsyncBulkLookupResponse createAsyncBulkLookupResponse = (CreateAsyncBulkLookupResponse) o; + return Objects.equals(this.links, createAsyncBulkLookupResponse.links) && + Objects.equals(this.data, createAsyncBulkLookupResponse.data) && + Objects.equals(this.errors, createAsyncBulkLookupResponse.errors)&& + Objects.equals(this.additionalProperties, createAsyncBulkLookupResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(links, data, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAsyncBulkLookupResponse {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAsyncBulkLookupResponse + */ + 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + 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())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + LinkSchema.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateAsyncBulkLookupResponseData.validateJsonElement(jsonObj.get("data")); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + 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())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + LookupErrorSchema.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAsyncBulkLookupResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAsyncBulkLookupResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAsyncBulkLookupResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAsyncBulkLookupResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAsyncBulkLookupResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateAsyncBulkLookupResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAsyncBulkLookupResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAsyncBulkLookupResponse + * @throws IOException if the JSON string is invalid with respect to CreateAsyncBulkLookupResponse + */ + public static CreateAsyncBulkLookupResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAsyncBulkLookupResponse.class); + } + + /** + * Convert an instance of CreateAsyncBulkLookupResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java new file mode 100644 index 00000000..93dc2834 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java @@ -0,0 +1,320 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * The phone number lookup response data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CreateAsyncBulkLookupResponseData { + public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; + @SerializedName(SERIALIZED_NAME_REQUEST_ID) + @javax.annotation.Nullable + private UUID requestId; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private InProgressLookupStatusEnum status; + + public CreateAsyncBulkLookupResponseData() { + } + + public CreateAsyncBulkLookupResponseData requestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + return this; + } + + /** + * The phone number lookup request ID from Bandwidth. + * @return requestId + */ + @javax.annotation.Nullable + public UUID getRequestId() { + return requestId; + } + + public void setRequestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + } + + + public CreateAsyncBulkLookupResponseData status(@javax.annotation.Nullable InProgressLookupStatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public InProgressLookupStatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable InProgressLookupStatusEnum status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateAsyncBulkLookupResponseData instance itself + */ + public CreateAsyncBulkLookupResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAsyncBulkLookupResponseData createAsyncBulkLookupResponseData = (CreateAsyncBulkLookupResponseData) o; + return Objects.equals(this.requestId, createAsyncBulkLookupResponseData.requestId) && + Objects.equals(this.status, createAsyncBulkLookupResponseData.status)&& + Objects.equals(this.additionalProperties, createAsyncBulkLookupResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(requestId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAsyncBulkLookupResponseData {\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("requestId", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateAsyncBulkLookupResponseData + */ + 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())); + } + } + 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())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + InProgressLookupStatusEnum.validateJsonElement(jsonObj.get("status")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateAsyncBulkLookupResponseData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateAsyncBulkLookupResponseData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAsyncBulkLookupResponseData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateAsyncBulkLookupResponseData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateAsyncBulkLookupResponseData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateAsyncBulkLookupResponseData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateAsyncBulkLookupResponseData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateAsyncBulkLookupResponseData + * @throws IOException if the JSON string is invalid with respect to CreateAsyncBulkLookupResponseData + */ + public static CreateAsyncBulkLookupResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAsyncBulkLookupResponseData.class); + } + + /** + * Convert an instance of CreateAsyncBulkLookupResponseData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java new file mode 100644 index 00000000..12b3b8a9 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java @@ -0,0 +1,390 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.CreateSyncLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * CreateSyncLookupResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CreateSyncLookupResponse { + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + @javax.annotation.Nullable + private List links = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private CreateSyncLookupResponseData data; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors = new ArrayList<>(); + + public CreateSyncLookupResponse() { + } + + public CreateSyncLookupResponse links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public CreateSyncLookupResponse addLinksItem(LinkSchema linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public CreateSyncLookupResponse data(@javax.annotation.Nullable CreateSyncLookupResponseData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public CreateSyncLookupResponseData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable CreateSyncLookupResponseData data) { + this.data = data; + } + + + public CreateSyncLookupResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public CreateSyncLookupResponse addErrorsItem(LookupErrorSchema errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateSyncLookupResponse instance itself + */ + public CreateSyncLookupResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSyncLookupResponse createSyncLookupResponse = (CreateSyncLookupResponse) o; + return Objects.equals(this.links, createSyncLookupResponse.links) && + Objects.equals(this.data, createSyncLookupResponse.data) && + Objects.equals(this.errors, createSyncLookupResponse.errors)&& + Objects.equals(this.additionalProperties, createSyncLookupResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(links, data, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSyncLookupResponse {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateSyncLookupResponse + */ + 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + 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())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + LinkSchema.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + CreateSyncLookupResponseData.validateJsonElement(jsonObj.get("data")); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + 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())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + LookupErrorSchema.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSyncLookupResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSyncLookupResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateSyncLookupResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSyncLookupResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateSyncLookupResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateSyncLookupResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSyncLookupResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSyncLookupResponse + * @throws IOException if the JSON string is invalid with respect to CreateSyncLookupResponse + */ + public static CreateSyncLookupResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSyncLookupResponse.class); + } + + /** + * Convert an instance of CreateSyncLookupResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java new file mode 100644 index 00000000..13b95904 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java @@ -0,0 +1,371 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; +import com.bandwidth.sdk.model.LookupResult; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * The phone number lookup response data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class CreateSyncLookupResponseData { + public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; + @SerializedName(SERIALIZED_NAME_REQUEST_ID) + @javax.annotation.Nullable + private UUID requestId; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private CompletedLookupStatusEnum status; + + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public CreateSyncLookupResponseData() { + } + + public CreateSyncLookupResponseData requestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + return this; + } + + /** + * The phone number lookup request ID from Bandwidth. + * @return requestId + */ + @javax.annotation.Nullable + public UUID getRequestId() { + return requestId; + } + + public void setRequestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + } + + + public CreateSyncLookupResponseData status(@javax.annotation.Nullable CompletedLookupStatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public CompletedLookupStatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable CompletedLookupStatusEnum status) { + this.status = status; + } + + + public CreateSyncLookupResponseData results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public CreateSyncLookupResponseData addResultsItem(LookupResult resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * The carrier information results for the specified telephone numbers. + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the CreateSyncLookupResponseData instance itself + */ + public CreateSyncLookupResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateSyncLookupResponseData createSyncLookupResponseData = (CreateSyncLookupResponseData) o; + return Objects.equals(this.requestId, createSyncLookupResponseData.requestId) && + Objects.equals(this.status, createSyncLookupResponseData.status) && + Objects.equals(this.results, createSyncLookupResponseData.results)&& + Objects.equals(this.additionalProperties, createSyncLookupResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(requestId, status, results, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateSyncLookupResponseData {\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("requestId", "status", "results")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to CreateSyncLookupResponseData + */ + 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())); + } + } + 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())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + CompletedLookupStatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + 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())); + } + + // validate the optional field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + LookupResult.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateSyncLookupResponseData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateSyncLookupResponseData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateSyncLookupResponseData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateSyncLookupResponseData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public CreateSyncLookupResponseData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateSyncLookupResponseData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of CreateSyncLookupResponseData given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateSyncLookupResponseData + * @throws IOException if the JSON string is invalid with respect to CreateSyncLookupResponseData + */ + public static CreateSyncLookupResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateSyncLookupResponseData.class); + } + + /** + * Convert an instance of CreateSyncLookupResponseData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java b/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java new file mode 100644 index 00000000..8f9d5571 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/DeactivationEventEnum.java @@ -0,0 +1,78 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * [DNI-Only](#section/DNI-Only). `DEACTIVATED` if the carrier reported a deactivation event for this phone number. + */ +@JsonAdapter(DeactivationEventEnum.Adapter.class) +public enum DeactivationEventEnum { + + DEACTIVATED("DEACTIVATED"); + + private String value; + + DeactivationEventEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DeactivationEventEnum fromValue(String value) { + for (DeactivationEventEnum b : DeactivationEventEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeactivationEventEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeactivationEventEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeactivationEventEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + DeactivationEventEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java new file mode 100644 index 00000000..11c675ab --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java @@ -0,0 +1,390 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * GetAsyncBulkLookupResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class GetAsyncBulkLookupResponse { + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + @javax.annotation.Nullable + private List links = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private GetAsyncBulkLookupResponseData data; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors = new ArrayList<>(); + + public GetAsyncBulkLookupResponse() { + } + + public GetAsyncBulkLookupResponse links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public GetAsyncBulkLookupResponse addLinksItem(LinkSchema linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public GetAsyncBulkLookupResponse data(@javax.annotation.Nullable GetAsyncBulkLookupResponseData data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public GetAsyncBulkLookupResponseData getData() { + return data; + } + + public void setData(@javax.annotation.Nullable GetAsyncBulkLookupResponseData data) { + this.data = data; + } + + + public GetAsyncBulkLookupResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public GetAsyncBulkLookupResponse addErrorsItem(LookupErrorSchema errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetAsyncBulkLookupResponse instance itself + */ + public GetAsyncBulkLookupResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAsyncBulkLookupResponse getAsyncBulkLookupResponse = (GetAsyncBulkLookupResponse) o; + return Objects.equals(this.links, getAsyncBulkLookupResponse.links) && + Objects.equals(this.data, getAsyncBulkLookupResponse.data) && + Objects.equals(this.errors, getAsyncBulkLookupResponse.errors)&& + Objects.equals(this.additionalProperties, getAsyncBulkLookupResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(links, data, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAsyncBulkLookupResponse {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetAsyncBulkLookupResponse + */ + 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + 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())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + LinkSchema.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + GetAsyncBulkLookupResponseData.validateJsonElement(jsonObj.get("data")); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + 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())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + LookupErrorSchema.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAsyncBulkLookupResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAsyncBulkLookupResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAsyncBulkLookupResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAsyncBulkLookupResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetAsyncBulkLookupResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetAsyncBulkLookupResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetAsyncBulkLookupResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAsyncBulkLookupResponse + * @throws IOException if the JSON string is invalid with respect to GetAsyncBulkLookupResponse + */ + public static GetAsyncBulkLookupResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAsyncBulkLookupResponse.class); + } + + /** + * Convert an instance of GetAsyncBulkLookupResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java new file mode 100644 index 00000000..1502e537 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java @@ -0,0 +1,371 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; +import com.bandwidth.sdk.model.LookupResult; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * The phone number lookup response data + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class GetAsyncBulkLookupResponseData { + public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; + @SerializedName(SERIALIZED_NAME_REQUEST_ID) + @javax.annotation.Nullable + private UUID requestId; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private InProgressLookupStatusEnum status; + + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) + @javax.annotation.Nullable + private List results = new ArrayList<>(); + + public GetAsyncBulkLookupResponseData() { + } + + public GetAsyncBulkLookupResponseData requestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + return this; + } + + /** + * The phone number lookup request ID from Bandwidth. + * @return requestId + */ + @javax.annotation.Nullable + public UUID getRequestId() { + return requestId; + } + + public void setRequestId(@javax.annotation.Nullable UUID requestId) { + this.requestId = requestId; + } + + + public GetAsyncBulkLookupResponseData status(@javax.annotation.Nullable InProgressLookupStatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public InProgressLookupStatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable InProgressLookupStatusEnum status) { + this.status = status; + } + + + public GetAsyncBulkLookupResponseData results(@javax.annotation.Nullable List results) { + this.results = results; + return this; + } + + public GetAsyncBulkLookupResponseData addResultsItem(LookupResult resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * The carrier information results for the specified telephone number. + * @return results + */ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the GetAsyncBulkLookupResponseData instance itself + */ + public GetAsyncBulkLookupResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAsyncBulkLookupResponseData getAsyncBulkLookupResponseData = (GetAsyncBulkLookupResponseData) o; + return Objects.equals(this.requestId, getAsyncBulkLookupResponseData.requestId) && + Objects.equals(this.status, getAsyncBulkLookupResponseData.status) && + Objects.equals(this.results, getAsyncBulkLookupResponseData.results)&& + Objects.equals(this.additionalProperties, getAsyncBulkLookupResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(requestId, status, results, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAsyncBulkLookupResponseData {\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("requestId", "status", "results")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetAsyncBulkLookupResponseData + */ + 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())); + } + } + 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())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + InProgressLookupStatusEnum.validateJsonElement(jsonObj.get("status")); + } + if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + 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())); + } + + // validate the optional field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + LookupResult.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetAsyncBulkLookupResponseData.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetAsyncBulkLookupResponseData' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAsyncBulkLookupResponseData.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, GetAsyncBulkLookupResponseData value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public GetAsyncBulkLookupResponseData read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + GetAsyncBulkLookupResponseData instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of GetAsyncBulkLookupResponseData given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetAsyncBulkLookupResponseData + * @throws IOException if the JSON string is invalid with respect to GetAsyncBulkLookupResponseData + */ + public static GetAsyncBulkLookupResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAsyncBulkLookupResponseData.class); + } + + /** + * Convert an instance of GetAsyncBulkLookupResponseData to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java new file mode 100644 index 00000000..c1d98b0b --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java @@ -0,0 +1,84 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets inProgressLookupStatusEnum + */ +@JsonAdapter(InProgressLookupStatusEnum.Adapter.class) +public enum InProgressLookupStatusEnum { + + IN_PROGRESS("IN_PROGRESS"), + + COMPLETE("COMPLETE"), + + PARTIAL_COMPLETE("PARTIAL_COMPLETE"), + + FAILED("FAILED"); + + private String value; + + InProgressLookupStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static InProgressLookupStatusEnum fromValue(String value) { + for (InProgressLookupStatusEnum b : InProgressLookupStatusEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final InProgressLookupStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public InProgressLookupStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return InProgressLookupStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + InProgressLookupStatusEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.java new file mode 100644 index 00000000..613194fd --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LatestMessageDeliveryStatusEnum.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.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * [DNI-Only](#section/DNI-Only). The current delivery status of the phone number. - ACTIVE: A message was successfully sent to the number (delivery code 0). - DEACTIVATED: A message was not delivered to a number (delivery code 720) - UNKNOWN: Bandwidth cannot find an delivery status entry for the number. + */ +@JsonAdapter(LatestMessageDeliveryStatusEnum.Adapter.class) +public enum LatestMessageDeliveryStatusEnum { + + ACTIVE("ACTIVE"), + + DEACTIVATED("DEACTIVATED"), + + UNKNOWN("UNKNOWN"); + + private String value; + + LatestMessageDeliveryStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LatestMessageDeliveryStatusEnum fromValue(String value) { + for (LatestMessageDeliveryStatusEnum b : LatestMessageDeliveryStatusEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LatestMessageDeliveryStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LatestMessageDeliveryStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LatestMessageDeliveryStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LatestMessageDeliveryStatusEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java new file mode 100644 index 00000000..5a3b331d --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LineTypeEnum.java @@ -0,0 +1,84 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets lineTypeEnum + */ +@JsonAdapter(LineTypeEnum.Adapter.class) +public enum LineTypeEnum { + + FIXED("FIXED"), + + VOIP_FIXED("VOIP-FIXED"), + + MOBILE("MOBILE"), + + VOIP("VOIP"); + + private String value; + + LineTypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LineTypeEnum fromValue(String value) { + for (LineTypeEnum b : LineTypeEnum.values()) { + if (b.value.equalsIgnoreCase(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LineTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LineTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LineTypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LineTypeEnum.fromValue(value); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java new file mode 100644 index 00000000..352fe94c --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java @@ -0,0 +1,346 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * LinkSchema + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LinkSchema { + public static final String SERIALIZED_NAME_HREF = "href"; + @SerializedName(SERIALIZED_NAME_HREF) + @javax.annotation.Nullable + private String href; + + public static final String SERIALIZED_NAME_REL = "rel"; + @SerializedName(SERIALIZED_NAME_REL) + @javax.annotation.Nullable + private String rel; + + public static final String SERIALIZED_NAME_METHOD = "method"; + @SerializedName(SERIALIZED_NAME_METHOD) + @javax.annotation.Nullable + private String method; + + public LinkSchema() { + } + + public LinkSchema href(@javax.annotation.Nullable String href) { + this.href = href; + return this; + } + + /** + * URI of the link. + * @return href + */ + @javax.annotation.Nullable + public String getHref() { + return href; + } + + public void setHref(@javax.annotation.Nullable String href) { + this.href = href; + } + + + public LinkSchema rel(@javax.annotation.Nullable String rel) { + this.rel = rel; + return this; + } + + /** + * Specifies the relationship between this link and the resource. + * @return rel + */ + @javax.annotation.Nullable + public String getRel() { + return rel; + } + + public void setRel(@javax.annotation.Nullable String rel) { + this.rel = rel; + } + + + public LinkSchema method(@javax.annotation.Nullable String method) { + this.method = method; + return this; + } + + /** + * HTTP method to be used. + * @return method + */ + @javax.annotation.Nullable + public String getMethod() { + return method; + } + + public void setMethod(@javax.annotation.Nullable String method) { + this.method = method; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LinkSchema instance itself + */ + public LinkSchema putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LinkSchema linkSchema = (LinkSchema) o; + return Objects.equals(this.href, linkSchema.href) && + Objects.equals(this.rel, linkSchema.rel) && + Objects.equals(this.method, linkSchema.method)&& + Objects.equals(this.additionalProperties, linkSchema.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(href, rel, method, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LinkSchema {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" rel: ").append(toIndentedString(rel)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("href", "rel", "method")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LinkSchema + */ + 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + } + if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + } + if ((jsonObj.get("method") != null && !jsonObj.get("method").isJsonNull()) && !jsonObj.get("method").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `method` to be a primitive type in the JSON string but got `%s`", jsonObj.get("method").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LinkSchema.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LinkSchema' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LinkSchema.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LinkSchema value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LinkSchema read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LinkSchema instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LinkSchema given an JSON string + * + * @param jsonString JSON string + * @return An instance of LinkSchema + * @throws IOException if the JSON string is invalid with respect to LinkSchema + */ + public static LinkSchema fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LinkSchema.class); + } + + /** + * Convert an instance of LinkSchema to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java new file mode 100644 index 00000000..96c2c413 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java @@ -0,0 +1,385 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * LookupErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LookupErrorResponse { + public static final String SERIALIZED_NAME_LINKS = "links"; + @SerializedName(SERIALIZED_NAME_LINKS) + @javax.annotation.Nullable + private List links = new ArrayList<>(); + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private Object data; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors = new ArrayList<>(); + + public LookupErrorResponse() { + } + + public LookupErrorResponse links(@javax.annotation.Nullable List links) { + this.links = links; + return this; + } + + public LookupErrorResponse addLinksItem(LinkSchema linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + return this; + } + + /** + * Get links + * @return links + */ + @javax.annotation.Nullable + public List getLinks() { + return links; + } + + public void setLinks(@javax.annotation.Nullable List links) { + this.links = links; + } + + + public LookupErrorResponse data(@javax.annotation.Nullable Object data) { + this.data = data; + return this; + } + + /** + * The phone number lookup response data + * @return data + */ + @javax.annotation.Nullable + public Object getData() { + return data; + } + + public void setData(@javax.annotation.Nullable Object data) { + this.data = data; + } + + + public LookupErrorResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public LookupErrorResponse addErrorsItem(LookupErrorSchema errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookupErrorResponse instance itself + */ + public LookupErrorResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookupErrorResponse lookupErrorResponse = (LookupErrorResponse) o; + return Objects.equals(this.links, lookupErrorResponse.links) && + Objects.equals(this.data, lookupErrorResponse.data) && + Objects.equals(this.errors, lookupErrorResponse.errors)&& + Objects.equals(this.additionalProperties, lookupErrorResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(links, data, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookupErrorResponse {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupErrorResponse + */ + 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("links") != null && !jsonObj.get("links").isJsonNull()) { + JsonArray jsonArraylinks = jsonObj.getAsJsonArray("links"); + 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())); + } + + // validate the optional field `links` (array) + for (int i = 0; i < jsonArraylinks.size(); i++) { + LinkSchema.validateJsonElement(jsonArraylinks.get(i)); + }; + } + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + 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())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + LookupErrorSchema.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookupErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookupErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookupErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookupErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookupErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LookupErrorResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookupErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookupErrorResponse + * @throws IOException if the JSON string is invalid with respect to LookupErrorResponse + */ + public static LookupErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookupErrorResponse.class); + } + + /** + * Convert an instance of LookupErrorResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java new file mode 100644 index 00000000..26598e9d --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java @@ -0,0 +1,377 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.LookupErrorSchemaMeta; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * LookupErrorSchema + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LookupErrorSchema { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private String code; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable + private String description; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nullable + private String type; + + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + @javax.annotation.Nullable + private LookupErrorSchemaMeta meta; + + public LookupErrorSchema() { + } + + public LookupErrorSchema code(@javax.annotation.Nullable String code) { + this.code = code; + return this; + } + + /** + * Validation error code + * @return code + */ + @javax.annotation.Nullable + public String getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable String code) { + this.code = code; + } + + + public LookupErrorSchema description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description of validation error + * @return description + */ + @javax.annotation.Nullable + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + + + public LookupErrorSchema type(@javax.annotation.Nullable String type) { + this.type = type; + return this; + } + + /** + * Type of validation error + * @return type + */ + @javax.annotation.Nullable + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nullable String type) { + this.type = type; + } + + + public LookupErrorSchema meta(@javax.annotation.Nullable LookupErrorSchemaMeta meta) { + this.meta = meta; + return this; + } + + /** + * Get meta + * @return meta + */ + @javax.annotation.Nullable + public LookupErrorSchemaMeta getMeta() { + return meta; + } + + public void setMeta(@javax.annotation.Nullable LookupErrorSchemaMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookupErrorSchema instance itself + */ + public LookupErrorSchema putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookupErrorSchema lookupErrorSchema = (LookupErrorSchema) o; + return Objects.equals(this.code, lookupErrorSchema.code) && + Objects.equals(this.description, lookupErrorSchema.description) && + Objects.equals(this.type, lookupErrorSchema.type) && + Objects.equals(this.meta, lookupErrorSchema.meta)&& + Objects.equals(this.additionalProperties, lookupErrorSchema.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(code, description, type, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookupErrorSchema {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("code", "description", "type", "meta")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupErrorSchema + */ + 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())); + } + } + 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())); + } + 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())); + } + 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())); + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + LookupErrorSchemaMeta.validateJsonElement(jsonObj.get("meta")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookupErrorSchema.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookupErrorSchema' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookupErrorSchema.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookupErrorSchema value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookupErrorSchema read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LookupErrorSchema instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookupErrorSchema given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookupErrorSchema + * @throws IOException if the JSON string is invalid with respect to LookupErrorSchema + */ + public static LookupErrorSchema fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookupErrorSchema.class); + } + + /** + * Convert an instance of LookupErrorSchema to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java new file mode 100644 index 00000000..c7d38394 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java @@ -0,0 +1,354 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * LookupErrorSchemaMeta + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class LookupErrorSchemaMeta { + public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) + @javax.annotation.Nullable + private List phoneNumbers = new ArrayList<>(); + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + @javax.annotation.Nullable + private Integer code; + + public LookupErrorSchemaMeta() { + } + + public LookupErrorSchemaMeta phoneNumbers(@javax.annotation.Nullable List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public LookupErrorSchemaMeta addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList<>(); + } + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Get phoneNumbers + * @return phoneNumbers + */ + @javax.annotation.Nullable + public List getPhoneNumbers() { + return phoneNumbers; + } + + public void setPhoneNumbers(@javax.annotation.Nullable List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + + public LookupErrorSchemaMeta message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Message describing the error + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public LookupErrorSchemaMeta code(@javax.annotation.Nullable Integer code) { + this.code = code; + return this; + } + + /** + * Error code associated with the message + * @return code + */ + @javax.annotation.Nullable + public Integer getCode() { + return code; + } + + public void setCode(@javax.annotation.Nullable Integer code) { + this.code = code; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the LookupErrorSchemaMeta instance itself + */ + public LookupErrorSchemaMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LookupErrorSchemaMeta lookupErrorSchemaMeta = (LookupErrorSchemaMeta) o; + return Objects.equals(this.phoneNumbers, lookupErrorSchemaMeta.phoneNumbers) && + Objects.equals(this.message, lookupErrorSchemaMeta.message) && + Objects.equals(this.code, lookupErrorSchemaMeta.code)&& + Objects.equals(this.additionalProperties, lookupErrorSchemaMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers, message, code, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LookupErrorSchemaMeta {\n"); + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("phoneNumbers", "message", "code")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to LookupErrorSchemaMeta + */ + 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())); + } + } + 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())); + } + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!LookupErrorSchemaMeta.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'LookupErrorSchemaMeta' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(LookupErrorSchemaMeta.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, LookupErrorSchemaMeta value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public LookupErrorSchemaMeta read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + LookupErrorSchemaMeta instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of LookupErrorSchemaMeta given an JSON string + * + * @param jsonString JSON string + * @return An instance of LookupErrorSchemaMeta + * @throws IOException if the JSON string is invalid with respect to LookupErrorSchemaMeta + */ + public static LookupErrorSchemaMeta fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, LookupErrorSchemaMeta.class); + } + + /** + * Convert an instance of LookupErrorSchemaMeta to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index 7a90001b..8b810d1e 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -15,12 +15,16 @@ 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; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.LocalDate; import java.util.Arrays; import com.google.gson.Gson; @@ -52,222 +56,270 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupResult { - public static final String SERIALIZED_NAME_RESPONSE_CODE = "Response Code"; - @SerializedName(SERIALIZED_NAME_RESPONSE_CODE) + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @javax.annotation.Nullable - private Integer responseCode; + private String phoneNumber; - public static final String SERIALIZED_NAME_MESSAGE = "Message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) + public static final String SERIALIZED_NAME_LINE_TYPE = "lineType"; + @SerializedName(SERIALIZED_NAME_LINE_TYPE) @javax.annotation.Nullable - private String message; + private LineTypeEnum lineType; - public static final String SERIALIZED_NAME_E164_FORMAT = "E.164 Format"; - @SerializedName(SERIALIZED_NAME_E164_FORMAT) + public static final String SERIALIZED_NAME_MESSAGING_PROVIDER = "messagingProvider"; + @SerializedName(SERIALIZED_NAME_MESSAGING_PROVIDER) @javax.annotation.Nullable - private String e164Format; + private String messagingProvider; - public static final String SERIALIZED_NAME_FORMATTED = "Formatted"; - @SerializedName(SERIALIZED_NAME_FORMATTED) + public static final String SERIALIZED_NAME_VOICE_PROVIDER = "voiceProvider"; + @SerializedName(SERIALIZED_NAME_VOICE_PROVIDER) @javax.annotation.Nullable - private String formatted; + private String voiceProvider; - public static final String SERIALIZED_NAME_COUNTRY = "Country"; - @SerializedName(SERIALIZED_NAME_COUNTRY) + public static final String SERIALIZED_NAME_COUNTRY_CODE_A3 = "countryCodeA3"; + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE_A3) @javax.annotation.Nullable - private String country; + private String countryCodeA3; - public static final String SERIALIZED_NAME_LINE_TYPE = "Line Type"; - @SerializedName(SERIALIZED_NAME_LINE_TYPE) + public static final String SERIALIZED_NAME_DEACTIVATION_REPORTER = "deactivationReporter"; + @SerializedName(SERIALIZED_NAME_DEACTIVATION_REPORTER) + @javax.annotation.Nullable + private String deactivationReporter; + + public static final String SERIALIZED_NAME_DEACTIVATION_DATE = "deactivationDate"; + @SerializedName(SERIALIZED_NAME_DEACTIVATION_DATE) + @javax.annotation.Nullable + private String deactivationDate; + + public static final String SERIALIZED_NAME_DEACTIVATION_EVENT = "deactivationEvent"; + @SerializedName(SERIALIZED_NAME_DEACTIVATION_EVENT) @javax.annotation.Nullable - private String lineType; + private DeactivationEventEnum deactivationEvent; - public static final String SERIALIZED_NAME_LINE_PROVIDER = "Line Provider"; - @SerializedName(SERIALIZED_NAME_LINE_PROVIDER) + public static final String SERIALIZED_NAME_LATEST_MESSAGE_DELIVERY_STATUS = "latestMessageDeliveryStatus"; + @SerializedName(SERIALIZED_NAME_LATEST_MESSAGE_DELIVERY_STATUS) @javax.annotation.Nullable - private String lineProvider; + private LatestMessageDeliveryStatusEnum latestMessageDeliveryStatus; - public static final String SERIALIZED_NAME_MOBILE_COUNTRY_CODE = "Mobile Country Code"; - @SerializedName(SERIALIZED_NAME_MOBILE_COUNTRY_CODE) + public static final String SERIALIZED_NAME_INITIAL_MESSAGE_DELIVERY_STATUS_DATE = "initialMessageDeliveryStatusDate"; + @SerializedName(SERIALIZED_NAME_INITIAL_MESSAGE_DELIVERY_STATUS_DATE) @javax.annotation.Nullable - private String mobileCountryCode; + private LocalDate initialMessageDeliveryStatusDate; - public static final String SERIALIZED_NAME_MOBILE_NETWORK_CODE = "Mobile Network Code"; - @SerializedName(SERIALIZED_NAME_MOBILE_NETWORK_CODE) + public static final String SERIALIZED_NAME_LATEST_MESSAGE_DELIVERY_STATUS_DATE = "latestMessageDeliveryStatusDate"; + @SerializedName(SERIALIZED_NAME_LATEST_MESSAGE_DELIVERY_STATUS_DATE) @javax.annotation.Nullable - private String mobileNetworkCode; + private LocalDate latestMessageDeliveryStatusDate; public LookupResult() { } - public LookupResult responseCode(@javax.annotation.Nullable Integer responseCode) { - this.responseCode = responseCode; + public LookupResult phoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = phoneNumber; return this; } /** - * Our vendor's response code. - * @return responseCode + * The telephone number in E.164 format. + * @return phoneNumber */ @javax.annotation.Nullable - public Integer getResponseCode() { - return responseCode; + public String getPhoneNumber() { + return phoneNumber; } - public void setResponseCode(@javax.annotation.Nullable Integer responseCode) { - this.responseCode = responseCode; + public void setPhoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = phoneNumber; } - public LookupResult message(@javax.annotation.Nullable String message) { - this.message = message; + public LookupResult lineType(@javax.annotation.Nullable LineTypeEnum lineType) { + this.lineType = lineType; return this; } /** - * Message associated with the response code. - * @return message + * Get lineType + * @return lineType */ @javax.annotation.Nullable - public String getMessage() { - return message; + public LineTypeEnum getLineType() { + return lineType; } - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; + public void setLineType(@javax.annotation.Nullable LineTypeEnum lineType) { + this.lineType = lineType; } - public LookupResult e164Format(@javax.annotation.Nullable String e164Format) { - this.e164Format = e164Format; + public LookupResult messagingProvider(@javax.annotation.Nullable String messagingProvider) { + this.messagingProvider = messagingProvider; return this; } /** - * The telephone number in E.164 format. - * @return e164Format + * The messaging service provider of the telephone number. + * @return messagingProvider */ @javax.annotation.Nullable - public String getE164Format() { - return e164Format; + public String getMessagingProvider() { + return messagingProvider; } - public void setE164Format(@javax.annotation.Nullable String e164Format) { - this.e164Format = e164Format; + public void setMessagingProvider(@javax.annotation.Nullable String messagingProvider) { + this.messagingProvider = messagingProvider; } - public LookupResult formatted(@javax.annotation.Nullable String formatted) { - this.formatted = formatted; + public LookupResult voiceProvider(@javax.annotation.Nullable String voiceProvider) { + this.voiceProvider = voiceProvider; return this; } /** - * The formatted version of the telephone number. - * @return formatted + * The voice service provider of the telephone number. + * @return voiceProvider */ @javax.annotation.Nullable - public String getFormatted() { - return formatted; + public String getVoiceProvider() { + return voiceProvider; } - public void setFormatted(@javax.annotation.Nullable String formatted) { - this.formatted = formatted; + public void setVoiceProvider(@javax.annotation.Nullable String voiceProvider) { + this.voiceProvider = voiceProvider; } - public LookupResult country(@javax.annotation.Nullable String country) { - this.country = country; + public LookupResult countryCodeA3(@javax.annotation.Nullable String countryCodeA3) { + this.countryCodeA3 = countryCodeA3; return this; } /** - * The country of the telephone number. - * @return country + * The country code of the telephone number in ISO 3166-1 alpha-3 format. + * @return countryCodeA3 */ @javax.annotation.Nullable - public String getCountry() { - return country; + public String getCountryCodeA3() { + return countryCodeA3; } - public void setCountry(@javax.annotation.Nullable String country) { - this.country = country; + public void setCountryCodeA3(@javax.annotation.Nullable String countryCodeA3) { + this.countryCodeA3 = countryCodeA3; } - public LookupResult lineType(@javax.annotation.Nullable String lineType) { - this.lineType = lineType; + public LookupResult deactivationReporter(@javax.annotation.Nullable String deactivationReporter) { + this.deactivationReporter = deactivationReporter; return this; } /** - * The line type of the telephone number. - * @return lineType + * [DNI-Only](#section/DNI-Only). The carrier that reported a deactivation event for this phone number. + * @return deactivationReporter */ @javax.annotation.Nullable - public String getLineType() { - return lineType; + public String getDeactivationReporter() { + return deactivationReporter; } - public void setLineType(@javax.annotation.Nullable String lineType) { - this.lineType = lineType; + public void setDeactivationReporter(@javax.annotation.Nullable String deactivationReporter) { + this.deactivationReporter = deactivationReporter; } - public LookupResult lineProvider(@javax.annotation.Nullable String lineProvider) { - this.lineProvider = lineProvider; + public LookupResult deactivationDate(@javax.annotation.Nullable String deactivationDate) { + this.deactivationDate = deactivationDate; return this; } /** - * The messaging service provider of the telephone number. - * @return lineProvider + * [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. + * @return deactivationDate */ @javax.annotation.Nullable - public String getLineProvider() { - return lineProvider; + public String getDeactivationDate() { + return deactivationDate; } - public void setLineProvider(@javax.annotation.Nullable String lineProvider) { - this.lineProvider = lineProvider; + public void setDeactivationDate(@javax.annotation.Nullable String deactivationDate) { + this.deactivationDate = deactivationDate; } - public LookupResult mobileCountryCode(@javax.annotation.Nullable String mobileCountryCode) { - this.mobileCountryCode = mobileCountryCode; + public LookupResult deactivationEvent(@javax.annotation.Nullable DeactivationEventEnum deactivationEvent) { + this.deactivationEvent = deactivationEvent; return this; } /** - * The first half of the Home Network Identity (HNI). - * @return mobileCountryCode + * Get deactivationEvent + * @return deactivationEvent */ @javax.annotation.Nullable - public String getMobileCountryCode() { - return mobileCountryCode; + public DeactivationEventEnum getDeactivationEvent() { + return deactivationEvent; } - public void setMobileCountryCode(@javax.annotation.Nullable String mobileCountryCode) { - this.mobileCountryCode = mobileCountryCode; + public void setDeactivationEvent(@javax.annotation.Nullable DeactivationEventEnum deactivationEvent) { + this.deactivationEvent = deactivationEvent; } - public LookupResult mobileNetworkCode(@javax.annotation.Nullable String mobileNetworkCode) { - this.mobileNetworkCode = mobileNetworkCode; + public LookupResult latestMessageDeliveryStatus(@javax.annotation.Nullable LatestMessageDeliveryStatusEnum latestMessageDeliveryStatus) { + this.latestMessageDeliveryStatus = latestMessageDeliveryStatus; return this; } /** - * The second half of the HNI. - * @return mobileNetworkCode + * Get latestMessageDeliveryStatus + * @return latestMessageDeliveryStatus */ @javax.annotation.Nullable - public String getMobileNetworkCode() { - return mobileNetworkCode; + public LatestMessageDeliveryStatusEnum getLatestMessageDeliveryStatus() { + return latestMessageDeliveryStatus; } - public void setMobileNetworkCode(@javax.annotation.Nullable String mobileNetworkCode) { - this.mobileNetworkCode = mobileNetworkCode; + public void setLatestMessageDeliveryStatus(@javax.annotation.Nullable LatestMessageDeliveryStatusEnum latestMessageDeliveryStatus) { + this.latestMessageDeliveryStatus = latestMessageDeliveryStatus; + } + + + public LookupResult initialMessageDeliveryStatusDate(@javax.annotation.Nullable LocalDate initialMessageDeliveryStatusDate) { + this.initialMessageDeliveryStatusDate = initialMessageDeliveryStatusDate; + return this; + } + + /** + * [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in `latestMessageDeliveryStatus`. Think of this as the \"start time\" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. + * @return initialMessageDeliveryStatusDate + */ + @javax.annotation.Nullable + public LocalDate getInitialMessageDeliveryStatusDate() { + return initialMessageDeliveryStatusDate; + } + + public void setInitialMessageDeliveryStatusDate(@javax.annotation.Nullable LocalDate initialMessageDeliveryStatusDate) { + this.initialMessageDeliveryStatusDate = initialMessageDeliveryStatusDate; + } + + + public LookupResult latestMessageDeliveryStatusDate(@javax.annotation.Nullable LocalDate latestMessageDeliveryStatusDate) { + this.latestMessageDeliveryStatusDate = latestMessageDeliveryStatusDate; + return this; + } + + /** + * [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. + * @return latestMessageDeliveryStatusDate + */ + @javax.annotation.Nullable + public LocalDate getLatestMessageDeliveryStatusDate() { + return latestMessageDeliveryStatusDate; + } + + public void setLatestMessageDeliveryStatusDate(@javax.annotation.Nullable LocalDate latestMessageDeliveryStatusDate) { + this.latestMessageDeliveryStatusDate = latestMessageDeliveryStatusDate; } /** @@ -325,36 +377,40 @@ public boolean equals(Object o) { return false; } LookupResult lookupResult = (LookupResult) o; - return Objects.equals(this.responseCode, lookupResult.responseCode) && - Objects.equals(this.message, lookupResult.message) && - Objects.equals(this.e164Format, lookupResult.e164Format) && - Objects.equals(this.formatted, lookupResult.formatted) && - Objects.equals(this.country, lookupResult.country) && + return Objects.equals(this.phoneNumber, lookupResult.phoneNumber) && Objects.equals(this.lineType, lookupResult.lineType) && - Objects.equals(this.lineProvider, lookupResult.lineProvider) && - Objects.equals(this.mobileCountryCode, lookupResult.mobileCountryCode) && - Objects.equals(this.mobileNetworkCode, lookupResult.mobileNetworkCode)&& + Objects.equals(this.messagingProvider, lookupResult.messagingProvider) && + Objects.equals(this.voiceProvider, lookupResult.voiceProvider) && + Objects.equals(this.countryCodeA3, lookupResult.countryCodeA3) && + Objects.equals(this.deactivationReporter, lookupResult.deactivationReporter) && + Objects.equals(this.deactivationDate, lookupResult.deactivationDate) && + Objects.equals(this.deactivationEvent, lookupResult.deactivationEvent) && + Objects.equals(this.latestMessageDeliveryStatus, lookupResult.latestMessageDeliveryStatus) && + Objects.equals(this.initialMessageDeliveryStatusDate, lookupResult.initialMessageDeliveryStatusDate) && + Objects.equals(this.latestMessageDeliveryStatusDate, lookupResult.latestMessageDeliveryStatusDate)&& Objects.equals(this.additionalProperties, lookupResult.additionalProperties); } @Override public int hashCode() { - return Objects.hash(responseCode, message, e164Format, formatted, country, lineType, lineProvider, mobileCountryCode, mobileNetworkCode, additionalProperties); + return Objects.hash(phoneNumber, lineType, messagingProvider, voiceProvider, countryCodeA3, deactivationReporter, deactivationDate, deactivationEvent, latestMessageDeliveryStatus, initialMessageDeliveryStatusDate, latestMessageDeliveryStatusDate, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LookupResult {\n"); - sb.append(" responseCode: ").append(toIndentedString(responseCode)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" e164Format: ").append(toIndentedString(e164Format)).append("\n"); - sb.append(" formatted: ").append(toIndentedString(formatted)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" lineType: ").append(toIndentedString(lineType)).append("\n"); - sb.append(" lineProvider: ").append(toIndentedString(lineProvider)).append("\n"); - sb.append(" mobileCountryCode: ").append(toIndentedString(mobileCountryCode)).append("\n"); - sb.append(" mobileNetworkCode: ").append(toIndentedString(mobileNetworkCode)).append("\n"); + sb.append(" messagingProvider: ").append(toIndentedString(messagingProvider)).append("\n"); + sb.append(" voiceProvider: ").append(toIndentedString(voiceProvider)).append("\n"); + sb.append(" countryCodeA3: ").append(toIndentedString(countryCodeA3)).append("\n"); + sb.append(" deactivationReporter: ").append(toIndentedString(deactivationReporter)).append("\n"); + sb.append(" deactivationDate: ").append(toIndentedString(deactivationDate)).append("\n"); + sb.append(" deactivationEvent: ").append(toIndentedString(deactivationEvent)).append("\n"); + sb.append(" latestMessageDeliveryStatus: ").append(toIndentedString(latestMessageDeliveryStatus)).append("\n"); + sb.append(" initialMessageDeliveryStatusDate: ").append(toIndentedString(initialMessageDeliveryStatusDate)).append("\n"); + sb.append(" latestMessageDeliveryStatusDate: ").append(toIndentedString(latestMessageDeliveryStatusDate)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -377,7 +433,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("Response Code", "Message", "E.164 Format", "Formatted", "Country", "Line Type", "Line Provider", "Mobile Country Code", "Mobile Network Code")); + openapiFields = new HashSet(Arrays.asList("phoneNumber", "lineType", "messagingProvider", "voiceProvider", "countryCodeA3", "deactivationReporter", "deactivationDate", "deactivationEvent", "latestMessageDeliveryStatus", "initialMessageDeliveryStatusDate", "latestMessageDeliveryStatusDate")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -396,29 +452,35 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } 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())); + 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())); + } + // validate the optional field `lineType` + if (jsonObj.get("lineType") != null && !jsonObj.get("lineType").isJsonNull()) { + LineTypeEnum.validateJsonElement(jsonObj.get("lineType")); } - if ((jsonObj.get("E.164 Format") != null && !jsonObj.get("E.164 Format").isJsonNull()) && !jsonObj.get("E.164 Format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `E.164 Format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("E.164 Format").toString())); + 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())); } - if ((jsonObj.get("Formatted") != null && !jsonObj.get("Formatted").isJsonNull()) && !jsonObj.get("Formatted").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Formatted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Formatted").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())); } - if ((jsonObj.get("Country") != null && !jsonObj.get("Country").isJsonNull()) && !jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Country").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())); } - if ((jsonObj.get("Line Type") != null && !jsonObj.get("Line Type").isJsonNull()) && !jsonObj.get("Line Type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Type").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())); } - if ((jsonObj.get("Line Provider") != null && !jsonObj.get("Line Provider").isJsonNull()) && !jsonObj.get("Line Provider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Provider").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())); } - if ((jsonObj.get("Mobile Country Code") != null && !jsonObj.get("Mobile Country Code").isJsonNull()) && !jsonObj.get("Mobile Country Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Country Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Country Code").toString())); + // validate the optional field `deactivationEvent` + if (jsonObj.get("deactivationEvent") != null && !jsonObj.get("deactivationEvent").isJsonNull()) { + DeactivationEventEnum.validateJsonElement(jsonObj.get("deactivationEvent")); } - if ((jsonObj.get("Mobile Network Code") != null && !jsonObj.get("Mobile Network Code").isJsonNull()) && !jsonObj.get("Mobile Network Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Network Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Network Code").toString())); + // validate the optional field `latestMessageDeliveryStatus` + if (jsonObj.get("latestMessageDeliveryStatus") != null && !jsonObj.get("latestMessageDeliveryStatus").isJsonNull()) { + LatestMessageDeliveryStatusEnum.validateJsonElement(jsonObj.get("latestMessageDeliveryStatus")); } } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java index d22be724..45b96eae 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -123,7 +123,7 @@ public void write(JsonWriter out, MultiChannelAction value) throws IOException { elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation"); + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation"); } @Override @@ -131,7 +131,6 @@ public MultiChannelAction read(JsonReader in) throws IOException { Object deserialized = null; JsonElement jsonElement = elementAdapter.read(in); - int match = 0; ArrayList errorMessages = new ArrayList<>(); TypeAdapter actualAdapter = elementAdapter; @@ -140,8 +139,9 @@ public MultiChannelAction read(JsonReader in) throws IOException { // validate the JSON object to see if any exception is thrown RbmActionBase.validateJsonElement(jsonElement); actualAdapter = adapterRbmActionBase; - match++; - log.log(Level.FINER, "Input data matches schema 'RbmActionBase'"); + MultiChannelAction ret = new MultiChannelAction(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); @@ -152,8 +152,9 @@ public MultiChannelAction read(JsonReader in) throws IOException { // validate the JSON object to see if any exception is thrown RbmActionDial.validateJsonElement(jsonElement); actualAdapter = adapterRbmActionDial; - match++; - log.log(Level.FINER, "Input data matches schema 'RbmActionDial'"); + MultiChannelAction ret = new MultiChannelAction(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); @@ -164,8 +165,9 @@ public MultiChannelAction read(JsonReader in) throws IOException { // validate the JSON object to see if any exception is thrown RbmActionViewLocation.validateJsonElement(jsonElement); actualAdapter = adapterRbmActionViewLocation; - match++; - log.log(Level.FINER, "Input data matches schema 'RbmActionViewLocation'"); + MultiChannelAction ret = new MultiChannelAction(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); @@ -176,8 +178,9 @@ public MultiChannelAction read(JsonReader in) throws IOException { // validate the JSON object to see if any exception is thrown MultiChannelActionCalendarEvent.validateJsonElement(jsonElement); actualAdapter = adapterMultiChannelActionCalendarEvent; - match++; - log.log(Level.FINER, "Input data matches schema 'MultiChannelActionCalendarEvent'"); + MultiChannelAction ret = new MultiChannelAction(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); @@ -188,35 +191,30 @@ public MultiChannelAction read(JsonReader in) throws IOException { // validate the JSON object to see if any exception is thrown RbmActionOpenUrl.validateJsonElement(jsonElement); actualAdapter = adapterRbmActionOpenUrl; - match++; - log.log(Level.FINER, "Input data matches schema 'RbmActionOpenUrl'"); + MultiChannelAction ret = new MultiChannelAction(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; } catch (Exception e) { // deserialization failed, continue errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionOpenUrl'", e); } - if (match == 1) { - MultiChannelAction ret = new MultiChannelAction(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelAction: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelAction: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } }.nullSafe(); } } - // store a list of schema names defined in oneOf + // store a list of schema names defined in anyOf public static final Map> schemas = new HashMap>(); public MultiChannelAction() { - super("oneOf", Boolean.FALSE); + super("anyOf", Boolean.FALSE); } public MultiChannelAction(Object o) { - super("oneOf", Boolean.FALSE); + super("anyOf", Boolean.FALSE); setActualInstance(o); } @@ -234,11 +232,11 @@ public Map> getSchemas() { } /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: * MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation * - * It could be an instance of the 'oneOf' schemas. + * It could be an instance of the 'anyOf' schemas. */ @Override public void setActualInstance(Object instance) { @@ -344,13 +342,12 @@ public RbmActionOpenUrl getRbmActionOpenUrl() throws ClassCastException { * @throws IOException if the JSON Element is invalid with respect to MultiChannelAction */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; + // validate anyOf schemas one by one ArrayList errorMessages = new ArrayList<>(); // validate the json string with RbmActionBase try { RbmActionBase.validateJsonElement(jsonElement); - validCount++; + return; } catch (Exception e) { errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); // continue to the next one @@ -358,7 +355,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the json string with RbmActionDial try { RbmActionDial.validateJsonElement(jsonElement); - validCount++; + return; } catch (Exception e) { errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); // continue to the next one @@ -366,7 +363,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the json string with RbmActionViewLocation try { RbmActionViewLocation.validateJsonElement(jsonElement); - validCount++; + return; } catch (Exception e) { errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); // continue to the next one @@ -374,7 +371,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the json string with MultiChannelActionCalendarEvent try { MultiChannelActionCalendarEvent.validateJsonElement(jsonElement); - validCount++; + return; } catch (Exception e) { errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); // continue to the next one @@ -382,14 +379,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the json string with RbmActionOpenUrl try { RbmActionOpenUrl.validateJsonElement(jsonElement); - validCount++; + return; } catch (Exception e) { errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl 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 MultiChannelAction with oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelAction with anyOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); } /** diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java new file mode 100644 index 00000000..1c78d97e --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java @@ -0,0 +1,382 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MmsMessageContent; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListMMSObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListMMSObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private MmsMessageContent content; + + public MultiChannelChannelListMMSObject() { + } + + public MultiChannelChannelListMMSObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListMMSObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListMMSObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListMMSObject content(@javax.annotation.Nonnull MmsMessageContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public MmsMessageContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull MmsMessageContent content) { + this.content = content; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListMMSObject instance itself + */ + public MultiChannelChannelListMMSObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListMMSObject multiChannelChannelListMMSObject = (MultiChannelChannelListMMSObject) o; + return Objects.equals(this.from, multiChannelChannelListMMSObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListMMSObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListMMSObject.channel) && + Objects.equals(this.content, multiChannelChannelListMMSObject.content)&& + Objects.equals(this.additionalProperties, multiChannelChannelListMMSObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListMMSObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListMMSObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // validate the required field `channel` + MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); + // validate the required field `content` + MmsMessageContent.validateJsonElement(jsonObj.get("content")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListMMSObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListMMSObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListMMSObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListMMSObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListMMSObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListMMSObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListMMSObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListMMSObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListMMSObject + */ + public static MultiChannelChannelListMMSObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListMMSObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListMMSObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java new file mode 100644 index 00000000..aba8d715 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java @@ -0,0 +1,411 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MmsMessageContent; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListMMSResponseObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListMMSResponseObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private MmsMessageContent content; + + public static final String SERIALIZED_NAME_OWNER = "owner"; + @SerializedName(SERIALIZED_NAME_OWNER) + @javax.annotation.Nonnull + private String owner; + + public MultiChannelChannelListMMSResponseObject() { + } + + public MultiChannelChannelListMMSResponseObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListMMSResponseObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListMMSResponseObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListMMSResponseObject content(@javax.annotation.Nonnull MmsMessageContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public MmsMessageContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull MmsMessageContent content) { + this.content = content; + } + + + public MultiChannelChannelListMMSResponseObject owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * The Bandwidth senderId associated with the message. Identical to 'from'. + * @return owner + */ + @javax.annotation.Nonnull + public String getOwner() { + return owner; + } + + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListMMSResponseObject instance itself + */ + public MultiChannelChannelListMMSResponseObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListMMSResponseObject multiChannelChannelListMMSResponseObject = (MultiChannelChannelListMMSResponseObject) o; + return Objects.equals(this.from, multiChannelChannelListMMSResponseObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListMMSResponseObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListMMSResponseObject.channel) && + Objects.equals(this.content, multiChannelChannelListMMSResponseObject.content) && + Objects.equals(this.owner, multiChannelChannelListMMSResponseObject.owner)&& + Objects.equals(this.additionalProperties, multiChannelChannelListMMSResponseObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, owner, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListMMSResponseObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListMMSResponseObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListMMSResponseObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListMMSResponseObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListMMSResponseObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListMMSResponseObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListMMSResponseObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListMMSResponseObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListMMSResponseObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListMMSResponseObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListMMSResponseObject + */ + public static MultiChannelChannelListMMSResponseObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListMMSResponseObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListMMSResponseObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java new file mode 100644 index 00000000..8ba8d2ae --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java @@ -0,0 +1,353 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListObjectBase + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListObjectBase { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public MultiChannelChannelListObjectBase() { + } + + public MultiChannelChannelListObjectBase from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListObjectBase applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListObjectBase channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListObjectBase instance itself + */ + public MultiChannelChannelListObjectBase putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListObjectBase multiChannelChannelListObjectBase = (MultiChannelChannelListObjectBase) o; + return Objects.equals(this.from, multiChannelChannelListObjectBase.from) && + Objects.equals(this.applicationId, multiChannelChannelListObjectBase.applicationId) && + Objects.equals(this.channel, multiChannelChannelListObjectBase.channel)&& + Objects.equals(this.additionalProperties, multiChannelChannelListObjectBase.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListObjectBase {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListObjectBase + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // validate the required field `channel` + MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListObjectBase.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListObjectBase' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListObjectBase.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListObjectBase value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListObjectBase read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListObjectBase instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListObjectBase given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListObjectBase + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListObjectBase + */ + public static MultiChannelChannelListObjectBase fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListObjectBase.class); + } + + /** + * Convert an instance of MultiChannelChannelListObjectBase to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java new file mode 100644 index 00000000..925ffdb2 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java @@ -0,0 +1,295 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListOwnerObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListOwnerObject { + public static final String SERIALIZED_NAME_OWNER = "owner"; + @SerializedName(SERIALIZED_NAME_OWNER) + @javax.annotation.Nonnull + private String owner; + + public MultiChannelChannelListOwnerObject() { + } + + public MultiChannelChannelListOwnerObject owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * The Bandwidth senderId associated with the message. Identical to 'from'. + * @return owner + */ + @javax.annotation.Nonnull + public String getOwner() { + return owner; + } + + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListOwnerObject instance itself + */ + public MultiChannelChannelListOwnerObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListOwnerObject multiChannelChannelListOwnerObject = (MultiChannelChannelListOwnerObject) o; + return Objects.equals(this.owner, multiChannelChannelListOwnerObject.owner)&& + Objects.equals(this.additionalProperties, multiChannelChannelListOwnerObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(owner, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListOwnerObject {\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("owner")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("owner")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListOwnerObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListOwnerObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListOwnerObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListOwnerObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListOwnerObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListOwnerObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListOwnerObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListOwnerObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListOwnerObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListOwnerObject + */ + public static MultiChannelChannelListOwnerObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListOwnerObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListOwnerObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java new file mode 100644 index 00000000..221b74c5 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java @@ -0,0 +1,382 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MultiChannelChannelListRBMObjectAllOfContent; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListRBMObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListRBMObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private MultiChannelChannelListRBMObjectAllOfContent content; + + public MultiChannelChannelListRBMObject() { + } + + public MultiChannelChannelListRBMObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListRBMObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListRBMObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListRBMObject content(@javax.annotation.Nonnull MultiChannelChannelListRBMObjectAllOfContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public MultiChannelChannelListRBMObjectAllOfContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull MultiChannelChannelListRBMObjectAllOfContent content) { + this.content = content; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListRBMObject instance itself + */ + public MultiChannelChannelListRBMObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListRBMObject multiChannelChannelListRBMObject = (MultiChannelChannelListRBMObject) o; + return Objects.equals(this.from, multiChannelChannelListRBMObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListRBMObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListRBMObject.channel) && + Objects.equals(this.content, multiChannelChannelListRBMObject.content)&& + Objects.equals(this.additionalProperties, multiChannelChannelListRBMObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListRBMObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListRBMObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // validate the required field `channel` + MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); + // validate the required field `content` + MultiChannelChannelListRBMObjectAllOfContent.validateJsonElement(jsonObj.get("content")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListRBMObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListRBMObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListRBMObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListRBMObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListRBMObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListRBMObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListRBMObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListRBMObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListRBMObject + */ + public static MultiChannelChannelListRBMObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListRBMObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListRBMObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java new file mode 100644 index 00000000..a8ff884d --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java @@ -0,0 +1,330 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.CardWidthEnum; +import com.bandwidth.sdk.model.MultiChannelAction; +import com.bandwidth.sdk.model.RbmCardContent; +import com.bandwidth.sdk.model.RbmMessageContentFile; +import com.bandwidth.sdk.model.RbmMessageContentRichCard; +import com.bandwidth.sdk.model.RbmMessageContentText; +import com.bandwidth.sdk.model.RbmMessageMedia; +import com.bandwidth.sdk.model.StandaloneCardOrientationEnum; +import com.bandwidth.sdk.model.ThumbnailAlignmentEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +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; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.bandwidth.sdk.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListRBMObjectAllOfContent extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(MultiChannelChannelListRBMObjectAllOfContent.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListRBMObjectAllOfContent.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListRBMObjectAllOfContent' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterRbmMessageContentText = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageContentText.class)); + final TypeAdapter adapterRbmMessageMedia = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageMedia.class)); + final TypeAdapter adapterRbmMessageContentRichCard = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageContentRichCard.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListRBMObjectAllOfContent value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `RbmMessageContentText` + if (value.getActualInstance() instanceof RbmMessageContentText) { + JsonElement element = adapterRbmMessageContentText.toJsonTree((RbmMessageContentText)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `RbmMessageMedia` + if (value.getActualInstance() instanceof RbmMessageMedia) { + JsonElement element = adapterRbmMessageMedia.toJsonTree((RbmMessageMedia)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `RbmMessageContentRichCard` + if (value.getActualInstance() instanceof RbmMessageContentRichCard) { + JsonElement element = adapterRbmMessageContentRichCard.toJsonTree((RbmMessageContentRichCard)value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia"); + } + + @Override + public MultiChannelChannelListRBMObjectAllOfContent read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize RbmMessageContentText + try { + // validate the JSON object to see if any exception is thrown + RbmMessageContentText.validateJsonElement(jsonElement); + actualAdapter = adapterRbmMessageContentText; + match++; + 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())); + log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentText'", e); + } + // deserialize RbmMessageMedia + try { + // validate the JSON object to see if any exception is thrown + RbmMessageMedia.validateJsonElement(jsonElement); + actualAdapter = adapterRbmMessageMedia; + match++; + 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())); + log.log(Level.FINER, "Input data does not match schema 'RbmMessageMedia'", e); + } + // deserialize RbmMessageContentRichCard + try { + // validate the JSON object to see if any exception is thrown + RbmMessageContentRichCard.validateJsonElement(jsonElement); + actualAdapter = adapterRbmMessageContentRichCard; + match++; + 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())); + log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentRichCard'", e); + } + + if (match == 1) { + MultiChannelChannelListRBMObjectAllOfContent ret = new MultiChannelChannelListRBMObjectAllOfContent(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + 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())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public MultiChannelChannelListRBMObjectAllOfContent() { + super("oneOf", Boolean.FALSE); + } + + public MultiChannelChannelListRBMObjectAllOfContent(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("RbmMessageContentText", RbmMessageContentText.class); + schemas.put("RbmMessageMedia", RbmMessageMedia.class); + schemas.put("RbmMessageContentRichCard", RbmMessageContentRichCard.class); + } + + @Override + public Map> getSchemas() { + return MultiChannelChannelListRBMObjectAllOfContent.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia + * + * It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof RbmMessageContentText) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof RbmMessageMedia) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof RbmMessageContentRichCard) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia"); + } + + /** + * Get the actual instance, which can be the following: + * RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia + * + * @return The actual instance (RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `RbmMessageContentText`. If the actual instance is not `RbmMessageContentText`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RbmMessageContentText` + * @throws ClassCastException if the instance is not `RbmMessageContentText` + */ + public RbmMessageContentText getRbmMessageContentText() throws ClassCastException { + return (RbmMessageContentText)super.getActualInstance(); + } + + /** + * Get the actual instance of `RbmMessageMedia`. If the actual instance is not `RbmMessageMedia`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RbmMessageMedia` + * @throws ClassCastException if the instance is not `RbmMessageMedia` + */ + public RbmMessageMedia getRbmMessageMedia() throws ClassCastException { + return (RbmMessageMedia)super.getActualInstance(); + } + + /** + * Get the actual instance of `RbmMessageContentRichCard`. If the actual instance is not `RbmMessageContentRichCard`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `RbmMessageContentRichCard` + * @throws ClassCastException if the instance is not `RbmMessageContentRichCard` + */ + public RbmMessageContentRichCard getRbmMessageContentRichCard() throws ClassCastException { + return (RbmMessageContentRichCard)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListRBMObjectAllOfContent + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with RbmMessageContentText + try { + RbmMessageContentText.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with RbmMessageMedia + try { + RbmMessageMedia.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with RbmMessageContentRichCard + try { + RbmMessageContentRichCard.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "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())); + } + } + + /** + * Create an instance of MultiChannelChannelListRBMObjectAllOfContent given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListRBMObjectAllOfContent + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListRBMObjectAllOfContent + */ + public static MultiChannelChannelListRBMObjectAllOfContent fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListRBMObjectAllOfContent.class); + } + + /** + * Convert an instance of MultiChannelChannelListRBMObjectAllOfContent to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java new file mode 100644 index 00000000..a7a4d525 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java @@ -0,0 +1,411 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MultiChannelChannelListRBMObjectAllOfContent; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListRBMResponseObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListRBMResponseObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private MultiChannelChannelListRBMObjectAllOfContent content; + + public static final String SERIALIZED_NAME_OWNER = "owner"; + @SerializedName(SERIALIZED_NAME_OWNER) + @javax.annotation.Nonnull + private String owner; + + public MultiChannelChannelListRBMResponseObject() { + } + + public MultiChannelChannelListRBMResponseObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListRBMResponseObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListRBMResponseObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListRBMResponseObject content(@javax.annotation.Nonnull MultiChannelChannelListRBMObjectAllOfContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public MultiChannelChannelListRBMObjectAllOfContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull MultiChannelChannelListRBMObjectAllOfContent content) { + this.content = content; + } + + + public MultiChannelChannelListRBMResponseObject owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * The Bandwidth senderId associated with the message. Identical to 'from'. + * @return owner + */ + @javax.annotation.Nonnull + public String getOwner() { + return owner; + } + + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListRBMResponseObject instance itself + */ + public MultiChannelChannelListRBMResponseObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListRBMResponseObject multiChannelChannelListRBMResponseObject = (MultiChannelChannelListRBMResponseObject) o; + return Objects.equals(this.from, multiChannelChannelListRBMResponseObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListRBMResponseObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListRBMResponseObject.channel) && + Objects.equals(this.content, multiChannelChannelListRBMResponseObject.content) && + Objects.equals(this.owner, multiChannelChannelListRBMResponseObject.owner)&& + Objects.equals(this.additionalProperties, multiChannelChannelListRBMResponseObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, owner, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListRBMResponseObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListRBMResponseObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListRBMResponseObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListRBMResponseObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListRBMResponseObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListRBMResponseObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListRBMResponseObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListRBMResponseObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListRBMResponseObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListRBMResponseObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListRBMResponseObject + */ + public static MultiChannelChannelListRBMResponseObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListRBMResponseObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListRBMResponseObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java new file mode 100644 index 00000000..cc4b8c75 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java @@ -0,0 +1,317 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MmsMessageContent; +import com.bandwidth.sdk.model.MultiChannelChannelListMMSObject; +import com.bandwidth.sdk.model.MultiChannelChannelListRBMObject; +import com.bandwidth.sdk.model.MultiChannelChannelListSMSObject; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +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; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.bandwidth.sdk.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListRequestObject extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(MultiChannelChannelListRequestObject.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListRequestObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListRequestObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterMultiChannelChannelListRBMObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListRBMObject.class)); + final TypeAdapter adapterMultiChannelChannelListSMSObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListSMSObject.class)); + final TypeAdapter adapterMultiChannelChannelListMMSObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListMMSObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListRequestObject value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `MultiChannelChannelListRBMObject` + if (value.getActualInstance() instanceof MultiChannelChannelListRBMObject) { + JsonElement element = adapterMultiChannelChannelListRBMObject.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()); + 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()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject"); + } + + @Override + public MultiChannelChannelListRequestObject read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize MultiChannelChannelListRBMObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListRBMObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListRBMObject; + MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListRBMObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListRBMObject'", e); + } + // deserialize MultiChannelChannelListSMSObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListSMSObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListSMSObject; + MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListSMSObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListSMSObject'", e); + } + // deserialize MultiChannelChannelListMMSObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListMMSObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListMMSObject; + MultiChannelChannelListRequestObject ret = new MultiChannelChannelListRequestObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListMMSObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListMMSObject'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListRequestObject: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public MultiChannelChannelListRequestObject() { + super("anyOf", Boolean.FALSE); + } + + public MultiChannelChannelListRequestObject(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MultiChannelChannelListRBMObject", MultiChannelChannelListRBMObject.class); + schemas.put("MultiChannelChannelListSMSObject", MultiChannelChannelListSMSObject.class); + schemas.put("MultiChannelChannelListMMSObject", MultiChannelChannelListMMSObject.class); + } + + @Override + public Map> getSchemas() { + return MultiChannelChannelListRequestObject.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof MultiChannelChannelListRBMObject) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MultiChannelChannelListSMSObject) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MultiChannelChannelListMMSObject) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject"); + } + + /** + * Get the actual instance, which can be the following: + * MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject + * + * @return The actual instance (MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListRBMObject`. If the actual instance is not `MultiChannelChannelListRBMObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListRBMObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListRBMObject` + */ + public MultiChannelChannelListRBMObject getMultiChannelChannelListRBMObject() throws ClassCastException { + return (MultiChannelChannelListRBMObject)super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListSMSObject`. If the actual instance is not `MultiChannelChannelListSMSObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListSMSObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListSMSObject` + */ + public MultiChannelChannelListSMSObject getMultiChannelChannelListSMSObject() throws ClassCastException { + return (MultiChannelChannelListSMSObject)super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListMMSObject`. If the actual instance is not `MultiChannelChannelListMMSObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListMMSObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListMMSObject` + */ + public MultiChannelChannelListMMSObject getMultiChannelChannelListMMSObject() throws ClassCastException { + return (MultiChannelChannelListMMSObject)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListRequestObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with MultiChannelChannelListRBMObject + try { + MultiChannelChannelListRBMObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListRBMObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with MultiChannelChannelListSMSObject + try { + MultiChannelChannelListSMSObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListSMSObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with MultiChannelChannelListMMSObject + try { + MultiChannelChannelListMMSObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListMMSObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelChannelListRequestObject with anyOf schemas: MultiChannelChannelListMMSObject, MultiChannelChannelListRBMObject, MultiChannelChannelListSMSObject. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of MultiChannelChannelListRequestObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListRequestObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListRequestObject + */ + public static MultiChannelChannelListRequestObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListRequestObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListRequestObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java new file mode 100644 index 00000000..963b7e0d --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java @@ -0,0 +1,317 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MmsMessageContent; +import com.bandwidth.sdk.model.MultiChannelChannelListMMSResponseObject; +import com.bandwidth.sdk.model.MultiChannelChannelListRBMResponseObject; +import com.bandwidth.sdk.model.MultiChannelChannelListSMSResponseObject; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + + + +import java.io.IOException; +import java.lang.reflect.Type; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +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; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.JsonPrimitive; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonArray; +import com.google.gson.JsonParseException; + +import com.bandwidth.sdk.JSON; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListResponseObject extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(MultiChannelChannelListResponseObject.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListResponseObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListResponseObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterMultiChannelChannelListRBMResponseObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListRBMResponseObject.class)); + final TypeAdapter adapterMultiChannelChannelListSMSResponseObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListSMSResponseObject.class)); + final TypeAdapter adapterMultiChannelChannelListMMSResponseObject = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListMMSResponseObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListResponseObject value) throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `MultiChannelChannelListRBMResponseObject` + if (value.getActualInstance() instanceof MultiChannelChannelListRBMResponseObject) { + JsonElement element = adapterMultiChannelChannelListRBMResponseObject.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()); + 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()); + elementAdapter.write(out, element); + return; + } + throw new IOException("Failed to serialize as the type doesn't match anyOf schemas: MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject"); + } + + @Override + public MultiChannelChannelListResponseObject read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize MultiChannelChannelListRBMResponseObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListRBMResponseObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListRBMResponseObject; + MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListRBMResponseObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListRBMResponseObject'", e); + } + // deserialize MultiChannelChannelListSMSResponseObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListSMSResponseObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListSMSResponseObject; + MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListSMSResponseObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListSMSResponseObject'", e); + } + // deserialize MultiChannelChannelListMMSResponseObject + try { + // validate the JSON object to see if any exception is thrown + MultiChannelChannelListMMSResponseObject.validateJsonElement(jsonElement); + actualAdapter = adapterMultiChannelChannelListMMSResponseObject; + MultiChannelChannelListResponseObject ret = new MultiChannelChannelListResponseObject(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListMMSResponseObject failed with `%s`.", e.getMessage())); + log.log(Level.FINER, "Input data does not match schema 'MultiChannelChannelListMMSResponseObject'", e); + } + + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListResponseObject: no class matches result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in anyOf + public static final Map> schemas = new HashMap>(); + + public MultiChannelChannelListResponseObject() { + super("anyOf", Boolean.FALSE); + } + + public MultiChannelChannelListResponseObject(Object o) { + super("anyOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MultiChannelChannelListRBMResponseObject", MultiChannelChannelListRBMResponseObject.class); + schemas.put("MultiChannelChannelListSMSResponseObject", MultiChannelChannelListSMSResponseObject.class); + schemas.put("MultiChannelChannelListMMSResponseObject", MultiChannelChannelListMMSResponseObject.class); + } + + @Override + public Map> getSchemas() { + return MultiChannelChannelListResponseObject.schemas; + } + + /** + * Set the instance that matches the anyOf child schema, check + * the instance parameter is valid against the anyOf child schemas: + * MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject + * + * It could be an instance of the 'anyOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof MultiChannelChannelListRBMResponseObject) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MultiChannelChannelListSMSResponseObject) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof MultiChannelChannelListMMSResponseObject) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject"); + } + + /** + * Get the actual instance, which can be the following: + * MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject + * + * @return The actual instance (MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListRBMResponseObject`. If the actual instance is not `MultiChannelChannelListRBMResponseObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListRBMResponseObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListRBMResponseObject` + */ + public MultiChannelChannelListRBMResponseObject getMultiChannelChannelListRBMResponseObject() throws ClassCastException { + return (MultiChannelChannelListRBMResponseObject)super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListSMSResponseObject`. If the actual instance is not `MultiChannelChannelListSMSResponseObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListSMSResponseObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListSMSResponseObject` + */ + public MultiChannelChannelListSMSResponseObject getMultiChannelChannelListSMSResponseObject() throws ClassCastException { + return (MultiChannelChannelListSMSResponseObject)super.getActualInstance(); + } + + /** + * Get the actual instance of `MultiChannelChannelListMMSResponseObject`. If the actual instance is not `MultiChannelChannelListMMSResponseObject`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `MultiChannelChannelListMMSResponseObject` + * @throws ClassCastException if the instance is not `MultiChannelChannelListMMSResponseObject` + */ + public MultiChannelChannelListMMSResponseObject getMultiChannelChannelListMMSResponseObject() throws ClassCastException { + return (MultiChannelChannelListMMSResponseObject)super.getActualInstance(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListResponseObject + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate anyOf schemas one by one + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with MultiChannelChannelListRBMResponseObject + try { + MultiChannelChannelListRBMResponseObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListRBMResponseObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with MultiChannelChannelListSMSResponseObject + try { + MultiChannelChannelListSMSResponseObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListSMSResponseObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + // validate the json string with MultiChannelChannelListMMSResponseObject + try { + MultiChannelChannelListMMSResponseObject.validateJsonElement(jsonElement); + return; + } catch (Exception e) { + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelChannelListMMSResponseObject failed with `%s`.", e.getMessage())); + // continue to the next one + } + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelChannelListResponseObject with anyOf schemas: MultiChannelChannelListMMSResponseObject, MultiChannelChannelListRBMResponseObject, MultiChannelChannelListSMSResponseObject. no class match the result, expected at least 1. Detailed failure message for anyOf schemas: %s. JSON: %s", errorMessages, jsonElement.toString())); + } + + /** + * Create an instance of MultiChannelChannelListResponseObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListResponseObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListResponseObject + */ + public static MultiChannelChannelListResponseObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListResponseObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListResponseObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java new file mode 100644 index 00000000..95dbfa70 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java @@ -0,0 +1,382 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.bandwidth.sdk.model.SmsMessageContent; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListSMSObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListSMSObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private SmsMessageContent content; + + public MultiChannelChannelListSMSObject() { + } + + public MultiChannelChannelListSMSObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListSMSObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListSMSObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListSMSObject content(@javax.annotation.Nonnull SmsMessageContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public SmsMessageContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull SmsMessageContent content) { + this.content = content; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListSMSObject instance itself + */ + public MultiChannelChannelListSMSObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListSMSObject multiChannelChannelListSMSObject = (MultiChannelChannelListSMSObject) o; + return Objects.equals(this.from, multiChannelChannelListSMSObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListSMSObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListSMSObject.channel) && + Objects.equals(this.content, multiChannelChannelListSMSObject.content)&& + Objects.equals(this.additionalProperties, multiChannelChannelListSMSObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListSMSObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListSMSObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // validate the required field `channel` + MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); + // validate the required field `content` + SmsMessageContent.validateJsonElement(jsonObj.get("content")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListSMSObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListSMSObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListSMSObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListSMSObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListSMSObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListSMSObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListSMSObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListSMSObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListSMSObject + */ + public static MultiChannelChannelListSMSObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListSMSObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListSMSObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java new file mode 100644 index 00000000..3b8c9b73 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java @@ -0,0 +1,411 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; +import com.bandwidth.sdk.model.SmsMessageContent; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * MultiChannelChannelListSMSResponseObject + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class MultiChannelChannelListSMSResponseObject { + public static final String SERIALIZED_NAME_FROM = "from"; + @SerializedName(SERIALIZED_NAME_FROM) + @javax.annotation.Nonnull + private String from; + + public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; + @SerializedName(SERIALIZED_NAME_APPLICATION_ID) + @javax.annotation.Nonnull + private String applicationId; + + public static final String SERIALIZED_NAME_CHANNEL = "channel"; + @SerializedName(SERIALIZED_NAME_CHANNEL) + @javax.annotation.Nonnull + private MultiChannelMessageChannelEnum channel; + + public static final String SERIALIZED_NAME_CONTENT = "content"; + @SerializedName(SERIALIZED_NAME_CONTENT) + @javax.annotation.Nonnull + private SmsMessageContent content; + + public static final String SERIALIZED_NAME_OWNER = "owner"; + @SerializedName(SERIALIZED_NAME_OWNER) + @javax.annotation.Nonnull + private String owner; + + public MultiChannelChannelListSMSResponseObject() { + } + + public MultiChannelChannelListSMSResponseObject from(@javax.annotation.Nonnull String from) { + this.from = from; + return this; + } + + /** + * The sender ID of the message. This could be an alphanumeric sender ID. + * @return from + */ + @javax.annotation.Nonnull + public String getFrom() { + return from; + } + + public void setFrom(@javax.annotation.Nonnull String from) { + this.from = from; + } + + + public MultiChannelChannelListSMSResponseObject applicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + * @return applicationId + */ + @javax.annotation.Nonnull + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(@javax.annotation.Nonnull String applicationId) { + this.applicationId = applicationId; + } + + + public MultiChannelChannelListSMSResponseObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + return this; + } + + /** + * Get channel + * @return channel + */ + @javax.annotation.Nonnull + public MultiChannelMessageChannelEnum getChannel() { + return channel; + } + + public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { + this.channel = channel; + } + + + public MultiChannelChannelListSMSResponseObject content(@javax.annotation.Nonnull SmsMessageContent content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + */ + @javax.annotation.Nonnull + public SmsMessageContent getContent() { + return content; + } + + public void setContent(@javax.annotation.Nonnull SmsMessageContent content) { + this.content = content; + } + + + public MultiChannelChannelListSMSResponseObject owner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + return this; + } + + /** + * The Bandwidth senderId associated with the message. Identical to 'from'. + * @return owner + */ + @javax.annotation.Nonnull + public String getOwner() { + return owner; + } + + public void setOwner(@javax.annotation.Nonnull String owner) { + this.owner = owner; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the MultiChannelChannelListSMSResponseObject instance itself + */ + public MultiChannelChannelListSMSResponseObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MultiChannelChannelListSMSResponseObject multiChannelChannelListSMSResponseObject = (MultiChannelChannelListSMSResponseObject) o; + return Objects.equals(this.from, multiChannelChannelListSMSResponseObject.from) && + Objects.equals(this.applicationId, multiChannelChannelListSMSResponseObject.applicationId) && + Objects.equals(this.channel, multiChannelChannelListSMSResponseObject.channel) && + Objects.equals(this.content, multiChannelChannelListSMSResponseObject.content) && + Objects.equals(this.owner, multiChannelChannelListSMSResponseObject.owner)&& + Objects.equals(this.additionalProperties, multiChannelChannelListSMSResponseObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, applicationId, channel, content, owner, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MultiChannelChannelListSMSResponseObject {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListSMSResponseObject + */ + 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())); + } + } + + // 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())); + } + } + 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())); + } + 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())); + } + // 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!MultiChannelChannelListSMSResponseObject.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'MultiChannelChannelListSMSResponseObject' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListSMSResponseObject.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, MultiChannelChannelListSMSResponseObject value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public MultiChannelChannelListSMSResponseObject read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + MultiChannelChannelListSMSResponseObject instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of MultiChannelChannelListSMSResponseObject given an JSON string + * + * @param jsonString JSON string + * @return An instance of MultiChannelChannelListSMSResponseObject + * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListSMSResponseObject + */ + public static MultiChannelChannelListSMSResponseObject fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, MultiChannelChannelListSMSResponseObject.class); + } + + /** + * Convert an instance of MultiChannelChannelListSMSResponseObject to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java index da969b77..326e2a59 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -15,7 +15,7 @@ import java.util.Objects; import java.util.Locale; -import com.bandwidth.sdk.model.MultiChannelChannelListObject; +import com.bandwidth.sdk.model.MultiChannelChannelListRequestObject; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -65,7 +65,7 @@ public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_CHANNEL_LIST = "channelList"; @SerializedName(SERIALIZED_NAME_CHANNEL_LIST) @javax.annotation.Nonnull - private List channelList = new ArrayList<>(); + private List channelList = new ArrayList<>(); public static final String SERIALIZED_NAME_TAG = "tag"; @SerializedName(SERIALIZED_NAME_TAG) @@ -104,12 +104,12 @@ public void setTo(@javax.annotation.Nonnull String to) { } - public MultiChannelMessageRequest channelList(@javax.annotation.Nonnull List channelList) { + public MultiChannelMessageRequest channelList(@javax.annotation.Nonnull List channelList) { this.channelList = channelList; return this; } - public MultiChannelMessageRequest addChannelListItem(MultiChannelChannelListObject channelListItem) { + public MultiChannelMessageRequest addChannelListItem(MultiChannelChannelListRequestObject channelListItem) { if (this.channelList == null) { this.channelList = new ArrayList<>(); } @@ -122,11 +122,11 @@ public MultiChannelMessageRequest addChannelListItem(MultiChannelChannelListObje * @return channelList */ @javax.annotation.Nonnull - public List getChannelList() { + public List getChannelList() { return channelList; } - public void setChannelList(@javax.annotation.Nonnull List channelList) { + public void setChannelList(@javax.annotation.Nonnull List channelList) { this.channelList = channelList; } @@ -323,7 +323,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); // validate the required field `channelList` (array) for (int i = 0; i < jsonArraychannelList.size(); i++) { - MultiChannelChannelListObject.validateJsonElement(jsonArraychannelList.get(i)); + 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())); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java index 22883e76..7edd45ca 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -16,7 +16,7 @@ import java.util.Objects; import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; -import com.bandwidth.sdk.model.MultiChannelMessageResponseDataChannelListInner; +import com.bandwidth.sdk.model.MultiChannelChannelListResponseObject; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -83,7 +83,7 @@ public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_CHANNEL_LIST = "channelList"; @SerializedName(SERIALIZED_NAME_CHANNEL_LIST) @javax.annotation.Nonnull - private List channelList = new ArrayList<>(); + private List channelList = new ArrayList<>(); public static final String SERIALIZED_NAME_TAG = "tag"; @SerializedName(SERIALIZED_NAME_TAG) @@ -187,12 +187,12 @@ public void setTo(@javax.annotation.Nonnull Set to) { } - public MultiChannelMessageResponseData channelList(@javax.annotation.Nonnull List channelList) { + public MultiChannelMessageResponseData channelList(@javax.annotation.Nonnull List channelList) { this.channelList = channelList; return this; } - public MultiChannelMessageResponseData addChannelListItem(MultiChannelMessageResponseDataChannelListInner channelListItem) { + public MultiChannelMessageResponseData addChannelListItem(MultiChannelChannelListResponseObject channelListItem) { if (this.channelList == null) { this.channelList = new ArrayList<>(); } @@ -205,11 +205,11 @@ public MultiChannelMessageResponseData addChannelListItem(MultiChannelMessageRes * @return channelList */ @javax.annotation.Nonnull - public List getChannelList() { + public List getChannelList() { return channelList; } - public void setChannelList(@javax.annotation.Nonnull List channelList) { + public void setChannelList(@javax.annotation.Nonnull List channelList) { this.channelList = channelList; } @@ -420,7 +420,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); // validate the required field `channelList` (array) for (int i = 0; i < jsonArraychannelList.size(); i++) { - MultiChannelMessageResponseDataChannelListInner.validateJsonElement(jsonArraychannelList.get(i)); + 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())); diff --git a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java new file mode 100644 index 00000000..cc9e700a --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java @@ -0,0 +1,308 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import com.bandwidth.sdk.JSON; + +/** + * SyncLookupRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class SyncLookupRequest { + public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) + @javax.annotation.Nonnull + private List phoneNumbers = new ArrayList<>(); + + public SyncLookupRequest() { + } + + public SyncLookupRequest phoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; + } + + public SyncLookupRequest addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList<>(); + } + this.phoneNumbers.add(phoneNumbersItem); + return this; + } + + /** + * Telephone numbers in E.164 format. + * @return phoneNumbers + */ + @javax.annotation.Nonnull + public List getPhoneNumbers() { + return phoneNumbers; + } + + public void setPhoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the SyncLookupRequest instance itself + */ + public SyncLookupRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyncLookupRequest syncLookupRequest = (SyncLookupRequest) o; + return Objects.equals(this.phoneNumbers, syncLookupRequest.phoneNumbers)&& + Objects.equals(this.additionalProperties, syncLookupRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyncLookupRequest {\n"); + sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("phoneNumbers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("phoneNumbers")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SyncLookupRequest + */ + 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())); + } + } + + // 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())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SyncLookupRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SyncLookupRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SyncLookupRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SyncLookupRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public SyncLookupRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + SyncLookupRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SyncLookupRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of SyncLookupRequest + * @throws IOException if the JSON string is invalid with respect to SyncLookupRequest + */ + public static SyncLookupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SyncLookupRequest.class); + } + + /** + * Convert an instance of SyncLookupRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + From f1db07732fa733d565ca6f5e82094114b362357f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:33:26 -0500 Subject: [PATCH 07/13] generator version --- .openapi-generator/VERSION | 2 +- README.md | 2 +- build.gradle | 2 +- build.sbt | 2 +- docs/CreateLookupResponse.md | 15 - docs/LookupRequest.md | 14 - docs/LookupStatus.md | 17 - docs/LookupStatusEnum.md | 17 - docs/MultiChannelChannelListObject.md | 16 - docs/MultiChannelChannelListObjectContent.md | 21 - ...nnelMessageResponseDataChannelListInner.md | 17 - docs/TnLookupRequestError.md | 13 - openapitools.json | 2 +- .../java/com/bandwidth/sdk/ApiException.java | 2 +- .../java/com/bandwidth/sdk/Configuration.java | 2 +- src/main/java/com/bandwidth/sdk/Pair.java | 2 +- .../bandwidth/sdk/ServerConfiguration.java | 2 +- .../com/bandwidth/sdk/ServerVariable.java | 2 +- .../java/com/bandwidth/sdk/StringUtil.java | 2 +- .../com/bandwidth/sdk/auth/ApiKeyAuth.java | 2 +- .../bandwidth/sdk/auth/Authentication.java | 2 +- .../bandwidth/sdk/auth/HttpBearerAuth.java | 2 +- .../java/com/bandwidth/sdk/auth/OAuth.java | 2 +- .../com/bandwidth/sdk/auth/OAuthFlow.java | 2 +- .../sdk/model/AbstractOpenApiSchema.java | 2 +- .../sdk/model/AccountStatistics.java | 2 +- .../sdk/model/AdditionalDenialReason.java | 2 +- .../java/com/bandwidth/sdk/model/Address.java | 2 +- .../bandwidth/sdk/model/AnswerCallback.java | 2 +- .../sdk/model/AsyncLookupRequest.java | 2 +- .../bandwidth/sdk/model/BlockedWebhook.java | 2 +- .../sdk/model/BridgeCompleteCallback.java | 2 +- .../model/BridgeTargetCompleteCallback.java | 2 +- .../sdk/model/CallRecordingMetadata.java | 2 +- .../com/bandwidth/sdk/model/CallState.java | 2 +- .../sdk/model/CallTranscription.java | 2 +- .../sdk/model/CallTranscriptionMetadata.java | 2 +- .../sdk/model/CallTranscriptionResponse.java | 2 +- .../com/bandwidth/sdk/model/Callback.java | 2 +- .../com/bandwidth/sdk/model/CodeRequest.java | 2 +- .../com/bandwidth/sdk/model/Conference.java | 2 +- .../model/ConferenceCompletedCallback.java | 2 +- .../sdk/model/ConferenceCreatedCallback.java | 2 +- .../bandwidth/sdk/model/ConferenceMember.java | 2 +- .../model/ConferenceMemberExitCallback.java | 2 +- .../model/ConferenceMemberJoinCallback.java | 2 +- .../ConferenceRecordingAvailableCallback.java | 2 +- .../model/ConferenceRecordingMetadata.java | 2 +- .../sdk/model/ConferenceRedirectCallback.java | 2 +- .../java/com/bandwidth/sdk/model/Contact.java | 2 +- .../model/CreateAsyncBulkLookupResponse.java | 2 +- .../CreateAsyncBulkLookupResponseData.java | 2 +- .../com/bandwidth/sdk/model/CreateCall.java | 2 +- .../sdk/model/CreateCallResponse.java | 2 +- .../sdk/model/CreateLookupResponse.java | 319 ------------- .../sdk/model/CreateMessageRequestError.java | 2 +- .../CreateMultiChannelMessageResponse.java | 2 +- .../sdk/model/CreateSyncLookupResponse.java | 2 +- .../model/CreateSyncLookupResponseData.java | 2 +- .../sdk/model/DisconnectCallback.java | 2 +- .../com/bandwidth/sdk/model/Diversion.java | 2 +- .../bandwidth/sdk/model/DiversionReason.java | 45 -- .../sdk/model/DiversionTreatment.java | 37 -- .../com/bandwidth/sdk/model/DtmfCallback.java | 2 +- .../java/com/bandwidth/sdk/model/Error.java | 2 +- .../com/bandwidth/sdk/model/ErrorObject.java | 2 +- .../com/bandwidth/sdk/model/ErrorSource.java | 2 +- .../bandwidth/sdk/model/FailureWebhook.java | 2 +- .../com/bandwidth/sdk/model/FieldError.java | 2 +- .../bandwidth/sdk/model/GatherCallback.java | 2 +- .../sdk/model/GetAsyncBulkLookupResponse.java | 2 +- .../model/GetAsyncBulkLookupResponseData.java | 2 +- .../bandwidth/sdk/model/InboundCallback.java | 2 +- .../sdk/model/InboundCallbackMessage.java | 2 +- .../bandwidth/sdk/model/InitiateCallback.java | 2 +- .../java/com/bandwidth/sdk/model/Link.java | 2 +- .../com/bandwidth/sdk/model/LinkSchema.java | 2 +- .../com/bandwidth/sdk/model/LinksObject.java | 2 +- .../bandwidth/sdk/model/ListMessageItem.java | 2 +- .../sdk/model/LookupErrorResponse.java | 2 +- .../sdk/model/LookupErrorSchema.java | 2 +- .../sdk/model/LookupErrorSchemaMeta.java | 2 +- .../bandwidth/sdk/model/LookupRequest.java | 308 ------------- .../com/bandwidth/sdk/model/LookupResult.java | 2 +- .../com/bandwidth/sdk/model/LookupStatus.java | 408 ----------------- .../bandwidth/sdk/model/LookupStatusEnum.java | 84 ---- .../MachineDetectionCompleteCallback.java | 2 +- .../model/MachineDetectionConfiguration.java | 2 +- .../sdk/model/MachineDetectionResult.java | 2 +- .../java/com/bandwidth/sdk/model/Media.java | 2 +- .../java/com/bandwidth/sdk/model/Message.java | 2 +- .../bandwidth/sdk/model/MessageRequest.java | 2 +- .../com/bandwidth/sdk/model/MessagesList.java | 2 +- .../sdk/model/MessagingCodeResponse.java | 2 +- .../sdk/model/MessagingRequestError.java | 2 +- .../sdk/model/MfaForbiddenRequestError.java | 2 +- .../bandwidth/sdk/model/MfaRequestError.java | 2 +- .../model/MfaUnauthorizedRequestError.java | 2 +- .../sdk/model/MmsMessageContent.java | 2 +- .../sdk/model/MmsMessageContentFile.java | 2 +- .../sdk/model/MultiChannelAction.java | 2 +- .../MultiChannelActionCalendarEvent.java | 2 +- .../MultiChannelChannelListMMSObject.java | 2 +- ...tiChannelChannelListMMSResponseObject.java | 2 +- .../model/MultiChannelChannelListObject.java | 382 ---------------- .../MultiChannelChannelListObjectBase.java | 2 +- .../MultiChannelChannelListObjectContent.java | 420 ------------------ .../MultiChannelChannelListOwnerObject.java | 2 +- .../MultiChannelChannelListRBMObject.java | 2 +- ...annelChannelListRBMObjectAllOfContent.java | 2 +- ...tiChannelChannelListRBMResponseObject.java | 2 +- .../MultiChannelChannelListRequestObject.java | 2 +- ...MultiChannelChannelListResponseObject.java | 2 +- .../MultiChannelChannelListSMSObject.java | 2 +- ...tiChannelChannelListSMSResponseObject.java | 2 +- .../sdk/model/MultiChannelError.java | 2 +- .../sdk/model/MultiChannelMessageContent.java | 2 +- .../sdk/model/MultiChannelMessageRequest.java | 2 +- .../MultiChannelMessageResponseData.java | 2 +- ...elMessageResponseDataChannelListInner.java | 411 ----------------- .../bandwidth/sdk/model/OptInWorkflow.java | 2 +- .../com/bandwidth/sdk/model/PageInfo.java | 2 +- .../bandwidth/sdk/model/RbmActionBase.java | 2 +- .../bandwidth/sdk/model/RbmActionDial.java | 2 +- .../bandwidth/sdk/model/RbmActionOpenUrl.java | 2 +- .../sdk/model/RbmActionViewLocation.java | 2 +- .../bandwidth/sdk/model/RbmCardContent.java | 2 +- .../sdk/model/RbmCardContentMedia.java | 2 +- .../sdk/model/RbmLocationResponse.java | 2 +- .../sdk/model/RbmMessageCarouselCard.java | 2 +- .../sdk/model/RbmMessageContentFile.java | 2 +- .../sdk/model/RbmMessageContentRichCard.java | 2 +- .../sdk/model/RbmMessageContentText.java | 2 +- .../bandwidth/sdk/model/RbmMessageMedia.java | 2 +- .../sdk/model/RbmStandaloneCard.java | 2 +- .../sdk/model/RbmSuggestionResponse.java | 2 +- .../sdk/model/RecordingAvailableCallback.java | 2 +- .../sdk/model/RecordingCompleteCallback.java | 2 +- .../model/RecordingTranscriptionMetadata.java | 2 +- .../sdk/model/RecordingTranscriptions.java | 2 +- .../bandwidth/sdk/model/RedirectCallback.java | 2 +- .../sdk/model/SmsMessageContent.java | 2 +- .../bandwidth/sdk/model/StatusCallback.java | 2 +- .../sdk/model/StatusCallbackMessage.java | 2 +- .../com/bandwidth/sdk/model/StirShaken.java | 2 +- .../sdk/model/SyncLookupRequest.java | 2 +- .../bandwidth/sdk/model/TelephoneNumber.java | 2 +- .../sdk/model/TfvBasicAuthentication.java | 2 +- .../com/bandwidth/sdk/model/TfvError.java | 2 +- .../com/bandwidth/sdk/model/TfvStatus.java | 2 +- .../sdk/model/TfvSubmissionInfo.java | 2 +- .../sdk/model/TfvSubmissionWrapper.java | 2 +- .../sdk/model/TnLookupRequestError.java | 288 ------------ .../sdk/model/TranscribeRecording.java | 2 +- .../bandwidth/sdk/model/Transcription.java | 2 +- .../model/TranscriptionAvailableCallback.java | 2 +- .../sdk/model/TransferAnswerCallback.java | 2 +- .../sdk/model/TransferCompleteCallback.java | 2 +- .../sdk/model/TransferDisconnectCallback.java | 2 +- .../com/bandwidth/sdk/model/UpdateCall.java | 2 +- .../sdk/model/UpdateCallRecording.java | 2 +- .../bandwidth/sdk/model/UpdateConference.java | 2 +- .../sdk/model/UpdateConferenceMember.java | 2 +- .../sdk/model/VerificationDenialWebhook.java | 2 +- .../sdk/model/VerificationRequest.java | 2 +- .../sdk/model/VerificationUpdateRequest.java | 2 +- .../sdk/model/VerificationWebhook.java | 2 +- .../sdk/model/VerifyCodeRequest.java | 2 +- .../sdk/model/VerifyCodeResponse.java | 2 +- .../bandwidth/sdk/model/VoiceApiError.java | 2 +- .../sdk/model/VoiceCodeResponse.java | 2 +- .../sdk/model/WebhookSubscription.java | 2 +- ...ebhookSubscriptionBasicAuthentication.java | 2 +- .../WebhookSubscriptionRequestSchema.java | 2 +- .../model/WebhookSubscriptionsListBody.java | 2 +- 175 files changed, 157 insertions(+), 2989 deletions(-) delete mode 100644 docs/CreateLookupResponse.md delete mode 100644 docs/LookupRequest.md delete mode 100644 docs/LookupStatus.md delete mode 100644 docs/LookupStatusEnum.md delete mode 100644 docs/MultiChannelChannelListObject.md delete mode 100644 docs/MultiChannelChannelListObjectContent.md delete mode 100644 docs/MultiChannelMessageResponseDataChannelListInner.md delete mode 100644 docs/TnLookupRequestError.md delete mode 100644 src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/DiversionReason.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/LookupRequest.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/LookupStatus.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java delete mode 100644 src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 971ecb25..6328c542 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.16.0 +7.17.0 diff --git a/README.md b/README.md index 65133813..910b1e0e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Generator version: 7.16.0 + - Generator version: 7.17.0 Bandwidth's Communication APIs diff --git a/build.gradle b/build.gradle index 040aeb9b..04887020 100644 --- a/build.gradle +++ b/build.gradle @@ -112,7 +112,7 @@ dependencies { 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.7' + implementation 'org.openapitools:jackson-databind-nullable:0.2.8' 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.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" diff --git a/build.sbt b/build.sbt index 0f7c5bb9..b4c6bbb8 100644 --- a/build.sbt +++ b/build.sbt @@ -15,7 +15,7 @@ lazy val root = (project in file(".")). "com.google.code.gson" % "gson" % "2.9.1", "org.apache.commons" % "commons-lang3" % "3.18.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", - "org.openapitools" % "jackson-databind-nullable" % "0.2.7", + "org.openapitools" % "jackson-databind-nullable" % "0.2.8", "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", diff --git a/docs/CreateLookupResponse.md b/docs/CreateLookupResponse.md deleted file mode 100644 index 98465c52..00000000 --- a/docs/CreateLookupResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# CreateLookupResponse - -The request has been accepted for processing but not yet finished and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**requestId** | **String** | The phone number lookup request ID from Bandwidth. | [optional] | -|**status** | **LookupStatusEnum** | | [optional] | - - - diff --git a/docs/LookupRequest.md b/docs/LookupRequest.md deleted file mode 100644 index 30637433..00000000 --- a/docs/LookupRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# LookupRequest - -Create phone number lookup request. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**tns** | **List<String>** | | | - - - diff --git a/docs/LookupStatus.md b/docs/LookupStatus.md deleted file mode 100644 index bfb3e8be..00000000 --- a/docs/LookupStatus.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LookupStatus - -If requestId exists, the result for that request is returned. See the Examples for details on the various responses that you can receive. Generally, if you see a Response Code of 0 in a result for a TN, information will be available for it. Any other Response Code will indicate no information was available for the TN. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**requestId** | **String** | The requestId. | [optional] | -|**status** | **LookupStatusEnum** | | [optional] | -|**result** | [**List<LookupResult>**](LookupResult.md) | The carrier information results for the specified telephone number. | [optional] | -|**failedTelephoneNumbers** | **List<String>** | The telephone numbers whose lookup failed. | [optional] | - - - diff --git a/docs/LookupStatusEnum.md b/docs/LookupStatusEnum.md deleted file mode 100644 index e93f9d3f..00000000 --- a/docs/LookupStatusEnum.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# LookupStatusEnum - -## Enum - - -* `IN_PROGRESS` (value: `"IN_PROGRESS"`) - -* `COMPLETE` (value: `"COMPLETE"`) - -* `PARTIAL_COMPLETE` (value: `"PARTIAL_COMPLETE"`) - -* `FAILED` (value: `"FAILED"`) - - - diff --git a/docs/MultiChannelChannelListObject.md b/docs/MultiChannelChannelListObject.md deleted file mode 100644 index 57d6da61..00000000 --- a/docs/MultiChannelChannelListObject.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# MultiChannelChannelListObject - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | -|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | -|**channel** | **MultiChannelMessageChannelEnum** | | | -|**content** | [**MultiChannelChannelListObjectContent**](MultiChannelChannelListObjectContent.md) | | | - - - diff --git a/docs/MultiChannelChannelListObjectContent.md b/docs/MultiChannelChannelListObjectContent.md deleted file mode 100644 index 58b1c5f5..00000000 --- a/docs/MultiChannelChannelListObjectContent.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# MultiChannelChannelListObjectContent - -The content of the message. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**text** | **String** | The contents of the text message. Must be 2048 characters or less. | | -|**suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] | -|**media** | [**List<MmsMessageContentFile>**](MmsMessageContentFile.md) | | | -|**orientation** | **StandaloneCardOrientationEnum** | | | -|**thumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | | -|**cardContent** | [**RbmCardContent**](RbmCardContent.md) | | | -|**cardWidth** | **CardWidthEnum** | | | -|**cardContents** | [**List<RbmCardContent>**](RbmCardContent.md) | | | - - - diff --git a/docs/MultiChannelMessageResponseDataChannelListInner.md b/docs/MultiChannelMessageResponseDataChannelListInner.md deleted file mode 100644 index d26414a8..00000000 --- a/docs/MultiChannelMessageResponseDataChannelListInner.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# MultiChannelMessageResponseDataChannelListInner - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | | -|**applicationId** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | | -|**channel** | **MultiChannelMessageChannelEnum** | | | -|**content** | [**MultiChannelChannelListObjectContent**](MultiChannelChannelListObjectContent.md) | | | -|**owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | | - - - diff --git a/docs/TnLookupRequestError.md b/docs/TnLookupRequestError.md deleted file mode 100644 index d41f290c..00000000 --- a/docs/TnLookupRequestError.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TnLookupRequestError - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | A description of what validation error occurred. | [optional] | - - - diff --git a/openapitools.json b/openapitools.json index 8244df42..f052220d 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.16.0" + "version": "7.17.0" } } diff --git a/src/main/java/com/bandwidth/sdk/ApiException.java b/src/main/java/com/bandwidth/sdk/ApiException.java index 224b7e95..c3e60582 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -22,7 +22,7 @@ *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/src/main/java/com/bandwidth/sdk/Configuration.java b/src/main/java/com/bandwidth/sdk/Configuration.java index 9f6ba07e..3070c62d 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Configuration { public static final String VERSION = "1.0.0"; diff --git a/src/main/java/com/bandwidth/sdk/Pair.java b/src/main/java/com/bandwidth/sdk/Pair.java index 50857528..c2dfaf95 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,7 +13,7 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Pair { private final String name; private final String value; diff --git a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java index 34225b69..f8a16f7e 100644 --- a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java @@ -18,7 +18,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/bandwidth/sdk/ServerVariable.java b/src/main/java/com/bandwidth/sdk/ServerVariable.java index 300fe0f3..37ac39a2 100644 --- a/src/main/java/com/bandwidth/sdk/ServerVariable.java +++ b/src/main/java/com/bandwidth/sdk/ServerVariable.java @@ -18,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/bandwidth/sdk/StringUtil.java b/src/main/java/com/bandwidth/sdk/StringUtil.java index 599cf3a2..81afa101 100644 --- a/src/main/java/com/bandwidth/sdk/StringUtil.java +++ b/src/main/java/com/bandwidth/sdk/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java index 0f8830d9..e13ff52b 100644 --- a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/bandwidth/sdk/auth/Authentication.java b/src/main/java/com/bandwidth/sdk/auth/Authentication.java index e460549a..79dcf08e 100644 --- a/src/main/java/com/bandwidth/sdk/auth/Authentication.java +++ b/src/main/java/com/bandwidth/sdk/auth/Authentication.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public interface Authentication { /** * Apply authentication settings to header and query params. diff --git a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java index 640c0300..35683058 100644 --- a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuth.java b/src/main/java/com/bandwidth/sdk/auth/OAuth.java index 22437158..4b75be15 100644 --- a/src/main/java/com/bandwidth/sdk/auth/OAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/OAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class OAuth implements Authentication { private String accessToken; diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java index 4b67db9c..56a889ba 100644 --- a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java @@ -16,7 +16,7 @@ /** * OAuth flows that are supported by this client */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public enum OAuthFlow { ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 IMPLICIT, diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 346508f7..7b2c12e8 100644 --- a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java index 92a28b9a..f461dd2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -50,7 +50,7 @@ /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) diff --git a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java index 74102c08..c70f7d5f 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -50,7 +50,7 @@ /** * AdditionalDenialReason */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AdditionalDenialReason { public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) diff --git a/src/main/java/com/bandwidth/sdk/model/Address.java b/src/main/java/com/bandwidth/sdk/model/Address.java index 57f6bc85..02b4ccb3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -51,7 +51,7 @@ /** * Address */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Address { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index 1dacfcd8..15b47454 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -55,7 +55,7 @@ /** * The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java index 0f67835f..4dd2df37 100644 --- a/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java @@ -52,7 +52,7 @@ /** * AsyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class AsyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java index 47d56176..12721ccd 100644 --- a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -52,7 +52,7 @@ /** * BlockedWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BlockedWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index 99c5c41a..c8e2bad1 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -54,7 +54,7 @@ /** * If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index 3ac50f75..cfb25513 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -54,7 +54,7 @@ /** * If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java index 017f4a5e..ba0a140f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -56,7 +56,7 @@ /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/CallState.java b/src/main/java/com/bandwidth/sdk/model/CallState.java index a91573c7..1b3e97f9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -55,7 +55,7 @@ /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java index 873a1ed5..8f01d9d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -52,7 +52,7 @@ /** * CallTranscription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscription { public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java index af1a05ed..b6d70045 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -50,7 +50,7 @@ /** * CallTranscriptionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscriptionMetadata { public static final String SERIALIZED_NAME_TRANSCRIPTION_ID = "transcriptionId"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTION_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java index 64ebb417..6e69a1a9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -53,7 +53,7 @@ /** * CallTranscriptionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CallTranscriptionResponse { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/Callback.java b/src/main/java/com/bandwidth/sdk/model/Callback.java index 1c64f0ef..09a4a4c7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -64,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Callback extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Callback.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java index f8f2dd12..3899a638 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -50,7 +50,7 @@ /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 5104de55..190ebb1c 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -57,7 +57,7 @@ /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index d4bab911..64f72b42 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -52,7 +52,7 @@ /** * The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index cd5998df..3635dbca 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -52,7 +52,7 @@ /** * The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java index 72447880..a2cdc12c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -54,7 +54,7 @@ /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 89d7020e..6478cf56 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -52,7 +52,7 @@ /** * The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index 85daf7e1..e60d7ad3 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -52,7 +52,7 @@ /** * The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index 1558a280..6397e9d2 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -54,7 +54,7 @@ /** * The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java index 4e619ebe..4242a033 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -54,7 +54,7 @@ /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index 4b2dd282..af69f833 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -52,7 +52,7 @@ /** * The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/Contact.java b/src/main/java/com/bandwidth/sdk/model/Contact.java index 9d2c69ee..ca36f85d 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -50,7 +50,7 @@ /** * Contact */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Contact { public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java index 1deefc51..8d64c970 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java @@ -55,7 +55,7 @@ /** * CreateAsyncBulkLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java index 93dc2834..93688021 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java @@ -52,7 +52,7 @@ /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index f7d33b2e..02905aa3 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -54,7 +54,7 @@ /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java index 50c9ae4b..21a9e61e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -54,7 +54,7 @@ /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java deleted file mode 100644 index 66b40cc8..00000000 --- a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.bandwidth.sdk.model.LookupStatusEnum; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * The request has been accepted for processing but not yet finished and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class CreateLookupResponse { - public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; - @SerializedName(SERIALIZED_NAME_REQUEST_ID) - @javax.annotation.Nullable - private String requestId; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private LookupStatusEnum status; - - public CreateLookupResponse() { - } - - public CreateLookupResponse requestId(@javax.annotation.Nullable String requestId) { - this.requestId = requestId; - return this; - } - - /** - * The phone number lookup request ID from Bandwidth. - * @return requestId - */ - @javax.annotation.Nullable - public String getRequestId() { - return requestId; - } - - public void setRequestId(@javax.annotation.Nullable String requestId) { - this.requestId = requestId; - } - - - public CreateLookupResponse status(@javax.annotation.Nullable LookupStatusEnum status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public LookupStatusEnum getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable LookupStatusEnum status) { - this.status = status; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the CreateLookupResponse instance itself - */ - public CreateLookupResponse putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - CreateLookupResponse createLookupResponse = (CreateLookupResponse) o; - return Objects.equals(this.requestId, createLookupResponse.requestId) && - Objects.equals(this.status, createLookupResponse.status)&& - Objects.equals(this.additionalProperties, createLookupResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(requestId, status, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class CreateLookupResponse {\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("requestId", "status")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to CreateLookupResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!CreateLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.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())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - LookupStatusEnum.validateJsonElement(jsonObj.get("status")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateLookupResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateLookupResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateLookupResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateLookupResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public CreateLookupResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - CreateLookupResponse instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of CreateLookupResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of CreateLookupResponse - * @throws IOException if the JSON string is invalid with respect to CreateLookupResponse - */ - public static CreateLookupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLookupResponse.class); - } - - /** - * Convert an instance of CreateLookupResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index 5aad8099..527c5ab6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -53,7 +53,7 @@ /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java index 0b748ce7..6af56d35 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -55,7 +55,7 @@ /** * CreateMultiChannelMessageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateMultiChannelMessageResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java index 12b3b8a9..4a1a907f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java @@ -55,7 +55,7 @@ /** * CreateSyncLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateSyncLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java index 13b95904..f74138fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponseData.java @@ -55,7 +55,7 @@ /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class CreateSyncLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index 38e2369a..fe8e1c31 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -54,7 +54,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/Diversion.java b/src/main/java/com/bandwidth/sdk/model/Diversion.java index f5a5edd6..b2fd3820 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -50,7 +50,7 @@ /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) diff --git a/src/main/java/com/bandwidth/sdk/model/DiversionReason.java b/src/main/java/com/bandwidth/sdk/model/DiversionReason.java deleted file mode 100644 index 49b7c9a8..00000000 --- a/src/main/java/com/bandwidth/sdk/model/DiversionReason.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.bandwidth.sdk.model; - -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.toMap; - -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Arrays; -import java.util.Map; -import lombok.Getter; - -@Getter -public enum DiversionReason { - away("away"), - deflection("deflection"), - do_not_disturb("do-not-disturb"), - follow_me("follow-me"), - no_answer("no-answer"), - out_of_service("out-of-service"), - time_of_day("time-of-day"), - unavailable("unavailable"), - unconditional("unconditional"), - unknown("unknown"), - user_busy("user-busy"), - ; - - private static final Map DESERIALIZATION_MAP = - Arrays.stream(values()) - .collect(toMap(v -> v.name, identity())); - - private final String name; - - DiversionReason(String name) { - this.name = name; - } - - @JsonCreator - public static DiversionReason resolve(String name) { - return DESERIALIZATION_MAP.get(name.toLowerCase()); - } - - @Override - public String toString() { - return name; - } -} diff --git a/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java b/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java deleted file mode 100644 index ffe39616..00000000 --- a/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.bandwidth.sdk.model; - -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.toMap; - -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Arrays; -import java.util.Map; -import lombok.Getter; - -@Getter -public enum DiversionTreatment { - none("none"), - propagate("propagate"), - stack("stack"), - ; - - private static final Map DESERIALIZATION_MAP = - Arrays.stream(values()) - .collect(toMap(v -> v.name, identity())); - - private final String name; - - DiversionTreatment(String name) { - this.name = name; - } - - @JsonCreator - public static DiversionTreatment resolve(String name) { - return DESERIALIZATION_MAP.get(name.toLowerCase()); - } - - @Override - public String toString() { - return name; - } -} diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index 8a4fa198..ecdde816 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -54,7 +54,7 @@ /** * The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/Error.java b/src/main/java/com/bandwidth/sdk/model/Error.java index f9f8a628..3df93d39 100644 --- a/src/main/java/com/bandwidth/sdk/model/Error.java +++ b/src/main/java/com/bandwidth/sdk/model/Error.java @@ -53,7 +53,7 @@ /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Error { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java index 493dcec1..8fbecde9 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -51,7 +51,7 @@ /** * ErrorObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ErrorObject { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java index 10609ea1..18e6b6b5 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -50,7 +50,7 @@ /** * Specifies relevant sources of the error, if any. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) diff --git a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java index f95dcef9..d0655b93 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -53,7 +53,7 @@ /** * FailureWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class FailureWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/FieldError.java b/src/main/java/com/bandwidth/sdk/model/FieldError.java index 5cdcf256..1f2eb746 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -50,7 +50,7 @@ /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index 898a300e..2b7b5008 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -54,7 +54,7 @@ /** * The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java index 11c675ab..4f1d2691 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java @@ -55,7 +55,7 @@ /** * GetAsyncBulkLookupResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GetAsyncBulkLookupResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java index 1502e537..f07b7466 100644 --- a/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java @@ -55,7 +55,7 @@ /** * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class GetAsyncBulkLookupResponseData { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java index 34b0e594..bf27d076 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java @@ -53,7 +53,7 @@ /** * Represents an inbound callback. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InboundCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java index 191bc55e..d9960f20 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -62,7 +62,7 @@ /** * InboundCallbackMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InboundCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index d0aad03e..871ac648 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -55,7 +55,7 @@ /** * The Initiate event is fired when an inbound call is received for a Telephone Number on your Account. It is sent to the URL specified in the application associated with the location (sip-peer) that the called telephone number belongs to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/Link.java b/src/main/java/com/bandwidth/sdk/model/Link.java index cf960cc7..24e990f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -50,7 +50,7 @@ /** * Link */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Link { public static final String SERIALIZED_NAME_REL = "rel"; @SerializedName(SERIALIZED_NAME_REL) diff --git a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java index 352fe94c..b61dae80 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinkSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java @@ -50,7 +50,7 @@ /** * LinkSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LinkSchema { public static final String SERIALIZED_NAME_HREF = "href"; @SerializedName(SERIALIZED_NAME_HREF) diff --git a/src/main/java/com/bandwidth/sdk/model/LinksObject.java b/src/main/java/com/bandwidth/sdk/model/LinksObject.java index f02e2d00..4c1afbb1 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -50,7 +50,7 @@ /** * LinksObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LinksObject { public static final String SERIALIZED_NAME_FIRST = "first"; @SerializedName(SERIALIZED_NAME_FIRST) diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index 2f41733d..c96dc940 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -55,7 +55,7 @@ /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java index 96c2c413..316e6eb9 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java @@ -54,7 +54,7 @@ /** * LookupErrorResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java index 26598e9d..ee0b3609 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchema.java @@ -51,7 +51,7 @@ /** * LookupErrorSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorSchema { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java index c7d38394..5c0c79e2 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupErrorSchemaMeta.java @@ -52,7 +52,7 @@ /** * LookupErrorSchemaMeta */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupErrorSchemaMeta { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java deleted file mode 100644 index 04743120..00000000 --- a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * Create phone number lookup request. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class LookupRequest { - public static final String SERIALIZED_NAME_TNS = "tns"; - @SerializedName(SERIALIZED_NAME_TNS) - @javax.annotation.Nonnull - private List tns = new ArrayList<>(); - - public LookupRequest() { - } - - public LookupRequest tns(@javax.annotation.Nonnull List tns) { - this.tns = tns; - return this; - } - - public LookupRequest addTnsItem(String tnsItem) { - if (this.tns == null) { - this.tns = new ArrayList<>(); - } - this.tns.add(tnsItem); - return this; - } - - /** - * Get tns - * @return tns - */ - @javax.annotation.Nonnull - public List getTns() { - return tns; - } - - public void setTns(@javax.annotation.Nonnull List tns) { - this.tns = tns; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LookupRequest instance itself - */ - public LookupRequest putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LookupRequest lookupRequest = (LookupRequest) o; - return Objects.equals(this.tns, lookupRequest.tns)&& - Objects.equals(this.additionalProperties, lookupRequest.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(tns, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LookupRequest {\n"); - sb.append(" tns: ").append(toIndentedString(tns)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("tns")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("tns")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LookupRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : LookupRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the required json array is present - if (jsonObj.get("tns") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("tns").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tns` to be an array in the JSON string but got `%s`", jsonObj.get("tns").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LookupRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LookupRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LookupRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LookupRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LookupRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LookupRequest instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LookupRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of LookupRequest - * @throws IOException if the JSON string is invalid with respect to LookupRequest - */ - public static LookupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LookupRequest.class); - } - - /** - * Convert an instance of LookupRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index 8b810d1e..eaec460e 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -54,7 +54,7 @@ /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class LookupResult { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java deleted file mode 100644 index be76c311..00000000 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.bandwidth.sdk.model.LookupResult; -import com.bandwidth.sdk.model.LookupStatusEnum; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * If requestId exists, the result for that request is returned. See the Examples for details on the various responses that you can receive. Generally, if you see a Response Code of 0 in a result for a TN, information will be available for it. Any other Response Code will indicate no information was available for the TN. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class LookupStatus { - public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; - @SerializedName(SERIALIZED_NAME_REQUEST_ID) - @javax.annotation.Nullable - private String requestId; - - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - @javax.annotation.Nullable - private LookupStatusEnum status; - - public static final String SERIALIZED_NAME_RESULT = "result"; - @SerializedName(SERIALIZED_NAME_RESULT) - @javax.annotation.Nullable - private List result = new ArrayList<>(); - - public static final String SERIALIZED_NAME_FAILED_TELEPHONE_NUMBERS = "failedTelephoneNumbers"; - @SerializedName(SERIALIZED_NAME_FAILED_TELEPHONE_NUMBERS) - @javax.annotation.Nullable - private List failedTelephoneNumbers = new ArrayList<>(); - - public LookupStatus() { - } - - public LookupStatus requestId(@javax.annotation.Nullable String requestId) { - this.requestId = requestId; - return this; - } - - /** - * The requestId. - * @return requestId - */ - @javax.annotation.Nullable - public String getRequestId() { - return requestId; - } - - public void setRequestId(@javax.annotation.Nullable String requestId) { - this.requestId = requestId; - } - - - public LookupStatus status(@javax.annotation.Nullable LookupStatusEnum status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - */ - @javax.annotation.Nullable - public LookupStatusEnum getStatus() { - return status; - } - - public void setStatus(@javax.annotation.Nullable LookupStatusEnum status) { - this.status = status; - } - - - public LookupStatus result(@javax.annotation.Nullable List result) { - this.result = result; - return this; - } - - public LookupStatus addResultItem(LookupResult resultItem) { - if (this.result == null) { - this.result = new ArrayList<>(); - } - this.result.add(resultItem); - return this; - } - - /** - * The carrier information results for the specified telephone number. - * @return result - */ - @javax.annotation.Nullable - public List getResult() { - return result; - } - - public void setResult(@javax.annotation.Nullable List result) { - this.result = result; - } - - - public LookupStatus failedTelephoneNumbers(@javax.annotation.Nullable List failedTelephoneNumbers) { - this.failedTelephoneNumbers = failedTelephoneNumbers; - return this; - } - - public LookupStatus addFailedTelephoneNumbersItem(String failedTelephoneNumbersItem) { - if (this.failedTelephoneNumbers == null) { - this.failedTelephoneNumbers = new ArrayList<>(); - } - this.failedTelephoneNumbers.add(failedTelephoneNumbersItem); - return this; - } - - /** - * The telephone numbers whose lookup failed. - * @return failedTelephoneNumbers - */ - @javax.annotation.Nullable - public List getFailedTelephoneNumbers() { - return failedTelephoneNumbers; - } - - public void setFailedTelephoneNumbers(@javax.annotation.Nullable List failedTelephoneNumbers) { - this.failedTelephoneNumbers = failedTelephoneNumbers; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the LookupStatus instance itself - */ - public LookupStatus putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - LookupStatus lookupStatus = (LookupStatus) o; - return Objects.equals(this.requestId, lookupStatus.requestId) && - Objects.equals(this.status, lookupStatus.status) && - Objects.equals(this.result, lookupStatus.result) && - Objects.equals(this.failedTelephoneNumbers, lookupStatus.failedTelephoneNumbers)&& - Objects.equals(this.additionalProperties, lookupStatus.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(requestId, status, result, failedTelephoneNumbers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class LookupStatus {\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" result: ").append(toIndentedString(result)).append("\n"); - sb.append(" failedTelephoneNumbers: ").append(toIndentedString(failedTelephoneNumbers)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("requestId", "status", "result", "failedTelephoneNumbers")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to LookupStatus - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!LookupStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.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())); - } - // validate the optional field `status` - if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { - LookupStatusEnum.validateJsonElement(jsonObj.get("status")); - } - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); - if (jsonArrayresult != null) { - // ensure the json data is an array - if (!jsonObj.get("result").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `result` to be an array in the JSON string but got `%s`", jsonObj.get("result").toString())); - } - - // validate the optional field `result` (array) - for (int i = 0; i < jsonArrayresult.size(); i++) { - LookupResult.validateJsonElement(jsonArrayresult.get(i)); - }; - } - } - // ensure the optional json data is an array if present - if (jsonObj.get("failedTelephoneNumbers") != null && !jsonObj.get("failedTelephoneNumbers").isJsonNull() && !jsonObj.get("failedTelephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!LookupStatus.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'LookupStatus' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(LookupStatus.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, LookupStatus value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public LookupStatus read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - LookupStatus instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of LookupStatus given an JSON string - * - * @param jsonString JSON string - * @return An instance of LookupStatus - * @throws IOException if the JSON string is invalid with respect to LookupStatus - */ - public static LookupStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LookupStatus.class); - } - - /** - * Convert an instance of LookupStatus to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java deleted file mode 100644 index 45023ebe..00000000 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.annotations.SerializedName; - -import java.io.IOException; -import java.util.Locale; -import com.google.gson.TypeAdapter; -import com.google.gson.JsonElement; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; - -/** - * The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or FAILED). - */ -@JsonAdapter(LookupStatusEnum.Adapter.class) -public enum LookupStatusEnum { - - IN_PROGRESS("IN_PROGRESS"), - - COMPLETE("COMPLETE"), - - PARTIAL_COMPLETE("PARTIAL_COMPLETE"), - - FAILED("FAILED"); - - private String value; - - LookupStatusEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static LookupStatusEnum fromValue(String value) { - for (LookupStatusEnum b : LookupStatusEnum.values()) { - if (b.value.equalsIgnoreCase(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final LookupStatusEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public LookupStatusEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return LookupStatusEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - LookupStatusEnum.fromValue(value); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index 1247b2ba..39d43a74 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -55,7 +55,7 @@ /** * This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java index 4fb21ee5..0b46bbae 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -54,7 +54,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java index f866dc1f..f0407ec7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -50,7 +50,7 @@ /** * (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/bandwidth/sdk/model/Media.java b/src/main/java/com/bandwidth/sdk/model/Media.java index b64179c0..87f0e55e 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -50,7 +50,7 @@ /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) diff --git a/src/main/java/com/bandwidth/sdk/model/Message.java b/src/main/java/com/bandwidth/sdk/model/Message.java index 3f01bd98..39b23fb3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -55,7 +55,7 @@ /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java index 24678ff3..420bda03 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -57,7 +57,7 @@ /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/MessagesList.java b/src/main/java/com/bandwidth/sdk/model/MessagesList.java index d12b50ac..0e0dbe0d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -54,7 +54,7 @@ /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java index 7c88c9df..ef47dcf0 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -50,7 +50,7 @@ /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java index 5e2b53d4..d5e0362c 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -50,7 +50,7 @@ /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java index 7713b8c3..e76438ad 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -50,7 +50,7 @@ /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java index e39bff95..4bf63ee4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -50,7 +50,7 @@ /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) diff --git a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java index 791bd4f6..a57a9a25 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -50,7 +50,7 @@ /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java index 39b0c9d4..8653ed04 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -53,7 +53,7 @@ /** * MmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java index 6212d610..8c423a31 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java @@ -51,7 +51,7 @@ /** * MmsMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MmsMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java index 45b96eae..e1f46257 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -67,7 +67,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelAction extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelAction.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index 9c7f4f1d..c2e9f2bc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -52,7 +52,7 @@ /** * MultiChannelActionCalendarEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelActionCalendarEvent { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java index 1c78d97e..dfa6dd64 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListMMSObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListMMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java index aba8d715..87eb5cb6 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListMMSResponseObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListMMSResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListMMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java deleted file mode 100644 index 0a102766..00000000 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; -import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * MultiChannelChannelListObject - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class MultiChannelChannelListObject { - public static final String SERIALIZED_NAME_FROM = "from"; - @SerializedName(SERIALIZED_NAME_FROM) - @javax.annotation.Nonnull - private String from; - - public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; - @SerializedName(SERIALIZED_NAME_APPLICATION_ID) - @javax.annotation.Nonnull - private String applicationId; - - public static final String SERIALIZED_NAME_CHANNEL = "channel"; - @SerializedName(SERIALIZED_NAME_CHANNEL) - @javax.annotation.Nonnull - private MultiChannelMessageChannelEnum channel; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nonnull - private MultiChannelChannelListObjectContent content; - - public MultiChannelChannelListObject() { - } - - public MultiChannelChannelListObject from(@javax.annotation.Nonnull String from) { - this.from = from; - return this; - } - - /** - * The sender ID of the message. This could be an alphanumeric sender ID. - * @return from - */ - @javax.annotation.Nonnull - public String getFrom() { - return from; - } - - public void setFrom(@javax.annotation.Nonnull String from) { - this.from = from; - } - - - public MultiChannelChannelListObject applicationId(@javax.annotation.Nonnull String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - * @return applicationId - */ - @javax.annotation.Nonnull - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(@javax.annotation.Nonnull String applicationId) { - this.applicationId = applicationId; - } - - - public MultiChannelChannelListObject channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { - this.channel = channel; - return this; - } - - /** - * Get channel - * @return channel - */ - @javax.annotation.Nonnull - public MultiChannelMessageChannelEnum getChannel() { - return channel; - } - - public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { - this.channel = channel; - } - - - public MultiChannelChannelListObject content(@javax.annotation.Nonnull MultiChannelChannelListObjectContent content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - */ - @javax.annotation.Nonnull - public MultiChannelChannelListObjectContent getContent() { - return content; - } - - public void setContent(@javax.annotation.Nonnull MultiChannelChannelListObjectContent content) { - this.content = content; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MultiChannelChannelListObject instance itself - */ - public MultiChannelChannelListObject putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiChannelChannelListObject multiChannelChannelListObject = (MultiChannelChannelListObject) o; - return Objects.equals(this.from, multiChannelChannelListObject.from) && - Objects.equals(this.applicationId, multiChannelChannelListObject.applicationId) && - Objects.equals(this.channel, multiChannelChannelListObject.channel) && - Objects.equals(this.content, multiChannelChannelListObject.content)&& - Objects.equals(this.additionalProperties, multiChannelChannelListObject.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(from, applicationId, channel, content, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiChannelChannelListObject {\n"); - sb.append(" from: ").append(toIndentedString(from)).append("\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListObject - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiChannelChannelListObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListObject is not found in the empty JSON string", MultiChannelChannelListObject.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MultiChannelChannelListObject.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); - } - if (!jsonObj.get("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())); - } - // validate the required field `channel` - MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); - // validate the required field `content` - MultiChannelChannelListObjectContent.validateJsonElement(jsonObj.get("content")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiChannelChannelListObject.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiChannelChannelListObject' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelChannelListObject.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiChannelChannelListObject value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MultiChannelChannelListObject read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MultiChannelChannelListObject instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MultiChannelChannelListObject given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiChannelChannelListObject - * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListObject - */ - public static MultiChannelChannelListObject fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiChannelChannelListObject.class); - } - - /** - * Convert an instance of MultiChannelChannelListObject to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java index 8ba8d2ae..a8f9ffa1 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectBase.java @@ -51,7 +51,7 @@ /** * MultiChannelChannelListObjectBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListObjectBase { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java deleted file mode 100644 index 4e46192a..00000000 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.bandwidth.sdk.model.CardWidthEnum; -import com.bandwidth.sdk.model.MmsMessageContent; -import com.bandwidth.sdk.model.MmsMessageContentFile; -import com.bandwidth.sdk.model.MultiChannelAction; -import com.bandwidth.sdk.model.RbmCardContent; -import com.bandwidth.sdk.model.RbmMessageContentRichCard; -import com.bandwidth.sdk.model.RbmMessageContentText; -import com.bandwidth.sdk.model.RbmMessageMedia; -import com.bandwidth.sdk.model.SmsMessageContent; -import com.bandwidth.sdk.model.StandaloneCardOrientationEnum; -import com.bandwidth.sdk.model.ThumbnailAlignmentEnum; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - - - -import java.io.IOException; -import java.lang.reflect.Type; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -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; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.JsonPrimitive; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonSerializationContext; -import com.google.gson.JsonSerializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonArray; -import com.google.gson.JsonParseException; - -import com.bandwidth.sdk.JSON; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class MultiChannelChannelListObjectContent extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(MultiChannelChannelListObjectContent.class.getName()); - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiChannelChannelListObjectContent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiChannelChannelListObjectContent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter adapterRbmMessageContentText = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageContentText.class)); - final TypeAdapter adapterRbmMessageMedia = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageMedia.class)); - final TypeAdapter adapterRbmMessageContentRichCard = gson.getDelegateAdapter(this, TypeToken.get(RbmMessageContentRichCard.class)); - final TypeAdapter adapterSmsMessageContent = gson.getDelegateAdapter(this, TypeToken.get(SmsMessageContent.class)); - final TypeAdapter adapterMmsMessageContent = gson.getDelegateAdapter(this, TypeToken.get(MmsMessageContent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiChannelChannelListObjectContent value) throws IOException { - if (value == null || value.getActualInstance() == null) { - elementAdapter.write(out, null); - return; - } - - // check if the actual instance is of the type `RbmMessageContentText` - if (value.getActualInstance() instanceof RbmMessageContentText) { - JsonElement element = adapterRbmMessageContentText.toJsonTree((RbmMessageContentText)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `RbmMessageMedia` - if (value.getActualInstance() instanceof RbmMessageMedia) { - JsonElement element = adapterRbmMessageMedia.toJsonTree((RbmMessageMedia)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `RbmMessageContentRichCard` - if (value.getActualInstance() instanceof RbmMessageContentRichCard) { - JsonElement element = adapterRbmMessageContentRichCard.toJsonTree((RbmMessageContentRichCard)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `SmsMessageContent` - if (value.getActualInstance() instanceof SmsMessageContent) { - JsonElement element = adapterSmsMessageContent.toJsonTree((SmsMessageContent)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - // check if the actual instance is of the type `MmsMessageContent` - if (value.getActualInstance() instanceof MmsMessageContent) { - JsonElement element = adapterMmsMessageContent.toJsonTree((MmsMessageContent)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent"); - } - - @Override - public MultiChannelChannelListObjectContent read(JsonReader in) throws IOException { - Object deserialized = null; - JsonElement jsonElement = elementAdapter.read(in); - - int match = 0; - ArrayList errorMessages = new ArrayList<>(); - TypeAdapter actualAdapter = elementAdapter; - - // deserialize RbmMessageContentText - try { - // validate the JSON object to see if any exception is thrown - RbmMessageContentText.validateJsonElement(jsonElement); - actualAdapter = adapterRbmMessageContentText; - match++; - 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())); - log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentText'", e); - } - // deserialize RbmMessageMedia - try { - // validate the JSON object to see if any exception is thrown - RbmMessageMedia.validateJsonElement(jsonElement); - actualAdapter = adapterRbmMessageMedia; - match++; - 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())); - log.log(Level.FINER, "Input data does not match schema 'RbmMessageMedia'", e); - } - // deserialize RbmMessageContentRichCard - try { - // validate the JSON object to see if any exception is thrown - RbmMessageContentRichCard.validateJsonElement(jsonElement); - actualAdapter = adapterRbmMessageContentRichCard; - match++; - 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())); - log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentRichCard'", e); - } - // deserialize SmsMessageContent - try { - // validate the JSON object to see if any exception is thrown - SmsMessageContent.validateJsonElement(jsonElement); - actualAdapter = adapterSmsMessageContent; - match++; - log.log(Level.FINER, "Input data matches schema 'SmsMessageContent'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'SmsMessageContent'", e); - } - // deserialize MmsMessageContent - try { - // validate the JSON object to see if any exception is thrown - MmsMessageContent.validateJsonElement(jsonElement); - actualAdapter = adapterMmsMessageContent; - match++; - log.log(Level.FINER, "Input data matches schema 'MmsMessageContent'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'MmsMessageContent'", e); - } - - if (match == 1) { - MultiChannelChannelListObjectContent ret = new MultiChannelChannelListObjectContent(); - ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); - return ret; - } - - throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListObjectContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); - } - }.nullSafe(); - } - } - - // store a list of schema names defined in oneOf - public static final Map> schemas = new HashMap>(); - - public MultiChannelChannelListObjectContent() { - super("oneOf", Boolean.FALSE); - } - - public MultiChannelChannelListObjectContent(Object o) { - super("oneOf", Boolean.FALSE); - setActualInstance(o); - } - - static { - schemas.put("RbmMessageContentText", RbmMessageContentText.class); - schemas.put("RbmMessageMedia", RbmMessageMedia.class); - schemas.put("RbmMessageContentRichCard", RbmMessageContentRichCard.class); - schemas.put("SmsMessageContent", SmsMessageContent.class); - schemas.put("MmsMessageContent", MmsMessageContent.class); - } - - @Override - public Map> getSchemas() { - return MultiChannelChannelListObjectContent.schemas; - } - - /** - * Set the instance that matches the oneOf child schema, check - * the instance parameter is valid against the oneOf child schemas: - * MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent - * - * It could be an instance of the 'oneOf' schemas. - */ - @Override - public void setActualInstance(Object instance) { - if (instance instanceof RbmMessageContentText) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof RbmMessageMedia) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof RbmMessageContentRichCard) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof SmsMessageContent) { - super.setActualInstance(instance); - return; - } - - if (instance instanceof MmsMessageContent) { - super.setActualInstance(instance); - return; - } - - throw new RuntimeException("Invalid instance type. Must be MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent"); - } - - /** - * Get the actual instance, which can be the following: - * MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent - * - * @return The actual instance (MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent) - */ - @SuppressWarnings("unchecked") - @Override - public Object getActualInstance() { - return super.getActualInstance(); - } - - /** - * Get the actual instance of `RbmMessageContentText`. If the actual instance is not `RbmMessageContentText`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `RbmMessageContentText` - * @throws ClassCastException if the instance is not `RbmMessageContentText` - */ - public RbmMessageContentText getRbmMessageContentText() throws ClassCastException { - return (RbmMessageContentText)super.getActualInstance(); - } - - /** - * Get the actual instance of `RbmMessageMedia`. If the actual instance is not `RbmMessageMedia`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `RbmMessageMedia` - * @throws ClassCastException if the instance is not `RbmMessageMedia` - */ - public RbmMessageMedia getRbmMessageMedia() throws ClassCastException { - return (RbmMessageMedia)super.getActualInstance(); - } - - /** - * Get the actual instance of `RbmMessageContentRichCard`. If the actual instance is not `RbmMessageContentRichCard`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `RbmMessageContentRichCard` - * @throws ClassCastException if the instance is not `RbmMessageContentRichCard` - */ - public RbmMessageContentRichCard getRbmMessageContentRichCard() throws ClassCastException { - return (RbmMessageContentRichCard)super.getActualInstance(); - } - - /** - * Get the actual instance of `SmsMessageContent`. If the actual instance is not `SmsMessageContent`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `SmsMessageContent` - * @throws ClassCastException if the instance is not `SmsMessageContent` - */ - public SmsMessageContent getSmsMessageContent() throws ClassCastException { - return (SmsMessageContent)super.getActualInstance(); - } - - /** - * Get the actual instance of `MmsMessageContent`. If the actual instance is not `MmsMessageContent`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `MmsMessageContent` - * @throws ClassCastException if the instance is not `MmsMessageContent` - */ - public MmsMessageContent getMmsMessageContent() throws ClassCastException { - return (MmsMessageContent)super.getActualInstance(); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MultiChannelChannelListObjectContent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - // validate oneOf schemas one by one - int validCount = 0; - ArrayList errorMessages = new ArrayList<>(); - // validate the json string with RbmMessageContentText - try { - RbmMessageContentText.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with RbmMessageMedia - try { - RbmMessageMedia.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with RbmMessageContentRichCard - try { - RbmMessageContentRichCard.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with SmsMessageContent - try { - SmsMessageContent.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); - // continue to the next one - } - // validate the json string with MmsMessageContent - try { - MmsMessageContent.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent 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 MultiChannelChannelListObjectContent with oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); - } - } - - /** - * Create an instance of MultiChannelChannelListObjectContent given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiChannelChannelListObjectContent - * @throws IOException if the JSON string is invalid with respect to MultiChannelChannelListObjectContent - */ - public static MultiChannelChannelListObjectContent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiChannelChannelListObjectContent.class); - } - - /** - * Convert an instance of MultiChannelChannelListObjectContent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java index 925ffdb2..6c2deaae 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListOwnerObject.java @@ -50,7 +50,7 @@ /** * MultiChannelChannelListOwnerObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListOwnerObject { public static final String SERIALIZED_NAME_OWNER = "owner"; @SerializedName(SERIALIZED_NAME_OWNER) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java index 221b74c5..5fe3c1bc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListRBMObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRBMObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java index a8ff884d..a5880f45 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMObjectAllOfContent.java @@ -70,7 +70,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRBMObjectAllOfContent extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListRBMObjectAllOfContent.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java index a7a4d525..0037ea40 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRBMResponseObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListRBMResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRBMResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java index cc4b8c75..d25bfe4e 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListRequestObject.java @@ -64,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListRequestObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListRequestObject.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java index 963b7e0d..39282a9f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListResponseObject.java @@ -64,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListResponseObject extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListResponseObject.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java index 95dbfa70..e844b776 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListSMSObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListSMSObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java index 3b8c9b73..4e481200 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListSMSResponseObject.java @@ -52,7 +52,7 @@ /** * MultiChannelChannelListSMSResponseObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelChannelListSMSResponseObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java index 0a060505..90790f2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -55,7 +55,7 @@ /** * MultiChannelError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelError { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java index b70a8e17..69ac05d7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -51,7 +51,7 @@ /** * The structure of the content field of a multichannel message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java index 326e2a59..4931bafc 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -55,7 +55,7 @@ /** * Multi-Channel Message Request */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java index 7edd45ca..09fc2dcd 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -58,7 +58,7 @@ /** * The data returned in a multichannel message response. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java deleted file mode 100644 index be91c494..00000000 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; -import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * MultiChannelMessageResponseDataChannelListInner - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class MultiChannelMessageResponseDataChannelListInner { - public static final String SERIALIZED_NAME_FROM = "from"; - @SerializedName(SERIALIZED_NAME_FROM) - @javax.annotation.Nonnull - private String from; - - public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; - @SerializedName(SERIALIZED_NAME_APPLICATION_ID) - @javax.annotation.Nonnull - private String applicationId; - - public static final String SERIALIZED_NAME_CHANNEL = "channel"; - @SerializedName(SERIALIZED_NAME_CHANNEL) - @javax.annotation.Nonnull - private MultiChannelMessageChannelEnum channel; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nonnull - private MultiChannelChannelListObjectContent content; - - public static final String SERIALIZED_NAME_OWNER = "owner"; - @SerializedName(SERIALIZED_NAME_OWNER) - @javax.annotation.Nonnull - private String owner; - - public MultiChannelMessageResponseDataChannelListInner() { - } - - public MultiChannelMessageResponseDataChannelListInner from(@javax.annotation.Nonnull String from) { - this.from = from; - return this; - } - - /** - * The sender ID of the message. This could be an alphanumeric sender ID. - * @return from - */ - @javax.annotation.Nonnull - public String getFrom() { - return from; - } - - public void setFrom(@javax.annotation.Nonnull String from) { - this.from = from; - } - - - public MultiChannelMessageResponseDataChannelListInner applicationId(@javax.annotation.Nonnull String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - * @return applicationId - */ - @javax.annotation.Nonnull - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(@javax.annotation.Nonnull String applicationId) { - this.applicationId = applicationId; - } - - - public MultiChannelMessageResponseDataChannelListInner channel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { - this.channel = channel; - return this; - } - - /** - * Get channel - * @return channel - */ - @javax.annotation.Nonnull - public MultiChannelMessageChannelEnum getChannel() { - return channel; - } - - public void setChannel(@javax.annotation.Nonnull MultiChannelMessageChannelEnum channel) { - this.channel = channel; - } - - - public MultiChannelMessageResponseDataChannelListInner content(@javax.annotation.Nonnull MultiChannelChannelListObjectContent content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - */ - @javax.annotation.Nonnull - public MultiChannelChannelListObjectContent getContent() { - return content; - } - - public void setContent(@javax.annotation.Nonnull MultiChannelChannelListObjectContent content) { - this.content = content; - } - - - public MultiChannelMessageResponseDataChannelListInner owner(@javax.annotation.Nonnull String owner) { - this.owner = owner; - return this; - } - - /** - * The Bandwidth senderId associated with the message. Identical to 'from'. - * @return owner - */ - @javax.annotation.Nonnull - public String getOwner() { - return owner; - } - - public void setOwner(@javax.annotation.Nonnull String owner) { - this.owner = owner; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the MultiChannelMessageResponseDataChannelListInner instance itself - */ - public MultiChannelMessageResponseDataChannelListInner putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiChannelMessageResponseDataChannelListInner multiChannelMessageResponseDataChannelListInner = (MultiChannelMessageResponseDataChannelListInner) o; - return Objects.equals(this.from, multiChannelMessageResponseDataChannelListInner.from) && - Objects.equals(this.applicationId, multiChannelMessageResponseDataChannelListInner.applicationId) && - Objects.equals(this.channel, multiChannelMessageResponseDataChannelListInner.channel) && - Objects.equals(this.content, multiChannelMessageResponseDataChannelListInner.content) && - Objects.equals(this.owner, multiChannelMessageResponseDataChannelListInner.owner)&& - Objects.equals(this.additionalProperties, multiChannelMessageResponseDataChannelListInner.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(from, applicationId, channel, content, owner, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiChannelMessageResponseDataChannelListInner {\n"); - sb.append(" from: ").append(toIndentedString(from)).append("\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" channel: ").append(toIndentedString(channel)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MultiChannelMessageResponseDataChannelListInner - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseDataChannelListInner is not found in the empty JSON string", MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); - } - if (!jsonObj.get("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())); - } - // validate the required field `channel` - MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); - // validate the required field `content` - MultiChannelChannelListObjectContent.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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiChannelMessageResponseDataChannelListInner.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiChannelMessageResponseDataChannelListInner' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MultiChannelMessageResponseDataChannelListInner.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MultiChannelMessageResponseDataChannelListInner value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public MultiChannelMessageResponseDataChannelListInner read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - MultiChannelMessageResponseDataChannelListInner instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MultiChannelMessageResponseDataChannelListInner given an JSON string - * - * @param jsonString JSON string - * @return An instance of MultiChannelMessageResponseDataChannelListInner - * @throws IOException if the JSON string is invalid with respect to MultiChannelMessageResponseDataChannelListInner - */ - public static MultiChannelMessageResponseDataChannelListInner fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiChannelMessageResponseDataChannelListInner.class); - } - - /** - * Convert an instance of MultiChannelMessageResponseDataChannelListInner to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java index 6e8edecf..8a343504 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -53,7 +53,7 @@ /** * OptInWorkflow */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class OptInWorkflow { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) diff --git a/src/main/java/com/bandwidth/sdk/model/PageInfo.java b/src/main/java/com/bandwidth/sdk/model/PageInfo.java index 917c52b2..c88c9ac2 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -50,7 +50,7 @@ /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java index 336b2c3d..6087bfe8 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -51,7 +51,7 @@ /** * RbmActionBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java index 1c7fc6d4..f6fc8359 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -51,7 +51,7 @@ /** * RbmActionDial */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionDial { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java index c9c40106..9ea82f8e 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -52,7 +52,7 @@ /** * RbmActionOpenUrl */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionOpenUrl { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java index cd9e0848..df95ca61 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -51,7 +51,7 @@ /** * RbmActionViewLocation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmActionViewLocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java index e0a323d6..4f2aa932 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -54,7 +54,7 @@ /** * RbmCardContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmCardContent { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java index 0375db16..7abc00ec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -52,7 +52,7 @@ /** * RbmCardContentMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmCardContentMedia { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java index 9793c8ec..4c76ec90 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -50,7 +50,7 @@ /** * RbmLocationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmLocationResponse { public static final String SERIALIZED_NAME_LATITUDE = "latitude"; @SerializedName(SERIALIZED_NAME_LATITUDE) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java index 5e52364d..e541d558 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -55,7 +55,7 @@ /** * RbmMessageCarouselCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageCarouselCard { public static final String SERIALIZED_NAME_CARD_WIDTH = "cardWidth"; @SerializedName(SERIALIZED_NAME_CARD_WIDTH) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java index 67b187f0..6b9a0c17 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -51,7 +51,7 @@ /** * RbmMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java index 76e21375..5c4cb506 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -68,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java index 347d6bbe..e0de2980 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -53,7 +53,7 @@ /** * RbmMessageContentText */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentText { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java index 388d8c68..a2ca3bb6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java @@ -54,7 +54,7 @@ /** * RbmMessageMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageMedia { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index 38efdecc..bad48f96 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -56,7 +56,7 @@ /** * RbmStandaloneCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmStandaloneCard { public static final String SERIALIZED_NAME_ORIENTATION = "orientation"; @SerializedName(SERIALIZED_NAME_ORIENTATION) diff --git a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java index 34055d7f..578d5fdb 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java @@ -50,7 +50,7 @@ /** * RbmSuggestionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmSuggestionResponse { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 1f781802..74a2cc39 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -55,7 +55,7 @@ /** * The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index bc9fa396..fa92e165 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -55,7 +55,7 @@ /** * The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java index b1b953d6..f9c3e9ab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -52,7 +52,7 @@ /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingTranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java index e93ffe6d..4b0f97e6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java @@ -53,7 +53,7 @@ /** * RecordingTranscriptions */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RecordingTranscriptions { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index e885d20f..a2a27d29 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -54,7 +54,7 @@ /** * The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java index af4edad2..e1229270 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -50,7 +50,7 @@ /** * SmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java index 6428264a..f0ac27a2 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java @@ -53,7 +53,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StatusCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java index 0392dd88..5da629a2 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java @@ -59,7 +59,7 @@ /** * Message payload schema within a callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StatusCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/StirShaken.java b/src/main/java/com/bandwidth/sdk/model/StirShaken.java index 169499fb..b145fb69 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -50,7 +50,7 @@ /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) diff --git a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java index cc9e700a..4131409d 100644 --- a/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java @@ -52,7 +52,7 @@ /** * SyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class SyncLookupRequest { public static final String SERIALIZED_NAME_PHONE_NUMBERS = "phoneNumbers"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBERS) diff --git a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java index babf10cc..84a96805 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -50,7 +50,7 @@ /** * TelephoneNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TelephoneNumber { public static final String SERIALIZED_NAME_TELEPHONE_NUMBER = "telephoneNumber"; @SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBER) diff --git a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java index 00bcc1f7..dcb4ae4d 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -50,7 +50,7 @@ /** * TfvBasicAuthentication */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) diff --git a/src/main/java/com/bandwidth/sdk/model/TfvError.java b/src/main/java/com/bandwidth/sdk/model/TfvError.java index 9b043c39..d49eec2e 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -50,7 +50,7 @@ /** * A generic error object. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java index 653e5a72..665a9e45 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java @@ -54,7 +54,7 @@ /** * TfvStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvStatus { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index 704c01e6..159189f8 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -56,7 +56,7 @@ /** * TfvSubmissionInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvSubmissionInfo { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java index 932b5034..816fe394 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -51,7 +51,7 @@ /** * TfvSubmissionWrapper */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TfvSubmissionWrapper { public static final String SERIALIZED_NAME_SUBMISSION = "submission"; @SerializedName(SERIALIZED_NAME_SUBMISSION) diff --git a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java deleted file mode 100644 index b2232448..00000000 --- a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Bandwidth - * Bandwidth's Communication APIs - * - * The version of the OpenAPI document: 1.0.0 - * Contact: letstalk@bandwidth.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.bandwidth.sdk.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.bandwidth.sdk.JSON; - -/** - * TnLookupRequestError - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class TnLookupRequestError { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public TnLookupRequestError() { - } - - public TnLookupRequestError message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * A description of what validation error occurred. - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the TnLookupRequestError instance itself - */ - public TnLookupRequestError putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TnLookupRequestError tnLookupRequestError = (TnLookupRequestError) o; - return Objects.equals(this.message, tnLookupRequestError.message)&& - Objects.equals(this.additionalProperties, tnLookupRequestError.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(message, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TnLookupRequestError {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to TnLookupRequestError - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!TnLookupRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TnLookupRequestError.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TnLookupRequestError' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TnLookupRequestError.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TnLookupRequestError value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public TnLookupRequestError read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - TnLookupRequestError instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of TnLookupRequestError given an JSON string - * - * @param jsonString JSON string - * @return An instance of TnLookupRequestError - * @throws IOException if the JSON string is invalid with respect to TnLookupRequestError - */ - public static TnLookupRequestError fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TnLookupRequestError.class); - } - - /** - * Convert an instance of TnLookupRequestError to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index 41652246..9ded93a1 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -53,7 +53,7 @@ /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) diff --git a/src/main/java/com/bandwidth/sdk/model/Transcription.java b/src/main/java/com/bandwidth/sdk/model/Transcription.java index 9c30992d..d254c619 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -50,7 +50,7 @@ /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index 700d8f81..89963376 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -56,7 +56,7 @@ /** * The Transcription Available event is sent when the recording transcription is available to be downloaded. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index d8a9a4ca..bcfdb773 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -54,7 +54,7 @@ /** * When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index a4f7d6b0..fbb2d928 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -54,7 +54,7 @@ /** * This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index 6e3e50a9..27969041 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -54,7 +54,7 @@ /** * This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java index 361171b6..f83fa2eb 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -54,7 +54,7 @@ /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java index d2978269..38eca647 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -51,7 +51,7 @@ /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java index f110ffb0..3db39d55 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -54,7 +54,7 @@ /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java index 5f365392..ae882baa 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -53,7 +53,7 @@ /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java index 176529b8..d342774b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java @@ -54,7 +54,7 @@ /** * VerificationDenialWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationDenialWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index 93bfdb0c..1f78f0c2 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -58,7 +58,7 @@ /** * VerificationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index d2acc02f..01fc2b18 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -56,7 +56,7 @@ /** * VerificationUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationUpdateRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java index 39ca6932..d71a8175 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java @@ -52,7 +52,7 @@ /** * VerificationWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerificationWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java index 86df714b..3113987a 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -51,7 +51,7 @@ /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java index fd9f6dca..bd1fa5fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -50,7 +50,7 @@ /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java index 68a02d54..0aff5385 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -51,7 +51,7 @@ /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java index cc3d2b0b..d7ea2d7c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -50,7 +50,7 @@ /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java index 654946f3..c93ac622 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -53,7 +53,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java index 2a5923c0..2c9df8e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -50,7 +50,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java index 7176fa91..4de11d02 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -52,7 +52,7 @@ /** * WebhookSubscriptionRequestSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionRequestSchema { public static final String SERIALIZED_NAME_BASIC_AUTHENTICATION = "basicAuthentication"; @SerializedName(SERIALIZED_NAME_BASIC_AUTHENTICATION) diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java index d1205b0c..b19ed25f 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java @@ -55,7 +55,7 @@ /** * 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.16.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class WebhookSubscriptionsListBody { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) From 09f56113bba71c4e9029e684de7ea2c573f2b4b6 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:38:11 -0500 Subject: [PATCH 08/13] clean files --- docs/PhoneNumberLookupApi.md | 6 ++- .../java/com/bandwidth/sdk/ApiClient.java | 51 ------------------- .../sdk/api/PhoneNumberLookupApi.java | 2 +- 3 files changed, 6 insertions(+), 53 deletions(-) diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index 16fbf8e2..38c0c987 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -146,7 +146,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -187,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 | diff --git a/src/main/java/com/bandwidth/sdk/ApiClient.java b/src/main/java/com/bandwidth/sdk/ApiClient.java index 486d685c..f40a69a2 100644 --- a/src/main/java/com/bandwidth/sdk/ApiClient.java +++ b/src/main/java/com/bandwidth/sdk/ApiClient.java @@ -66,7 +66,6 @@ */ public class ApiClient { - protected String basePath = "http://localhost"; protected String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( @@ -81,36 +80,21 @@ public class ApiClient { protected Map defaultHeaderMap = new HashMap(); protected Map defaultCookieMap = new HashMap(); protected String tempFolderPath = null; - protected boolean debugging = false; - protected Map defaultHeaderMap = new HashMap(); - protected Map defaultCookieMap = new HashMap(); - protected String tempFolderPath = null; - protected Map authentications; protected Map authentications; - protected DateFormat dateFormat; - protected DateFormat datetimeFormat; - protected boolean lenientDatetimeFormat; - protected int dateLength; protected DateFormat dateFormat; protected DateFormat datetimeFormat; protected boolean lenientDatetimeFormat; protected int dateLength; - protected InputStream sslCaCert; - protected boolean verifyingSsl; - protected KeyManager[] keyManagers; protected InputStream sslCaCert; protected boolean verifyingSsl; protected KeyManager[] keyManagers; - protected OkHttpClient httpClient; - protected JSON json; protected OkHttpClient httpClient; protected JSON json; - protected HttpLoggingInterceptor loggingInterceptor; protected HttpLoggingInterceptor loggingInterceptor; /** @@ -215,7 +199,6 @@ protected void initHttpClient() { initHttpClient(Collections.emptyList()); } - protected void initHttpClient(List interceptors) { protected void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); @@ -226,7 +209,6 @@ protected void initHttpClient(List interceptors) { httpClient = builder.build(); } - protected void init() { protected void init() { verifyingSsl = true; @@ -252,8 +234,6 @@ public String getBasePath() { * * @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 ApiClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; @@ -302,7 +282,6 @@ public OkHttpClient getHttpClient() { * * @param newHttpClient An instance of OkHttpClient * @return ApiClient - * @return ApiClient * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { @@ -810,7 +789,6 @@ 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(); @@ -919,7 +897,6 @@ public String collectionPathParameterToString(String collectionFormat, Collectio */ public String sanitizeFilename(String filename) { return filename.replaceFirst("^.*[/\\\\]", ""); - return filename.replaceFirst("^.*[/\\\\]", ""); } /** @@ -1029,8 +1006,6 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - ResponseBody respBody = response.body(); - if (respBody == null) { ResponseBody respBody = response.body(); if (respBody == null) { return null; @@ -1041,18 +1016,6 @@ 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( try { if (isJsonMime(contentType)) { return JSON.deserialize(respBody.byteStream(), returnType); @@ -1070,10 +1033,6 @@ public T deserialize(Response response, Type returnType) throws ApiException response.headers().toMultimap(), response.body().string()); } - } catch (IOException e) { - throw new ApiException(e); - response.body().string()); - } } catch (IOException e) { throw new ApiException(e); } @@ -1404,8 +1363,6 @@ public String buildUrl(String baseUrl, String path, List queryParams, List throw new ArrayIndexOutOfBoundsException(String.format( Locale.ROOT, "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - Locale.ROOT, - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); @@ -1478,12 +1435,10 @@ 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(Locale.ROOT, "%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(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } } } @@ -1576,7 +1531,6 @@ 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) { protected 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)); @@ -1590,7 +1544,6 @@ 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) { protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { @@ -1613,7 +1566,6 @@ 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() { protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override @@ -1635,7 +1587,6 @@ 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() { protected void applySslSettings() { try { TrustManager[] trustManagers; @@ -1698,7 +1649,6 @@ public boolean verify(String hostname, SSLSession session) { } } - protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); @@ -1716,7 +1666,6 @@ 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 { protected String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { diff --git a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java index 765975bf..163ec2dc 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -276,7 +276,7 @@ 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); } From 2c29e2c5eb991c8a8ad40f6aeea92ed94b50c92f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:38:32 -0500 Subject: [PATCH 09/13] no java 25 --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index e89d2246..7e7b9e47 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] - java-version: ["11", "17", "21", "25"] + java-version: ["11", "17", "21"] distribution: ["zulu", "temurin"] fail-fast: false steps: From ffa6321cb73eced312e2b28a99db87986305796d Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:39:54 -0500 Subject: [PATCH 10/13] restore files --- .../bandwidth/sdk/model/DiversionReason.java | 45 +++++++++++++++++++ .../sdk/model/DiversionTreatment.java | 37 +++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/main/java/com/bandwidth/sdk/model/DiversionReason.java create mode 100644 src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java diff --git a/src/main/java/com/bandwidth/sdk/model/DiversionReason.java b/src/main/java/com/bandwidth/sdk/model/DiversionReason.java new file mode 100644 index 00000000..49b7c9a8 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/DiversionReason.java @@ -0,0 +1,45 @@ +package com.bandwidth.sdk.model; + +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.toMap; + +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Arrays; +import java.util.Map; +import lombok.Getter; + +@Getter +public enum DiversionReason { + away("away"), + deflection("deflection"), + do_not_disturb("do-not-disturb"), + follow_me("follow-me"), + no_answer("no-answer"), + out_of_service("out-of-service"), + time_of_day("time-of-day"), + unavailable("unavailable"), + unconditional("unconditional"), + unknown("unknown"), + user_busy("user-busy"), + ; + + private static final Map DESERIALIZATION_MAP = + Arrays.stream(values()) + .collect(toMap(v -> v.name, identity())); + + private final String name; + + DiversionReason(String name) { + this.name = name; + } + + @JsonCreator + public static DiversionReason resolve(String name) { + return DESERIALIZATION_MAP.get(name.toLowerCase()); + } + + @Override + public String toString() { + return name; + } +} diff --git a/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java b/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java new file mode 100644 index 00000000..ffe39616 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/DiversionTreatment.java @@ -0,0 +1,37 @@ +package com.bandwidth.sdk.model; + +import static java.util.function.Function.identity; +import static java.util.stream.Collectors.toMap; + +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Arrays; +import java.util.Map; +import lombok.Getter; + +@Getter +public enum DiversionTreatment { + none("none"), + propagate("propagate"), + stack("stack"), + ; + + private static final Map DESERIALIZATION_MAP = + Arrays.stream(values()) + .collect(toMap(v -> v.name, identity())); + + private final String name; + + DiversionTreatment(String name) { + this.name = name; + } + + @JsonCreator + public static DiversionTreatment resolve(String name) { + return DESERIALIZATION_MAP.get(name.toLowerCase()); + } + + @Override + public String toString() { + return name; + } +} From 6963e2c1603be144ffb044f862c3e8382c1766a0 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:55:48 -0500 Subject: [PATCH 11/13] update org.json dep --- custom_templates/pom.mustache | 5 +++++ pom.xml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/custom_templates/pom.mustache b/custom_templates/pom.mustache index 1d88b213..0a5d64c5 100644 --- a/custom_templates/pom.mustache +++ b/custom_templates/pom.mustache @@ -469,6 +469,11 @@ jakarta.ws.rs-api ${jakarta.ws.rs-api-version}
+ + org.json + json + 20250517 + org.junit.jupiter diff --git a/pom.xml b/pom.xml index 98896dea..7f70c977 100644 --- a/pom.xml +++ b/pom.xml @@ -392,6 +392,11 @@ jakarta.ws.rs-api ${jakarta.ws.rs-api-version} + + org.json + json + 20250517 + org.junit.jupiter From 19459ca87478fab910eb4fe4cd35f5f3d20e7c02 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 16:57:39 -0500 Subject: [PATCH 12/13] update deps --- build.gradle | 1 + build.sbt | 1 + 2 files changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 04887020..c4704649 100644 --- a/build.gradle +++ b/build.gradle @@ -113,6 +113,7 @@ dependencies { 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.json', name: 'json', version: '20250517' 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.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" diff --git a/build.sbt b/build.sbt index b4c6bbb8..39b09600 100644 --- a/build.sbt +++ b/build.sbt @@ -16,6 +16,7 @@ lazy val root = (project in file(".")). "org.apache.commons" % "commons-lang3" % "3.18.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", "org.openapitools" % "jackson-databind-nullable" % "0.2.8", + "org.json" % "json" % "20250517", "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", From 0ec27440e36b8181a0bba731cbc69d219eb03a6d Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 25 Nov 2025 17:03:29 -0500 Subject: [PATCH 13/13] update templates and test --- custom_templates/build.gradle.mustache | 203 ++++++++++++++++++ custom_templates/build.sbt.mustache | 42 ++++ .../sdk/smoke/StatisticsApiTest.java | 3 + 3 files changed, 248 insertions(+) create mode 100644 custom_templates/build.gradle.mustache create mode 100644 custom_templates/build.sbt.mustache diff --git a/custom_templates/build.gradle.mustache b/custom_templates/build.gradle.mustache new file mode 100644 index 00000000..75a19564 --- /dev/null +++ b/custom_templates/build.gradle.mustache @@ -0,0 +1,203 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +{{#sourceFolder}} +apply plugin: 'java' +{{/sourceFolder}} +apply plugin: 'com.diffplug.spotless' + +group = '{{groupId}}' +version = '{{artifactVersion}}' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +{{#sourceFolder}} +sourceSets { + main.java.srcDirs = ['{{sourceFolder}}'] +} + +{{/sourceFolder}} +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task) + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = '{{artifactId}}' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + swagger_annotations_version = "2.2.9" + {{/swagger2AnnotationLibrary}} + jakarta_annotation_version = "1.3.5" + {{#useBeanValidation}} + bean_validation_version = "2.0.2" + {{/useBeanValidation}} +} + +dependencies { + {{#swagger1AnnotationLibrary}} + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} + {{#swagger2AnnotationLibrary}} + implementation "io.swagger.core.v3:swagger-annotations:$swagger_annotations_version" + {{/swagger2AnnotationLibrary}} + 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' + {{#openApiNullable}} + implementation 'org.openapitools:jackson-databind-nullable:0.2.8' + {{/openApiNullable}} + {{#withAWSV4Signature}} + implementation 'software.amazon.awssdk:auth:2.20.157' + {{/withAWSV4Signature}} + {{#hasOAuthMethods}} + implementation group: 'org.json', name: 'json', version: '20250517' + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + {{/hasOAuthMethods}} + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' + {{#joda}} + implementation 'joda-time:joda-time:2.9.9' + {{/joda}} + {{#dynamicOperations}} + implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.30' + {{/dynamicOperations}} + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" + {{/useBeanValidation}} + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/custom_templates/build.sbt.mustache b/custom_templates/build.sbt.mustache new file mode 100644 index 00000000..13382bcd --- /dev/null +++ b/custom_templates/build.sbt.mustache @@ -0,0 +1,42 @@ +lazy val root = (project in file(".")). + settings( + organization := "{{groupId}}", + name := "{{artifactId}}", + version := "{{artifactVersion}}", + scalaVersion := "2.11.12", + scalacOptions ++= Seq("-feature"), + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := 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", + "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", + {{#openApiNullable}} + "org.openapitools" % "jackson-databind-nullable" % "0.2.8", + {{/openApiNullable}} + {{#withAWSV4Signature}} + "software.amazon.awssdk" % "auth" % "2.20.157", + {{/withAWSV4Signature}} + {{#hasOAuthMethods}} + "org.json" % "json" % "20250517", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", + {{/hasOAuthMethods}} + {{#joda}} + "joda-time" % "joda-time" % "2.9.9" % "compile", + {{/joda}} + {{#dynamicOperations}} + "io.swagger.parser.v3" % "swagger-parser-v3" "2.0.30" % "compile" + {{/dynamicOperations}} + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java index c2cde951..e8bfee32 100644 --- a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java +++ b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java @@ -7,6 +7,8 @@ import com.bandwidth.sdk.ApiException; import com.bandwidth.sdk.Configuration; import com.bandwidth.sdk.model.AccountStatistics; + +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; @@ -17,6 +19,7 @@ /** * API tests for StatisticsApi */ +@Disabled public class StatisticsApiTest { ApiClient oauthClient = new ApiClient(BW_USERNAME, BW_PASSWORD, null); private final StatisticsApi api = new StatisticsApi(oauthClient);