diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a2bc4658..e5365562 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,10 +35,10 @@ jobs: run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Apache Maven Central - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'adopt' java-version: 21 diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 763a5cf0..7ff8da6b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -41,10 +41,10 @@ jobs: 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/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml index 0b59d685..06695c81 100644 --- a/.github/workflows/test-smoke.yml +++ b/.github/workflows/test-smoke.yml @@ -70,10 +70,10 @@ jobs: MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_UP_APPLICATION_ID }} 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: zulu java-version: 21 diff --git a/.gitignore b/.gitignore index 3ef06f40..c505dc80 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,4 @@ build .DS_Store .idea -.settings +.settings/ diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a1c64a70..9bed5aad 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 @@ -133,6 +145,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 +155,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 @@ -210,6 +222,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 @@ -228,6 +241,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 @@ -239,11 +253,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 @@ -254,18 +272,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 @@ -327,6 +351,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 @@ -336,7 +361,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/.openapi-generator/VERSION b/.openapi-generator/VERSION index 758bb9c8..6328c542 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.10.0 +7.17.0 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 718da910..00000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,576 +0,0 @@ -eclipse.preferences.version=1 -enableParallelJavaIndexSearch=true -org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= -org.eclipse.jdt.core.circularClasspath=warning -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.camelCaseMatch=enabled -org.eclipse.jdt.core.codeComplete.deprecationCheck=disabled -org.eclipse.jdt.core.codeComplete.discouragedReferenceCheck=disabled -org.eclipse.jdt.core.codeComplete.fieldPrefixes= -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.forbiddenReferenceCheck=enabled -org.eclipse.jdt.core.codeComplete.forceImplicitQualification=disabled -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= -org.eclipse.jdt.core.codeComplete.subwordMatch=disabled -org.eclipse.jdt.core.codeComplete.suggestStaticImports=enabled -org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled -org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=javax.annotation.Nonnull -org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= -org.eclipse.jdt.core.compiler.annotation.nullable=javax.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullable.secondary= -org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.emulateJavacBug8031744=enabled -org.eclipse.jdt.core.compiler.generateClassFiles=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.APILeak=warning -org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement=disabled -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning -org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation=ignore -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.tasks=warning -org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore -org.eclipse.jdt.core.compiler.problem.uninternedIdentityComparison=disabled -org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning -org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled -org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation=warning -org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.processAnnotations=enabled -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 -org.eclipse.jdt.core.compiler.storeAnnotations=disabled -org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled -org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL -org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX -org.eclipse.jdt.core.computeJavaBuildOrder=ignore -org.eclipse.jdt.core.encoding=utf8 -org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false -org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=true -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false -org.eclipse.jdt.core.formatter.align_with_spaces=false -org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 -org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=16 -org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 -org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_record_components=16 -org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 -org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=20 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 -org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 -org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true -org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=false -org.eclipse.jdt.core.formatter.comment.indent_tag_description=false -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert -org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=false -org.eclipse.jdt.core.formatter.join_wrapped_lines=false -org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false -org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false -org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false -org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false -org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never -org.eclipse.jdt.core.formatter.lineSplit=120 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.text_block_indentation=0 -org.eclipse.jdt.core.formatter.use_on_off_tags=true -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true -org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true -org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true -org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true -org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true -org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true -org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true -org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true -org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error -org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter -org.eclipse.jdt.core.timeoutForParameterNameFromAttachedJavadoc=50 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 14b697b7..00000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/README.md b/README.md index 12354201..3cf94404 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.17.0 Bandwidth's Communication APIs @@ -146,8 +146,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 @@ -179,6 +180,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) @@ -197,6 +199,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) @@ -208,11 +211,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) @@ -223,18 +230,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) @@ -296,6 +309,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) @@ -305,7 +319,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 70da3894..4a984267 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: @@ -4692,104 +4692,120 @@ paths: servers: - description: Production url: https://mfa.bandwidth.com/api/v1 - /accounts/{accountId}/tnlookup: + /accounts/{accountId}/phoneNumberLookup: post: - deprecated: true - 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,29 +4813,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: - deprecated: true - 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: @@ -4827,95 +4844,53 @@ paths: content: application/json: examples: + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" lookupInProgressExample: - $ref: '#/components/examples/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' + $ref: "#/components/examples/lookupFailedExample" + 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: tfVerificationStatus: - $ref: '#/components/callbacks/tfVerificationStatus' + $ref: "#/components/callbacks/tfVerificationStatus" description: Submit a request for verification of a toll-free phone number. operationId: requestTollFreeVerification parameters: @@ -4929,7 +4904,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' + $ref: "#/components/requestBodies/requestTollFreeVerificationRequest" responses: "202": description: Accepted @@ -4944,7 +4919,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: @@ -4953,7 +4928,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: @@ -4962,7 +4937,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: @@ -4971,7 +4946,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: @@ -4980,7 +4955,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: @@ -4989,7 +4964,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: @@ -4998,7 +4973,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: @@ -5030,7 +5005,7 @@ paths: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple responses: "204": @@ -5042,7 +5017,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5051,7 +5026,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: @@ -5060,7 +5035,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: @@ -5069,7 +5044,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: @@ -5078,7 +5053,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: @@ -5087,7 +5062,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: @@ -5096,7 +5071,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: @@ -5105,7 +5080,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: @@ -5134,14 +5109,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: @@ -5150,7 +5125,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5159,7 +5134,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: @@ -5168,7 +5143,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: @@ -5177,7 +5152,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: @@ -5186,7 +5161,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: @@ -5195,7 +5170,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: @@ -5204,7 +5179,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: @@ -5213,7 +5188,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: @@ -5223,7 +5198,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). @@ -5245,10 +5220,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 @@ -5263,7 +5238,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: @@ -5272,7 +5247,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: @@ -5281,7 +5256,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: @@ -5290,7 +5265,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: @@ -5299,7 +5274,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: @@ -5308,7 +5283,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: @@ -5317,7 +5292,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: @@ -5349,7 +5324,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionsListBody' + $ref: "#/components/schemas/webhookSubscriptionsListBody" description: OK "400": content: @@ -5362,7 +5337,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: @@ -5371,7 +5346,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: @@ -5380,7 +5355,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: @@ -5389,7 +5364,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: @@ -5398,7 +5373,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: @@ -5407,7 +5382,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: @@ -5416,7 +5391,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: @@ -5440,13 +5415,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: @@ -5455,7 +5430,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5464,7 +5439,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: @@ -5473,7 +5448,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: @@ -5482,7 +5457,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: @@ -5491,7 +5466,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: @@ -5500,7 +5475,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: @@ -5509,7 +5484,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: @@ -5518,7 +5493,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: @@ -5562,7 +5537,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5571,7 +5546,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: @@ -5580,7 +5555,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: @@ -5589,7 +5564,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: @@ -5598,7 +5573,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: @@ -5607,7 +5582,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: @@ -5616,7 +5591,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: @@ -5625,7 +5600,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: @@ -5656,13 +5631,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: @@ -5671,7 +5646,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5680,7 +5655,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: @@ -5689,7 +5664,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: @@ -5698,7 +5673,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: @@ -5707,7 +5682,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: @@ -5716,7 +5691,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: @@ -5725,7 +5700,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: @@ -5734,7 +5709,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: @@ -5754,7 +5729,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/useCases' + $ref: "#/components/schemas/useCases" description: OK "400": content: @@ -5763,7 +5738,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5772,7 +5747,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: @@ -5781,7 +5756,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: @@ -5790,7 +5765,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: @@ -5799,7 +5774,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: @@ -5808,7 +5783,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: @@ -5817,7 +5792,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: @@ -5826,7 +5801,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: @@ -5846,11 +5821,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\ @@ -5874,17 +5849,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. @@ -5916,7 +5891,7 @@ components: type: string style: simple requestBody: - $ref: '#/components/requestBodies/verificationWebhookRequest' + $ref: "#/components/requestBodies/verificationWebhookRequest" responses: "204": description: No Content @@ -5927,7 +5902,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5936,7 +5911,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: @@ -5945,7 +5920,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: @@ -5954,7 +5929,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: @@ -5963,7 +5938,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: @@ -5972,7 +5947,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: @@ -5981,7 +5956,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: @@ -5990,7 +5965,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: @@ -6213,95 +6188,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. @@ -6401,7 +6485,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. @@ -6410,7 +6494,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 @@ -6431,7 +6515,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. @@ -6505,7 +6589,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. @@ -6842,14 +6926,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: @@ -6860,7 +6955,7 @@ components: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple webhookSubscriptionIdPathParam: description: Webhook subscription ID @@ -6877,13 +6972,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: @@ -7084,14 +7179,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 @@ -7121,19 +7216,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: @@ -7154,46 +7249,56 @@ 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: + createSyncLookupRequest: content: application/json: examples: singleNumberRequestExample: - $ref: '#/components/examples/singleNumberRequestExample' + $ref: "#/components/examples/singleNumberRequestExample" + multipleNumberRequestExample: + $ref: "#/components/examples/multipleNumberRequestExample" + schema: + $ref: "#/components/schemas/syncLookupRequest" + description: Synchronous phone number lookup request. + required: true + createAsyncBulkLookupRequest: + content: + application/json: + examples: multipleNumberRequestExample: - $ref: '#/components/examples/multipleNumberRequestExample' + $ref: "#/components/examples/multipleNumberRequestExample" schema: - $ref: '#/components/schemas/lookupRequest' - description: Phone number lookup request. + $ref: "#/components/schemas/asyncLookupRequest" + description: Asynchronous bulk phone number lookup request. required: true requestTollFreeVerificationRequest: content: application/json: schema: - $ref: '#/components/schemas/verificationRequest' + $ref: "#/components/schemas/verificationRequest" description: Request for verification of a toll-free phone number. required: true updateTollFreeVerificationRequestRequest: content: application/json: schema: - $ref: '#/components/schemas/tfvSubmissionWrapper' + $ref: "#/components/schemas/tfvSubmissionWrapper" description: Update a request for verification of a toll-free phone number. required: true verificationWebhookRequest: @@ -7201,17 +7306,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 @@ -7220,19 +7325,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: @@ -7247,7 +7352,7 @@ components: application/json: schema: items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" type: array description: OK headers: @@ -7261,61 +7366,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: @@ -7330,7 +7435,7 @@ components: source: field: "channelList[0].from" schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Bad Request multiChannelNotAcceptableError: description: Not Acceptable @@ -7345,7 +7450,7 @@ components: description: Authentication Failed source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unauthorized multiChannelForbiddenError: content: @@ -7358,7 +7463,7 @@ components: description: Access Denied source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Forbidden multiChannelNotFoundError: content: @@ -7371,7 +7476,7 @@ components: description: Resource not found. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Not Found multiChannelMethodNotAllowedError: content: @@ -7384,7 +7489,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: @@ -7399,7 +7504,7 @@ components: source: header: Content-Type schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unsupported Media Type multiChannelTooManyRequestsError: content: @@ -7413,7 +7518,7 @@ components: retry later. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Too Many Requests multiChannelInternalServerError: content: @@ -7426,16 +7531,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: @@ -7448,7 +7553,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" description: OK updateCallResponse: description: OK @@ -7457,14 +7562,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 @@ -7473,14 +7578,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: @@ -7497,19 +7602,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 @@ -7518,109 +7623,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: @@ -7634,187 +7739,149 @@ components: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error voiceCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/voiceCodeResponse' + $ref: "#/components/schemas/voiceCodeResponse" description: OK messagingCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/messagingCodeResponse' + $ref: "#/components/schemas/messagingCodeResponse" description: OK verifyCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/verifyCodeResponse' + $ref: "#/components/schemas/verifyCodeResponse" description: OK mfaBadRequestError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Bad Request mfaUnauthorizedError: content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" description: Unauthorized mfaForbiddenError: content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" description: Forbidden mfaTooManyRequestsError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Too Many Requests mfaInternalServerError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error - createLookupResponse: + createSyncLookupResponse: content: application/json: examples: - lookupResponseExample: - $ref: '#/components/examples/lookupInProgressExample' - schema: - $ref: '#/components/schemas/createLookupResponse' - description: Accepted - getLookupResponse: - content: - application/json: - examples: - lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + lookupCompleteWithDniExample: + $ref: "#/components/examples/lookupCompleteWithDniExample" + lookupCompleteExample: + $ref: "#/components/examples/lookupCompleteExample" + 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' + $ref: "#/components/examples/lookupFailedExample" + schema: + $ref: "#/components/schemas/createSyncLookupResponse" description: OK - tnLookupBadRequestError: + createAsyncBulkLookupResponse: content: application/json: examples: - badRequest: - summary: Example Bad Request Error - value: - message: "Some tns do not match e164 format: 1234" + lookupInProgressExample: + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: '#/components/schemas/tnLookupRequestError' - description: Bad Request - tnLookupUnauthorizedError: + $ref: "#/components/schemas/createAsyncBulkLookupResponse" + description: Accepted + getAsyncBulkLookupResponse: content: application/json: examples: - unauthorized: - summary: Example Unauthorized Error - value: - message: Unauthorized + 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" schema: - $ref: '#/components/schemas/tnLookupRequestError' - description: Unauthorized - tnLookupForbiddenError: + $ref: "#/components/schemas/getAsyncBulkLookupResponse" + description: OK + tnLookupDefaultResponse: content: application/json: examples: + badRequest: + $ref: "#/components/examples/badRequestExample" + unauthorized: + $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: - 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: + $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 + $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: 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: @@ -7823,7 +7890,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 @@ -7837,7 +7904,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: @@ -7846,7 +7913,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: @@ -7855,7 +7922,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: @@ -7864,7 +7931,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: @@ -7873,7 +7940,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: @@ -7882,7 +7949,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: @@ -7891,7 +7958,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: @@ -7900,7 +7967,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable schemas: applicationId: @@ -8045,10 +8112,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 @@ -8095,11 +8162,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. @@ -8241,7 +8308,7 @@ components: type: string fieldErrors: items: - $ref: '#/components/schemas/fieldError' + $ref: "#/components/schemas/fieldError" type: array required: - description @@ -8332,7 +8399,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: @@ -8367,7 +8434,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\ @@ -8428,7 +8495,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\ @@ -8585,14 +8652,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: @@ -8618,7 +8685,7 @@ components: links: example: [] items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" type: array data: nullable: true @@ -8626,7 +8693,7 @@ components: example: null errors: items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" type: array type: object link: @@ -8653,7 +8720,7 @@ components: description: A detailed explanation of the error. type: string source: - $ref: '#/components/schemas/errorSource' + $ref: "#/components/schemas/errorSource" required: - description - source @@ -8740,7 +8807,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: @@ -8792,11 +8859,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: @@ -8816,27 +8883,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: @@ -8862,16 +8929,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: @@ -8907,14 +8974,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: @@ -8948,7 +9015,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 @@ -8970,7 +9037,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. @@ -8982,7 +9049,7 @@ components: type: object rbmActionViewLocation: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: latitude: description: The latitude of the location. @@ -9006,7 +9073,7 @@ components: type: object multiChannelActionCalendarEvent: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: title: description: The title of the event. @@ -9036,7 +9103,7 @@ components: type: object rbmActionOpenUrl: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: url: description: The URL to open in browser. @@ -9051,25 +9118,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: @@ -9083,9 +9150,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 @@ -9104,7 +9171,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: @@ -9114,7 +9181,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\ @@ -9257,7 +9324,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: @@ -9271,7 +9338,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: @@ -9281,7 +9348,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\ @@ -9302,7 +9369,7 @@ components: text: type: string media: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" type: object rbmSuggestionResponse: properties: @@ -9339,17 +9406,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 @@ -9366,7 +9433,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. @@ -9378,7 +9445,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 @@ -9405,7 +9472,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\ @@ -9417,7 +9484,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\ @@ -9487,7 +9554,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: @@ -9520,9 +9587,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 @@ -9535,14 +9602,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 @@ -9706,7 +9773,7 @@ components: maxLength: 2048 type: string answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -9731,7 +9798,7 @@ components: nullable: true type: string answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -9753,7 +9820,7 @@ components: nullable: true type: string disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" callTimeout: default: 30 description: |- @@ -9780,7 +9847,7 @@ components: nullable: true type: number machineDetection: - $ref: '#/components/schemas/machineDetectionConfiguration' + $ref: "#/components/schemas/machineDetectionConfiguration" priority: default: 5 description: |- @@ -9887,14 +9954,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 @@ -9902,7 +9969,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 @@ -10002,7 +10069,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 @@ -10109,7 +10176,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 @@ -10123,7 +10190,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10145,7 +10212,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10177,7 +10244,7 @@ components: updateCallRecording: properties: state: - $ref: '#/components/schemas/recordingStateEnum' + $ref: "#/components/schemas/recordingStateEnum" required: - state type: object @@ -10269,7 +10336,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. @@ -10287,7 +10354,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',\ @@ -10305,7 +10372,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 @@ -10362,7 +10429,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. @@ -10374,14 +10441,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) @@ -10392,7 +10459,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10415,7 +10482,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10568,7 +10635,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',\ @@ -10598,7 +10665,7 @@ components: \ need more information." properties: mode: - $ref: '#/components/schemas/machineDetectionModeEnum' + $ref: "#/components/schemas/machineDetectionModeEnum" detectionTimeout: default: 15 description: |- @@ -10665,7 +10732,7 @@ components: nullable: true type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10689,7 +10756,7 @@ components: nullable: true type: string fallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10715,7 +10782,7 @@ components: format: uri type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10766,7 +10833,7 @@ components: properties: transcripts: items: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" type: array type: object callTranscriptionMetadataList: @@ -10775,7 +10842,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: @@ -10825,15 +10892,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. @@ -10933,7 +11000,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 @@ -10968,7 +11035,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\ @@ -11012,7 +11079,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 @@ -11106,7 +11173,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 @@ -11429,7 +11496,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. @@ -11495,7 +11562,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 @@ -11592,7 +11659,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" @@ -11682,7 +11749,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 @@ -11725,7 +11792,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,\ @@ -11785,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 @@ -11801,9 +11868,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\ @@ -11854,7 +11921,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 @@ -11889,7 +11956,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\ @@ -11932,7 +11999,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 @@ -11987,7 +12054,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. @@ -12050,7 +12117,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 @@ -12099,7 +12166,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. @@ -12171,7 +12238,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12261,7 +12328,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 @@ -12310,7 +12377,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." @@ -12318,7 +12385,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)." @@ -12374,7 +12441,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 @@ -12461,7 +12528,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 @@ -12567,7 +12634,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 @@ -12711,7 +12778,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." @@ -13039,9 +13106,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 @@ -13049,137 +13121,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: - tns: + 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: + phoneNumbers: + description: Telephone numbers in E.164 format. + items: + pattern: "^\\+[1-9]\\d{1,14}$" + type: string + maximum: 100 + minimum: 1 + type: array + required: + - phoneNumbers + type: object + 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: - - 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)." + 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 + example: "+10072904498" 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 - 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: @@ -13334,9 +13646,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 @@ -13345,7 +13657,7 @@ components: type: integer phoneNumbers: items: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" maxItems: 10 minItems: 1 type: array @@ -13370,7 +13682,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13408,9 +13720,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. @@ -13434,9 +13746,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 @@ -13464,7 +13776,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13502,9 +13814,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. @@ -13541,7 +13853,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\ @@ -13622,7 +13934,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. @@ -13683,7 +13995,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. @@ -13706,7 +14018,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. @@ -13727,7 +14039,7 @@ components: tfvSubmissionWrapper: properties: submission: - $ref: '#/components/schemas/verificationUpdateRequest' + $ref: "#/components/schemas/verificationUpdateRequest" type: object address: example: @@ -13985,14 +14297,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 @@ -14034,7 +14346,7 @@ components: type: string telephoneNumbers: items: - $ref: '#/components/schemas/telephoneNumber' + $ref: "#/components/schemas/telephoneNumber" type: array type: object telephoneNumber: @@ -14085,9 +14397,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 @@ -14188,7 +14500,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 @@ -14218,7 +14530,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. @@ -14265,9 +14577,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 @@ -14295,7 +14607,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -14333,9 +14645,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: @@ -14355,24 +14667,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 @@ -14409,6 +14721,131 @@ components: text: Hello world type: REPLY text: Hello world + 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 + 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: + 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/bandwidth.yml b/bandwidth.yml index bf2c9ab0..0c613484 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -1328,62 +1328,66 @@ paths: '500': $ref: '#/components/responses/mfaInternalServerError' servers: *ref_2 - /accounts/{accountId}/tnlookup: + /accounts/{accountId}/phoneNumberLookup: post: - deprecated: true - 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: - deprecated: true - 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: @@ -5368,112 +5372,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 - description: Create phone number lookup request. properties: - tns: + 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 + properties: + 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 + 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/completedLookupStatusEnum' + results: + type: array + description: >- + The carrier information results for the specified telephone + numbers. + items: + $ref: '#/components/schemas/lookupResult' + errors: type: array - description: The carrier information results for the specified telephone number. items: - $ref: '#/components/schemas/lookupResult' - failedTelephoneNumbers: + $ref: '#/components/schemas/lookupErrorSchema' + createAsyncBulkLookupResponse: + type: object + properties: + links: type: array - description: The telephone numbers whose lookup failed. + description: Links for pagination (if applicable) items: - type: string - example: - - '+191955512345' + $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 + 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 - description: A description of what validation error occurred. - example: example error message + 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. @@ -6720,109 +6903,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: + $ref: '#/components/examples/forbiddenExample' 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: - 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: @@ -7405,14 +7547,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 @@ -7651,95 +7802,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: - 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: 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: + 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: @@ -8039,18 +8303,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 diff --git a/build.gradle b/build.gradle index 315cc285..d39f1d72 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.8' + 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..0bf06872 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.8", "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/TnLookupRequestError.md b/docs/AsyncLookupRequest.md similarity index 51% rename from docs/TnLookupRequestError.md rename to docs/AsyncLookupRequest.md index d41f290c..ab5ad863 100644 --- a/docs/TnLookupRequestError.md +++ b/docs/AsyncLookupRequest.md @@ -1,13 +1,13 @@ -# TnLookupRequestError +# AsyncLookupRequest ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**message** | **String** | A description of what validation error occurred. | [optional] | +|**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/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/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/LookupStatusEnum.md b/docs/InProgressLookupStatusEnum.md similarity index 85% rename from docs/LookupStatusEnum.md rename to docs/InProgressLookupStatusEnum.md index e93f9d3f..62653e42 100644 --- a/docs/LookupStatusEnum.md +++ b/docs/InProgressLookupStatusEnum.md @@ -1,6 +1,6 @@ -# LookupStatusEnum +# InProgressLookupStatusEnum ## Enum 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/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/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index be6defa2..698d9856 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 @@ -37,13 +38,13 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); 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()); @@ -57,12 +58,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 @@ -77,20 +78,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 @@ -113,13 +109,13 @@ public class Example { Basic.setPassword("YOUR PASSWORD"); 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()); @@ -133,12 +129,83 @@ 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) + +### 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"); + + 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 @@ -153,10 +220,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/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/docs/LookupRequest.md b/docs/SyncLookupRequest.md similarity index 53% rename from docs/LookupRequest.md rename to docs/SyncLookupRequest.md index 30637433..80c63ca3 100644 --- a/docs/LookupRequest.md +++ b/docs/SyncLookupRequest.md @@ -1,14 +1,13 @@ -# LookupRequest +# SyncLookupRequest -Create phone number lookup request. ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**tns** | **List<String>** | | | +|**phoneNumbers** | **List<String>** | Telephone numbers in E.164 format. | | diff --git a/openapitools.json b/openapitools.json index f8d07ce1..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.10.0" + "version": "7.17.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..c3e60582 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -15,13 +15,14 @@ import java.util.Map; import java.util.List; +import java.util.Locale; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -161,7 +162,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format("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..3070c62d 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.17.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..f3bcd4e7 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")); @@ -135,6 +131,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()); @@ -155,11 +152,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()); @@ -169,15 +169,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()); @@ -226,13 +230,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()); @@ -320,6 +324,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..c2dfaf95 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.17.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..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.10.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 beaab482..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.10.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 6ef9eb8c..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.10.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/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 397e6408..c018f821 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,20 +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 - - * @deprecated */ - @Deprecated - public okhttp3.Call createLookupCall(String accountId, 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){ @@ -111,10 +107,10 @@ public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupReque 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(); @@ -143,83 +139,68 @@ public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupReque return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call createLookupValidateBeforeCall(String accountId, 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 -
- * @deprecated */ - @Deprecated - public CreateLookupResponse createLookup(String accountId, 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 -
- * @deprecated */ - @Deprecated - public ApiResponse createLookupWithHttpInfo(String accountId, 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 @@ -228,27 +209,20 @@ public ApiResponse createLookupWithHttpInfo(String account 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 - - * @deprecated */ - @Deprecated - public okhttp3.Call createLookupAsync(String accountId, 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 @@ -257,20 +231,154 @@ public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequ 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 - - * @deprecated */ - @Deprecated - public okhttp3.Call getLookupStatusCall(String accountId, 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" }; + 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){ @@ -284,7 +392,7 @@ public okhttp3.Call getLookupStatusCall(String accountId, String requestId, fina 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())); @@ -313,83 +421,68 @@ public okhttp3.Call getLookupStatusCall(String accountId, String requestId, fina return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } - @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, 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 -
- * @deprecated */ - @Deprecated - public LookupStatus getLookupStatus(String accountId, 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 -
- * @deprecated */ - @Deprecated - public ApiResponse getLookupStatusWithHttpInfo(String accountId, 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 @@ -398,20 +491,13 @@ public ApiResponse getLookupStatusWithHttpInfo(String accountId, S 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 - - * @deprecated */ - @Deprecated - public okhttp3.Call getLookupStatusAsync(String accountId, 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/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..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.10.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 243865e9..79dcf08e 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.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 565d3c51..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.10.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/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 3c487529..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.10.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 6068f9f0..f461dd2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..c70f7d5f 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AdditionalDenialReason */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..02b4ccb3 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Address */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..15b47454 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.17.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/TnLookupRequestError.java b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java similarity index 64% rename from src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java rename to src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java index b0b75872..4dd2df37 100644 --- a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/AsyncLookupRequest.java @@ -14,13 +14,16 @@ 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; @@ -42,38 +45,47 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** - * TnLookupRequestError + * AsyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") -public class TnLookupRequestError { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public TnLookupRequestError() { +@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) + @javax.annotation.Nonnull + private List phoneNumbers = new ArrayList<>(); + + public AsyncLookupRequest() { + } + + public AsyncLookupRequest phoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; + return this; } - public TnLookupRequestError message(@javax.annotation.Nullable String message) { - this.message = message; + public AsyncLookupRequest addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList<>(); + } + this.phoneNumbers.add(phoneNumbersItem); return this; } /** - * A description of what validation error occurred. - * @return message + * Telephone numbers in E.164 format. + * @return phoneNumbers */ - @javax.annotation.Nullable - public String getMessage() { - return message; + @javax.annotation.Nonnull + public List getPhoneNumbers() { + return phoneNumbers; } - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; + public void setPhoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; } /** @@ -89,9 +101,9 @@ public void setMessage(@javax.annotation.Nullable String message) { * * @param key name of the property * @param value value of the property - * @return the TnLookupRequestError instance itself + * @return the AsyncLookupRequest instance itself */ - public TnLookupRequestError putAdditionalProperty(String key, Object value) { + public AsyncLookupRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,21 +142,21 @@ public boolean equals(Object o) { 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); + AsyncLookupRequest asyncLookupRequest = (AsyncLookupRequest) o; + return Objects.equals(this.phoneNumbers, asyncLookupRequest.phoneNumbers)&& + Objects.equals(this.additionalProperties, asyncLookupRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(message, additionalProperties); + return Objects.hash(phoneNumbers, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class TnLookupRequestError {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); + 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(); @@ -167,28 +179,37 @@ 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("phoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + 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 TnLookupRequestError + * @throws IOException if the JSON Element is invalid with respect to AsyncLookupRequest */ 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())); + 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(); - 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())); + // 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())); } } @@ -196,16 +217,16 @@ 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 + 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(TnLookupRequestError.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AsyncLookupRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, TnLookupRequestError value) throws IOException { + public void write(JsonWriter out, AsyncLookupRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -233,12 +254,12 @@ else if (entry.getValue() instanceof Character) } @Override - public TnLookupRequestError read(JsonReader in) throws IOException { + 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 - TnLookupRequestError instance = thisAdapter.fromJsonTree(jsonObj); + AsyncLookupRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -249,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 @@ -265,18 +286,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of TnLookupRequestError given an JSON string + * Create an instance of AsyncLookupRequest 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 + * @return An instance of AsyncLookupRequest + * @throws IOException if the JSON string is invalid with respect to AsyncLookupRequest */ - public static TnLookupRequestError fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, TnLookupRequestError.class); + public static AsyncLookupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AsyncLookupRequest.class); } /** - * Convert an instance of TnLookupRequestError to an JSON string + * Convert an instance of AsyncLookupRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java index 805cd7d3..12721ccd 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.17.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..c8e2bad1 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.17.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..cfb25513 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.17.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..ba0a140f 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.RecordingTranscriptionMetadata; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..1b3e97f9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..8f01d9d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscriptionDetectedLanguageEnum; import com.bandwidth.sdk.model.CallTranscriptionTrackEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..b6d70045 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..6e69a1a9 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..09a4a4c7 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.17.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..3899a638 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/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/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 5522b692..190ebb1c 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.ConferenceMember; import com.google.gson.TypeAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..64f72b42 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.17.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..3635dbca 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.17.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..a2cdc12c 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..6478cf56 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.17.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..e60d7ad3 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.17.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..6397e9d2 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.17.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..4242a033 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..af69f833 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.17.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..ca36f85d 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Contact */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/CreateAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponse.java new file mode 100644 index 00000000..8d64c970 --- /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.17.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/CreateLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java similarity index 71% rename from src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java rename to src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java index 76a1af9a..93688021 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateAsyncBulkLookupResponseData.java @@ -14,7 +14,8 @@ package com.bandwidth.sdk.model; import java.util.Objects; -import com.bandwidth.sdk.model.LookupStatusEnum; +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; @@ -22,6 +23,7 @@ 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; @@ -43,28 +45,29 @@ 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). + * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") -public class CreateLookupResponse { +@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) @javax.annotation.Nullable - private String requestId; + private UUID requestId; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nullable - private LookupStatusEnum status; + private InProgressLookupStatusEnum status; - public CreateLookupResponse() { + public CreateAsyncBulkLookupResponseData() { } - public CreateLookupResponse requestId(@javax.annotation.Nullable String requestId) { + public CreateAsyncBulkLookupResponseData requestId(@javax.annotation.Nullable UUID requestId) { this.requestId = requestId; return this; } @@ -74,16 +77,16 @@ public CreateLookupResponse requestId(@javax.annotation.Nullable String requestI * @return requestId */ @javax.annotation.Nullable - public String getRequestId() { + public UUID getRequestId() { return requestId; } - public void setRequestId(@javax.annotation.Nullable String requestId) { + public void setRequestId(@javax.annotation.Nullable UUID requestId) { this.requestId = requestId; } - public CreateLookupResponse status(@javax.annotation.Nullable LookupStatusEnum status) { + public CreateAsyncBulkLookupResponseData status(@javax.annotation.Nullable InProgressLookupStatusEnum status) { this.status = status; return this; } @@ -93,11 +96,11 @@ public CreateLookupResponse status(@javax.annotation.Nullable LookupStatusEnum s * @return status */ @javax.annotation.Nullable - public LookupStatusEnum getStatus() { + public InProgressLookupStatusEnum getStatus() { return status; } - public void setStatus(@javax.annotation.Nullable LookupStatusEnum status) { + public void setStatus(@javax.annotation.Nullable InProgressLookupStatusEnum status) { this.status = status; } @@ -114,9 +117,9 @@ public void setStatus(@javax.annotation.Nullable LookupStatusEnum status) { * * @param key name of the property * @param value value of the property - * @return the CreateLookupResponse instance itself + * @return the CreateAsyncBulkLookupResponseData instance itself */ - public CreateLookupResponse putAdditionalProperty(String key, Object value) { + public CreateAsyncBulkLookupResponseData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -155,10 +158,10 @@ public boolean equals(Object o) { 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); + CreateAsyncBulkLookupResponseData createAsyncBulkLookupResponseData = (CreateAsyncBulkLookupResponseData) o; + return Objects.equals(this.requestId, createAsyncBulkLookupResponseData.requestId) && + Objects.equals(this.status, createAsyncBulkLookupResponseData.status)&& + Objects.equals(this.additionalProperties, createAsyncBulkLookupResponseData.additionalProperties); } @Override @@ -169,7 +172,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class CreateLookupResponse {\n"); + 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"); @@ -194,33 +197,31 @@ 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); } /** * 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 + * @throws IOException if the JSON Element is invalid with respect to CreateAsyncBulkLookupResponseData */ 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())); + 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("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()) { - LookupStatusEnum.validateJsonElement(jsonObj.get("status")); + InProgressLookupStatusEnum.validateJsonElement(jsonObj.get("status")); } } @@ -228,16 +229,16 @@ 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 + 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(CreateLookupResponse.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(CreateAsyncBulkLookupResponseData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, CreateLookupResponse value) throws IOException { + public void write(JsonWriter out, CreateAsyncBulkLookupResponseData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -265,12 +266,12 @@ else if (entry.getValue() instanceof Character) } @Override - public CreateLookupResponse read(JsonReader in) throws IOException { + 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 - CreateLookupResponse instance = thisAdapter.fromJsonTree(jsonObj); + CreateAsyncBulkLookupResponseData instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -281,7 +282,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object @@ -297,18 +298,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of CreateLookupResponse given an JSON string + * Create an instance of CreateAsyncBulkLookupResponseData 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 + * @return An instance of CreateAsyncBulkLookupResponseData + * @throws IOException if the JSON string is invalid with respect to CreateAsyncBulkLookupResponseData */ - public static CreateLookupResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, CreateLookupResponse.class); + public static CreateAsyncBulkLookupResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateAsyncBulkLookupResponseData.class); } /** - * Convert an instance of CreateLookupResponse to an JSON string + * Convert an instance of CreateAsyncBulkLookupResponseData to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index 4735e05a..02905aa3 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.17.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..21a9e61e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index b0dd177f..527c5ab6 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FieldError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..6af56d35 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.bandwidth.sdk.model.MultiChannelMessageResponseData; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMultiChannelMessageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/CreateSyncLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateSyncLookupResponse.java new file mode 100644 index 00000000..4a1a907f --- /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.17.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..f74138fd --- /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.17.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/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index c4756ba0..fe8e1c31 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.17.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..b2fd3820 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..ecdde816 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.17.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..3df93d39 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.17.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..8fbecde9 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ErrorObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..18e6b6b5 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Specifies relevant sources of the error, if any. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d0655b93 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.17.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..1f2eb746 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..2b7b5008 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.17.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/GetAsyncBulkLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponse.java new file mode 100644 index 00000000..4f1d2691 --- /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.17.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/LookupStatus.java b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java similarity index 58% rename from src/main/java/com/bandwidth/sdk/model/LookupStatus.java rename to src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java index c1474231..f07b7466 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/GetAsyncBulkLookupResponseData.java @@ -14,8 +14,9 @@ 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.bandwidth.sdk.model.LookupStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -25,6 +26,7 @@ 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; @@ -46,57 +48,53 @@ 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. + * The phone number lookup response data */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") -public class LookupStatus { +@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) @javax.annotation.Nullable - private String requestId; + private UUID requestId; public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nullable - private LookupStatusEnum status; + private InProgressLookupStatusEnum status; - public static final String SERIALIZED_NAME_RESULT = "result"; - @SerializedName(SERIALIZED_NAME_RESULT) + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) @javax.annotation.Nullable - private List result = new ArrayList<>(); + private List results = 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 GetAsyncBulkLookupResponseData() { } - public LookupStatus requestId(@javax.annotation.Nullable String requestId) { + public GetAsyncBulkLookupResponseData requestId(@javax.annotation.Nullable UUID requestId) { this.requestId = requestId; return this; } /** - * The requestId. + * The phone number lookup request ID from Bandwidth. * @return requestId */ @javax.annotation.Nullable - public String getRequestId() { + public UUID getRequestId() { return requestId; } - public void setRequestId(@javax.annotation.Nullable String requestId) { + public void setRequestId(@javax.annotation.Nullable UUID requestId) { this.requestId = requestId; } - public LookupStatus status(@javax.annotation.Nullable LookupStatusEnum status) { + public GetAsyncBulkLookupResponseData status(@javax.annotation.Nullable InProgressLookupStatusEnum status) { this.status = status; return this; } @@ -106,66 +104,39 @@ public LookupStatus status(@javax.annotation.Nullable LookupStatusEnum status) { * @return status */ @javax.annotation.Nullable - public LookupStatusEnum getStatus() { + public InProgressLookupStatusEnum getStatus() { return status; } - public void setStatus(@javax.annotation.Nullable LookupStatusEnum status) { + public void setStatus(@javax.annotation.Nullable InProgressLookupStatusEnum status) { this.status = status; } - public LookupStatus result(@javax.annotation.Nullable List result) { - this.result = result; + public GetAsyncBulkLookupResponseData results(@javax.annotation.Nullable List results) { + this.results = results; return this; } - public LookupStatus addResultItem(LookupResult resultItem) { - if (this.result == null) { - this.result = new ArrayList<>(); + public GetAsyncBulkLookupResponseData addResultsItem(LookupResult resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); } - this.result.add(resultItem); + this.results.add(resultsItem); 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 + * @return results */ @javax.annotation.Nullable - public List getFailedTelephoneNumbers() { - return failedTelephoneNumbers; + public List getResults() { + return results; } - public void setFailedTelephoneNumbers(@javax.annotation.Nullable List failedTelephoneNumbers) { - this.failedTelephoneNumbers = failedTelephoneNumbers; + public void setResults(@javax.annotation.Nullable List results) { + this.results = results; } /** @@ -181,9 +152,9 @@ public void setFailedTelephoneNumbers(@javax.annotation.Nullable List fa * * @param key name of the property * @param value value of the property - * @return the LookupStatus instance itself + * @return the GetAsyncBulkLookupResponseData instance itself */ - public LookupStatus putAdditionalProperty(String key, Object value) { + public GetAsyncBulkLookupResponseData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -222,27 +193,25 @@ public boolean equals(Object o) { 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); + 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, result, failedTelephoneNumbers, additionalProperties); + return Objects.hash(requestId, status, results, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LookupStatus {\n"); + sb.append("class GetAsyncBulkLookupResponseData {\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(" results: ").append(toIndentedString(results)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -265,70 +234,62 @@ 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", "results")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + 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 + * @throws IOException if the JSON Element is invalid with respect to GetAsyncBulkLookupResponseData */ 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())); + 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("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()) { - LookupStatusEnum.validateJsonElement(jsonObj.get("status")); + InProgressLookupStatusEnum.validateJsonElement(jsonObj.get("status")); } - if (jsonObj.get("result") != null && !jsonObj.get("result").isJsonNull()) { - JsonArray jsonArrayresult = jsonObj.getAsJsonArray("result"); - if (jsonArrayresult != null) { + 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("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())); + 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 `result` (array) - for (int i = 0; i < jsonArrayresult.size(); i++) { - LookupResult.validateJsonElement(jsonArrayresult.get(i)); + // validate the optional field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + LookupResult.validateJsonElement(jsonArrayresults.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("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 + 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(LookupStatus.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(GetAsyncBulkLookupResponseData.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LookupStatus value) throws IOException { + public void write(JsonWriter out, GetAsyncBulkLookupResponseData value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -356,12 +317,12 @@ else if (entry.getValue() instanceof Character) } @Override - public LookupStatus read(JsonReader in) throws IOException { + 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 - LookupStatus instance = thisAdapter.fromJsonTree(jsonObj); + GetAsyncBulkLookupResponseData instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -372,7 +333,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object @@ -388,18 +349,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of LookupStatus given an JSON string + * Create an instance of GetAsyncBulkLookupResponseData 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 + * @return An instance of GetAsyncBulkLookupResponseData + * @throws IOException if the JSON string is invalid with respect to GetAsyncBulkLookupResponseData */ - public static LookupStatus fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LookupStatus.class); + public static GetAsyncBulkLookupResponseData fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetAsyncBulkLookupResponseData.class); } /** - * Convert an instance of LookupStatus to an JSON string + * Convert an instance of GetAsyncBulkLookupResponseData to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java similarity index 64% rename from src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java rename to src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java index 02a72484..c1d98b0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InProgressLookupStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; @@ -24,10 +26,10 @@ import com.google.gson.stream.JsonWriter; /** - * The status of the request (IN_PROGRESS, COMPLETE, PARTIAL_COMPLETE, or FAILED). + * Gets or Sets inProgressLookupStatusEnum */ -@JsonAdapter(LookupStatusEnum.Adapter.class) -public enum LookupStatusEnum { +@JsonAdapter(InProgressLookupStatusEnum.Adapter.class) +public enum InProgressLookupStatusEnum { IN_PROGRESS("IN_PROGRESS"), @@ -39,7 +41,7 @@ public enum LookupStatusEnum { private String value; - LookupStatusEnum(String value) { + InProgressLookupStatusEnum(String value) { this.value = value; } @@ -52,8 +54,8 @@ public String toString() { return String.valueOf(value); } - public static LookupStatusEnum fromValue(String value) { - for (LookupStatusEnum b : LookupStatusEnum.values()) { + public static InProgressLookupStatusEnum fromValue(String value) { + for (InProgressLookupStatusEnum b : InProgressLookupStatusEnum.values()) { if (b.value.equalsIgnoreCase(value)) { return b; } @@ -61,22 +63,22 @@ public static LookupStatusEnum fromValue(String value) { throw new IllegalArgumentException("Unexpected value '" + value + "'"); } - public static class Adapter extends TypeAdapter { + public static class Adapter extends TypeAdapter { @Override - public void write(final JsonWriter jsonWriter, final LookupStatusEnum enumeration) throws IOException { + public void write(final JsonWriter jsonWriter, final InProgressLookupStatusEnum enumeration) throws IOException { jsonWriter.value(enumeration.getValue()); } @Override - public LookupStatusEnum read(final JsonReader jsonReader) throws IOException { + public InProgressLookupStatusEnum read(final JsonReader jsonReader) throws IOException { String value = jsonReader.nextString(); - return LookupStatusEnum.fromValue(value); + return InProgressLookupStatusEnum.fromValue(value); } } public static void validateJsonElement(JsonElement jsonElement) throws IOException { String value = jsonElement.getAsString(); - LookupStatusEnum.fromValue(value); + InProgressLookupStatusEnum.fromValue(value); } } diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java index e08a089c..bf27d076 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.17.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..d9960f20 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.17.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..871ac648 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.17.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/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/Link.java b/src/main/java/com/bandwidth/sdk/model/Link.java index fa027d22..24e990f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Link */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/LinkSchema.java b/src/main/java/com/bandwidth/sdk/model/LinkSchema.java new file mode 100644 index 00000000..b61dae80 --- /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.17.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/LinksObject.java b/src/main/java/com/bandwidth/sdk/model/LinksObject.java index 630fec92..4c1afbb1 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LinksObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..c96dc940 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageDirectionEnum; import com.bandwidth.sdk.model.MessageStatusEnum; import com.bandwidth.sdk.model.MessageTypeEnum; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/LookupErrorResponse.java b/src/main/java/com/bandwidth/sdk/model/LookupErrorResponse.java new file mode 100644 index 00000000..316e6eb9 --- /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.17.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..ee0b3609 --- /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.17.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..5c0c79e2 --- /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.17.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 4b89b117..eaec460e 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -14,12 +14,17 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; +import com.bandwidth.sdk.model.DeactivationEventEnum; +import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; +import com.bandwidth.sdk.model.LineTypeEnum; 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; @@ -42,230 +47,279 @@ 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.17.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; } /** @@ -323,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(); @@ -375,19 +433,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("phoneNumber", "lineType", "messagingProvider", "voiceProvider", "countryCodeA3", "deactivationReporter", "deactivationDate", "deactivationEvent", "latestMessageDeliveryStatus", "initialMessageDeliveryStatusDate", "latestMessageDeliveryStatusDate")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -399,33 +448,39 @@ 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())); + 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("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("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("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("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("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("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("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")); } } @@ -486,7 +541,7 @@ else 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/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index 0f3f0a98..39d43a74 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.17.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..0b46bbae 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.17.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..f0407ec7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..87f0e55e 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..39b23fb3 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.17.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..420bda03 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.17.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..0e0dbe0d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageItem; import com.bandwidth.sdk.model.PageInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..ef47dcf0 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d5e0362c 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..e76438ad 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..4bf63ee4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..a57a9a25 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..8653ed04 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..8c423a31 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.17.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..6993c77e 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.17.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..c2e9f2bc 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.17.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..d17f30f2 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.17.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..88f124ae 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.17.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..90790f2a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..69ac05d7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The structure of the content field of a multichannel message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..05527864 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.17.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..fd7b3ac5 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.17.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..5584f053 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.17.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..8a343504 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * OptInWorkflow */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..c88c9ac2 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..6087bfe8 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..f6fc8359 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionDial */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..9ea82f8e 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.17.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..df95ca61 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.17.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..4f2aa932 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.17.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..7abc00ec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMediaHeightEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContentMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..4c76ec90 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmLocationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..e541d558 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageCarouselCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..6b9a0c17 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..5c4cb506 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -43,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -66,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.17.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); @@ -122,7 +124,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmStandaloneCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("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..e0de2980 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentText */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..a2ca3bb6 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.17.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..bad48f96 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.17.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..578d5fdb 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.17.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..74a2cc39 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.17.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..fa92e165 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.17.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..f9c3e9ab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..4b0f97e6 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.17.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..a2a27d29 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.17.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..e1229270 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..f0ac27a2 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.17.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..5da629a2 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.17.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..b145fb69 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/LookupRequest.java b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java similarity index 68% rename from src/main/java/com/bandwidth/sdk/model/LookupRequest.java rename to src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java index 9a20f90e..4131409d 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,46 +45,47 @@ 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. + * SyncLookupRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") -public class LookupRequest { - public static final String SERIALIZED_NAME_TNS = "tns"; - @SerializedName(SERIALIZED_NAME_TNS) +@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) @javax.annotation.Nonnull - private List tns = new ArrayList<>(); + private List phoneNumbers = new ArrayList<>(); - public LookupRequest() { + public SyncLookupRequest() { } - public LookupRequest tns(@javax.annotation.Nonnull List tns) { - this.tns = tns; + public SyncLookupRequest phoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; return this; } - public LookupRequest addTnsItem(String tnsItem) { - if (this.tns == null) { - this.tns = new ArrayList<>(); + public SyncLookupRequest addPhoneNumbersItem(String phoneNumbersItem) { + if (this.phoneNumbers == null) { + this.phoneNumbers = new ArrayList<>(); } - this.tns.add(tnsItem); + this.phoneNumbers.add(phoneNumbersItem); return this; } /** - * Get tns - * @return tns + * Telephone numbers in E.164 format. + * @return phoneNumbers */ @javax.annotation.Nonnull - public List getTns() { - return tns; + public List getPhoneNumbers() { + return phoneNumbers; } - public void setTns(@javax.annotation.Nonnull List tns) { - this.tns = tns; + public void setPhoneNumbers(@javax.annotation.Nonnull List phoneNumbers) { + this.phoneNumbers = phoneNumbers; } /** @@ -99,9 +101,9 @@ public void setTns(@javax.annotation.Nonnull List tns) { * * @param key name of the property * @param value value of the property - * @return the LookupRequest instance itself + * @return the SyncLookupRequest instance itself */ - public LookupRequest putAdditionalProperty(String key, Object value) { + public SyncLookupRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -140,21 +142,21 @@ public boolean equals(Object o) { 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); + SyncLookupRequest syncLookupRequest = (SyncLookupRequest) o; + return Objects.equals(this.phoneNumbers, syncLookupRequest.phoneNumbers)&& + Objects.equals(this.additionalProperties, syncLookupRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(tns, additionalProperties); + return Objects.hash(phoneNumbers, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class LookupRequest {\n"); - sb.append(" tns: ").append(toIndentedString(tns)).append("\n"); + 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(); @@ -177,39 +179,37 @@ 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("phoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tns"); + 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 LookupRequest + * @throws IOException if the JSON Element is invalid with respect to SyncLookupRequest */ 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())); + 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 : LookupRequest.openapiRequiredFields) { + for (String requiredField : SyncLookupRequest.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(); // ensure the required json array is present - if (jsonObj.get("tns") == null) { + 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("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())); + } 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())); } } @@ -217,16 +217,16 @@ 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 + 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(LookupRequest.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SyncLookupRequest.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, LookupRequest value) throws IOException { + public void write(JsonWriter out, SyncLookupRequest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -254,12 +254,12 @@ else if (entry.getValue() instanceof Character) } @Override - public LookupRequest read(JsonReader in) throws IOException { + 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 - LookupRequest instance = thisAdapter.fromJsonTree(jsonObj); + SyncLookupRequest instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -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 @@ -286,18 +286,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of LookupRequest given an JSON string + * Create an instance of SyncLookupRequest 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 + * @return An instance of SyncLookupRequest + * @throws IOException if the JSON string is invalid with respect to SyncLookupRequest */ - public static LookupRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, LookupRequest.class); + public static SyncLookupRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SyncLookupRequest.class); } /** - * Convert an instance of LookupRequest to an JSON string + * Convert an instance of SyncLookupRequest to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java index 13af88b4..84a96805 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TelephoneNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..dcb4ae4d 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvBasicAuthentication */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d49eec2e 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A generic error object. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..665a9e45 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.17.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..159189f8 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.17.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..816fe394 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.VerificationUpdateRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionWrapper */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index 7d1c7fa7..9ded93a1 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d254c619 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.17.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..89963376 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.17.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..bcfdb773 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.17.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..fbb2d928 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.17.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..27969041 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.17.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..f83fa2eb 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.17.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..38eca647 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RecordingStateEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..3db39d55 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ConferenceStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..ae882baa 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d342774b 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.17.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..1f78f0c2 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.17.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..01fc2b18 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.17.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..d71a8175 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.17.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..3113987a 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..bd1fa5fd 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..0aff5385 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..d7ea2d7c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..c93ac622 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.WebhookSubscriptionBasicAuthentication; import com.bandwidth.sdk.model.WebhookSubscriptionTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..2c9df8e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Basic authentication credentials are not required, but if present, both username and password must be provided. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..4de11d02 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvBasicAuthentication; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * WebhookSubscriptionRequestSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.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) @@ -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..b19ed25f 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.17.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/smoke/PhoneNumberLookupApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/PhoneNumberLookupApiTest.java index bb5662aa..296415bb 100644 --- a/src/test/java/com/bandwidth/sdk/smoke/PhoneNumberLookupApiTest.java +++ b/src/test/java/com/bandwidth/sdk/smoke/PhoneNumberLookupApiTest.java @@ -6,182 +6,107 @@ import com.bandwidth.sdk.ApiClient; import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.Configuration; -import com.bandwidth.sdk.model.LookupRequest; -import com.bandwidth.sdk.model.LookupStatus; -import com.bandwidth.sdk.model.LookupStatusEnum; -import com.bandwidth.sdk.model.CreateLookupResponse; +import com.bandwidth.sdk.model.AsyncLookupRequest; +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.CreateSyncLookupResponse; +import com.bandwidth.sdk.model.CreateSyncLookupResponseData; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; +import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; +import com.bandwidth.sdk.model.LineTypeEnum; +import com.bandwidth.sdk.model.LinkSchema; import com.bandwidth.sdk.model.LookupResult; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; +import com.bandwidth.sdk.model.SyncLookupRequest; + import org.junit.jupiter.api.Test; +import java.time.LocalDate; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; import java.util.concurrent.TimeUnit; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.matchesRegex; import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; +@SuppressWarnings("null") public class PhoneNumberLookupApiTest { ApiClient defaultClient = Configuration.getDefaultApiClient(); HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); private final PhoneNumberLookupApi api = new PhoneNumberLookupApi(defaultClient); - LookupRequest lookupRequest = new LookupRequest(); - - /** - * Validate a LookupResult object - * - * @param result A LookupResult object - * @param phoneNumber A String phone number in E164 format to check against the - * E164 format value in the result - */ - private void validateResult(LookupResult result, String phoneNumber) { - if (result.getMobileCountryCode() != null || result.getMobileNetworkCode() != null) { - assertThat(result.getMobileCountryCode(), instanceOf(String.class)); - assertThat(result.getMobileNetworkCode(), instanceOf(String.class)); - } - - assertThat(result, hasProperty("responseCode")); - assertThat(result, hasProperty("message")); - assertThat(result, hasProperty("e164Format")); - assertThat(result, hasProperty("formatted")); - assertThat(result, hasProperty("country")); - assertThat(result, hasProperty("lineType")); - assertThat(result, hasProperty("lineProvider")); - assertThat(result, hasProperty("mobileCountryCode")); - assertThat(result, hasProperty("mobileNetworkCode")); - - assertThat(result.getE164Format(), is(phoneNumber)); - } - - /** - * Poll for a completed TN Lookup order - * - * @param requestId String requestId to poll for - * @return the completed lookup status - * @throws Exception If status was not complete after 5 attempts - */ - private LookupStatus pollLookupStatus(String requestId) throws Exception { - int attempt = 1; - LookupStatus lookupStatus = this.api.getLookupStatus(BW_ACCOUNT_ID, requestId); - - do { - try { - lookupStatus = this.api.getLookupStatus(BW_ACCOUNT_ID, requestId); - TimeUnit.SECONDS.sleep(2); - attempt += 1; - } catch (ApiException e) { - throw new Exception( - "Polling for TnLookup order status failed. \nStatus Code: " + String.valueOf(e.getCode()) - + "\nMessage: " + e.getMessage()); - } - } while (attempt <= 5 && lookupStatus.getStatus() != LookupStatusEnum.COMPLETE); - return lookupStatus; - } - - @SuppressWarnings("null") - @Test - public void successfulPhoneNumberLookup() throws Exception, ApiException { - Basic.setUsername(BW_USERNAME); - Basic.setPassword(BW_PASSWORD); - - lookupRequest.addTnsItem(BW_NUMBER); - lookupRequest.addTnsItem(VZW_NUMBER); - lookupRequest.addTnsItem(ATT_NUMBER); - lookupRequest.addTnsItem(T_MOBILE_NUMBER); - - // Create the lookup request and validate the response - ApiResponse response = api.createLookupWithHttpInfo(BW_ACCOUNT_ID, lookupRequest); - CreateLookupResponse lookupResponse = response.getData(); - assertThat(response.getStatusCode(), is(202)); - assertThat(response.getData(), instanceOf(CreateLookupResponse.class)); - assertThat(lookupResponse.getStatus(), is(LookupStatusEnum.IN_PROGRESS)); - assertThat(lookupResponse.getRequestId(), instanceOf(String.class)); - assertThat(lookupResponse.getRequestId(), - matchesRegex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")); - - // Test GET LookupStatus Response - ApiResponse lookupStatusResponse = api.getLookupStatusWithHttpInfo(BW_ACCOUNT_ID, - lookupResponse.getRequestId()); - assertThat(lookupStatusResponse.getStatusCode(), is(200)); - - LookupStatus completedLookup = null; - try { - completedLookup = pollLookupStatus(lookupStatusResponse.getData().getRequestId()); - } catch (Exception e) { - throw e; - } - assertThat(lookupStatusResponse.getData().getRequestId(), is(completedLookup.getRequestId())); - - for (LookupResult result : completedLookup.getResult()) { - assertThat(result, instanceOf(LookupResult.class)); - } - - LookupResult bwLookupResult = completedLookup.getResult().get(0); - validateResult(bwLookupResult, BW_NUMBER); - - LookupResult vzwLookupResult = completedLookup.getResult().get(1); - validateResult(vzwLookupResult, VZW_NUMBER); - - LookupResult attLookupResult = completedLookup.getResult().get(2); - validateResult(attLookupResult, ATT_NUMBER); - - LookupResult tMobileLookupResult = completedLookup.getResult().get(3); - validateResult(tMobileLookupResult, T_MOBILE_NUMBER); - - } + private final List phoneNumbers = Arrays.asList(BW_NUMBER, VZW_NUMBER, ATT_NUMBER, T_MOBILE_NUMBER); @Test - public void failedPhoneNumberLookup() throws ApiException { + public void createSyncLookupTest() throws ApiException { Basic.setUsername(BW_USERNAME); Basic.setPassword(BW_PASSWORD); - lookupRequest.addTnsItem("not a number"); - - ApiException exception = Assertions.assertThrows(ApiException.class, - () -> api.createLookup(BW_ACCOUNT_ID, lookupRequest)); - assertThat(exception.getCode(), is(400)); + SyncLookupRequest lookupRequest = new SyncLookupRequest() + .phoneNumbers(phoneNumbers); + + ApiResponse response = api.createSyncLookupWithHttpInfo(BW_ACCOUNT_ID, lookupRequest); + assertThat(response.getStatusCode(), is(200)); + assertThat(response.getData(), instanceOf(CreateSyncLookupResponse.class)); + CreateSyncLookupResponse lookupResponse = response.getData(); + assertThat(lookupResponse.getLinks(), instanceOf(List.class)); + assertThat(lookupResponse.getLinks().get(0), instanceOf(LinkSchema.class)); + assertThat(lookupResponse.getData(), instanceOf(CreateSyncLookupResponseData.class)); + assertThat(lookupResponse.getData().getRequestId(), instanceOf(UUID.class)); + assertThat(lookupResponse.getData().getStatus(), instanceOf(CompletedLookupStatusEnum.class)); + assertThat(lookupResponse.getData().getResults(), instanceOf(List.class)); + LookupResult firstResult = lookupResponse.getData().getResults().get(0); + assertThat(firstResult.getPhoneNumber(), instanceOf(String.class)); + assertThat(firstResult.getLineType(), instanceOf(LineTypeEnum.class)); + assertThat(firstResult.getMessagingProvider(), instanceOf(String.class)); + assertThat(firstResult.getVoiceProvider(), instanceOf(String.class)); + assertThat(firstResult.getCountryCodeA3(), instanceOf(String.class)); } @Test - public void duplicatePhoneNumberLookup() throws ApiException { + public void createGetAsyncLookupTest() throws ApiException, InterruptedException { Basic.setUsername(BW_USERNAME); Basic.setPassword(BW_PASSWORD); - lookupRequest.addTnsItem(BW_NUMBER); - lookupRequest.addTnsItem(BW_NUMBER); - - ApiException exception = Assertions.assertThrows(ApiException.class, - () -> api.createLookup(BW_ACCOUNT_ID, lookupRequest)); - assertThat(exception.getCode(), is(400)); - } - - @Test - public void unauthorizedRequest() throws ApiException { - Basic.setUsername("bad_username"); - Basic.setPassword("bad_password"); - - lookupRequest.addTnsItem(BW_NUMBER); - - ApiException exception = Assertions.assertThrows(ApiException.class, - () -> api.createLookup(BW_ACCOUNT_ID, lookupRequest)); - assertThat(exception.getCode(), is(401)); - } - - @Disabled(("403 Response is not implemented in the API")) - @Test - public void forbiddenRequest() throws ApiException { - Basic.setUsername(FORBIDDEN_USERNAME); - Basic.setPassword(FORBIDDEN_PASSWORD); - - lookupRequest.addTnsItem(BW_NUMBER); - - ApiException exception = Assertions.assertThrows(ApiException.class, - () -> api.createLookup(BW_ACCOUNT_ID, lookupRequest)); - assertThat(exception.getCode(), is(403)); + AsyncLookupRequest lookupRequest = new AsyncLookupRequest() + .phoneNumbers(phoneNumbers); + + ApiResponse createResponse + = api.createAsyncBulkLookupWithHttpInfo(BW_ACCOUNT_ID, lookupRequest); + + assertThat(createResponse.getStatusCode(), is(202)); + assertThat(createResponse.getData(), instanceOf(CreateAsyncBulkLookupResponse.class)); + assertThat(createResponse.getData().getData(), instanceOf(CreateAsyncBulkLookupResponseData.class)); + assertThat(createResponse.getData().getData().getRequestId(), instanceOf(UUID.class)); + assertThat(createResponse.getData().getData().getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + UUID requestId = createResponse.getData().getData().getRequestId(); + + TimeUnit.SECONDS.sleep(10); + + ApiResponse getResponse + = api.getAsyncBulkLookupWithHttpInfo(BW_ACCOUNT_ID, requestId); + + assertThat(getResponse.getStatusCode(), is(200)); + assertThat(getResponse.getData(), instanceOf(GetAsyncBulkLookupResponse.class)); + GetAsyncBulkLookupResponse lookupResponse = getResponse.getData(); + assertThat(lookupResponse.getLinks(), instanceOf(List.class)); + assertThat(lookupResponse.getLinks().get(0), instanceOf(LinkSchema.class)); + assertThat(lookupResponse.getData(), instanceOf(GetAsyncBulkLookupResponseData.class)); + assertThat(lookupResponse.getData().getRequestId(), equalTo(requestId)); + assertThat(lookupResponse.getData().getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + assertThat(lookupResponse.getData().getResults(), instanceOf(List.class)); + LookupResult firstResult = lookupResponse.getData().getResults().get(0); + assertThat(firstResult.getPhoneNumber(), instanceOf(String.class)); + assertThat(firstResult.getLineType(), instanceOf(LineTypeEnum.class)); + assertThat(firstResult.getMessagingProvider(), instanceOf(String.class)); + assertThat(firstResult.getVoiceProvider(), instanceOf(String.class)); + assertThat(firstResult.getCountryCodeA3(), instanceOf(String.class)); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java index 36127bf8..e95c8432 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/MessagesApiTest.java @@ -22,12 +22,12 @@ import com.bandwidth.sdk.model.PriorityEnum; import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; -import static org.hamcrest.MatcherAssert.assertThat; import java.time.OffsetDateTime; import java.util.LinkedHashSet; import java.util.List; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; diff --git a/src/test/java/com/bandwidth/sdk/unit/api/MultiChannelApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/MultiChannelApiTest.java index 7fb33cae..64a0dbca 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/MultiChannelApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/MultiChannelApiTest.java @@ -6,6 +6,7 @@ import com.bandwidth.sdk.Configuration; import com.bandwidth.sdk.api.MultiChannelApi; import com.bandwidth.sdk.auth.HttpBasicAuth; +import com.bandwidth.sdk.model.CreateMultiChannelMessageResponse; import com.bandwidth.sdk.model.MultiChannelChannelListObject; import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; @@ -21,7 +22,6 @@ import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; public class MultiChannelApiTest { @@ -53,7 +53,7 @@ public void createMultiChannelMessageTest() throws ApiException { multiChannelMessageRequest.addChannelListItem(channelListObject); - ApiResponse response = + ApiResponse response = api.createMultiChannelMessageWithHttpInfo(BW_ACCOUNT_ID, multiChannelMessageRequest); assertThat(response.getStatusCode(), is(202)); } diff --git a/src/test/java/com/bandwidth/sdk/unit/api/PhoneNumberLookupApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/PhoneNumberLookupApiTest.java index ca64dec7..ad3a23c7 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/PhoneNumberLookupApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/PhoneNumberLookupApiTest.java @@ -1,7 +1,17 @@ -package com.bandwidth.sdk.unit.api; +/* + * 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. + */ -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; + +package com.bandwidth.sdk.unit.api; import com.bandwidth.sdk.ApiClient; import com.bandwidth.sdk.ApiException; @@ -9,28 +19,44 @@ import com.bandwidth.sdk.Configuration; import com.bandwidth.sdk.api.PhoneNumberLookupApi; import com.bandwidth.sdk.auth.HttpBasicAuth; -import com.bandwidth.sdk.model.CreateLookupResponse; -import com.bandwidth.sdk.model.LookupRequest; -import com.bandwidth.sdk.model.LookupStatus; -import com.bandwidth.sdk.model.LookupStatusEnum; +import com.bandwidth.sdk.model.AsyncLookupRequest; +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.CreateSyncLookupResponse; +import com.bandwidth.sdk.model.CreateSyncLookupResponseData; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; +import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; +import com.bandwidth.sdk.model.LineTypeEnum; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupResult; +import com.bandwidth.sdk.model.SyncLookupRequest; +import java.util.UUID; -import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; -import java.util.ArrayList; +import java.time.LocalDate; import java.util.Arrays; +import java.util.List; +import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; +/** + * API tests for PhoneNumberLookupApi + */ @SuppressWarnings("null") public class PhoneNumberLookupApiTest { - public static ApiClient defaultClient = Configuration.getDefaultApiClient(); - public static HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); + private static ApiClient defaultClient = Configuration.getDefaultApiClient(); + private static HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); private static PhoneNumberLookupApi api = new PhoneNumberLookupApi(defaultClient); - private static String lookupRequestId = "1234"; - @BeforeAll public static void setUp() { Basic.setUsername(BW_USERNAME); @@ -38,26 +64,104 @@ public static void setUp() { api.setCustomBaseUrl("http://127.0.0.1:4010"); } + /** + * 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. + * + * @throws ApiException if the Api call fails + */ @Test - public void testCreateLookup() throws ApiException { - LookupRequest lookupRequest = new LookupRequest() - .tns(new ArrayList(Arrays.asList(USER_NUMBER))); - - ApiResponse response = api.createLookupWithHttpInfo(BW_ACCOUNT_ID, lookupRequest); - + public void createAsyncBulkLookupTest() throws ApiException { + AsyncLookupRequest asyncLookupRequest = new AsyncLookupRequest() + .phoneNumbers(Arrays.asList("+1234567890", "+1987654321")); + ApiResponse response = + api.createAsyncBulkLookupWithHttpInfo(BW_ACCOUNT_ID, asyncLookupRequest); assertThat(response.getStatusCode(), is(202)); - assertThat(response.getData(), instanceOf(CreateLookupResponse.class)); - assertThat(response.getData().getRequestId().length(), is(36)); - assertThat(response.getData().getStatus(), instanceOf(LookupStatusEnum.class)); + assertThat(response.getData(), instanceOf(CreateAsyncBulkLookupResponse.class)); + assertThat(response.getData().getLinks(), instanceOf(List.class)); + assertThat(response.getData().getLinks().get(0), instanceOf(LinkSchema.class)); + assertThat(response.getData().getLinks().get(0).getRel(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getHref(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getMethod(), instanceOf(String.class)); + assertThat(response.getData().getData(), instanceOf(CreateAsyncBulkLookupResponseData.class)); + assertThat(response.getData().getData().getRequestId(), instanceOf(UUID.class)); + assertThat(response.getData().getData().getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + assertThat(response.getData().getData().getStatus(), equalTo(InProgressLookupStatusEnum.IN_PROGRESS)); + assertThat(response.getData().getErrors(), instanceOf(List.class)); } - @Test // Can't do more asserts because we can't specify the example using headers - public void testGetLookupStatus() throws ApiException { - ApiResponse response = api.getLookupStatusWithHttpInfo(BW_ACCOUNT_ID, lookupRequestId); + /** + * Create Synchronous Number Lookup + * + * Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createSyncLookupTest() throws ApiException { + SyncLookupRequest syncLookupRequest = new SyncLookupRequest() + .phoneNumbers(Arrays.asList("+1234567890", "+1987654321")); + ApiResponse response = api.createSyncLookupWithHttpInfo(BW_ACCOUNT_ID, syncLookupRequest); + assertThat(response.getStatusCode(), is(200)); + assertThat(response.getData(), instanceOf(CreateSyncLookupResponse.class)); + assertThat(response.getData().getLinks(), instanceOf(List.class)); + assertThat(response.getData().getLinks().get(0), instanceOf(LinkSchema.class)); + assertThat(response.getData().getLinks().get(0).getRel(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getHref(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getMethod(), instanceOf(String.class)); + assertThat(response.getData().getData(), instanceOf(CreateSyncLookupResponseData.class)); + assertThat(response.getData().getData().getRequestId(), instanceOf(UUID.class)); + assertThat(response.getData().getData().getStatus(), instanceOf(CompletedLookupStatusEnum.class)); + assertThat(response.getData().getData().getStatus(), equalTo(CompletedLookupStatusEnum.COMPLETE)); + assertThat(response.getData().getData().getResults(), instanceOf(List.class)); + assertThat(response.getData().getData().getResults().get(0), instanceOf(LookupResult.class)); + assertThat(response.getData().getData().getResults().get(0).getPhoneNumber(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getLineType(), instanceOf(LineTypeEnum.class)); + assertThat(response.getData().getData().getResults().get(0).getMessagingProvider(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getVoiceProvider(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getCountryCodeA3(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatus(), instanceOf(LatestMessageDeliveryStatusEnum.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatus(), equalTo(LatestMessageDeliveryStatusEnum.ACTIVE)); + assertThat(response.getData().getData().getResults().get(0).getInitialMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); + assertThat(response.getData().getErrors(), instanceOf(List.class)); + } + /** + * 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. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAsyncBulkLookupTest() throws ApiException { + UUID requestId = UUID.fromString("123e4567-e89b-12d3-a456-426614174000"); + ApiResponse response = api.getAsyncBulkLookupWithHttpInfo(BW_ACCOUNT_ID, requestId); assertThat(response.getStatusCode(), is(200)); - assertThat(response.getData(), instanceOf(LookupStatus.class)); - assertThat(response.getData().getRequestId().length(), is(36)); - assertThat(response.getData().getStatus(), instanceOf(LookupStatusEnum.class)); + assertThat(response.getData(), instanceOf(GetAsyncBulkLookupResponse.class)); + assertThat(response.getData().getLinks(), instanceOf(List.class)); + assertThat(response.getData().getLinks().get(0), instanceOf(LinkSchema.class)); + assertThat(response.getData().getLinks().get(0).getRel(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getHref(), instanceOf(String.class)); + assertThat(response.getData().getLinks().get(0).getMethod(), instanceOf(String.class)); + assertThat(response.getData().getData(), instanceOf(GetAsyncBulkLookupResponseData.class)); + assertThat(response.getData().getData().getRequestId(), instanceOf(UUID.class)); + assertThat(response.getData().getData().getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + assertThat(response.getData().getData().getStatus(), equalTo(InProgressLookupStatusEnum.COMPLETE)); + assertThat(response.getData().getData().getResults(), instanceOf(List.class)); + assertThat(response.getData().getData().getResults().get(0), instanceOf(LookupResult.class)); + assertThat(response.getData().getData().getResults().get(0).getPhoneNumber(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getLineType(), instanceOf(LineTypeEnum.class)); + assertThat(response.getData().getData().getResults().get(0).getMessagingProvider(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getVoiceProvider(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getCountryCodeA3(), instanceOf(String.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatus(), instanceOf(LatestMessageDeliveryStatusEnum.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatus(), equalTo(LatestMessageDeliveryStatusEnum.ACTIVE)); + assertThat(response.getData().getData().getResults().get(0).getInitialMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); + assertThat(response.getData().getData().getResults().get(0).getLatestMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); + assertThat(response.getData().getErrors(), instanceOf(List.class)); } + } diff --git a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java index 219f6d6a..7a56d0c6 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java @@ -13,7 +13,6 @@ package com.bandwidth.sdk.unit.api; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import com.bandwidth.sdk.ApiClient; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/AsyncLookupRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/AsyncLookupRequestTest.java new file mode 100644 index 00000000..084fe6d5 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/AsyncLookupRequestTest.java @@ -0,0 +1,48 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.AsyncLookupRequest; + +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for AsyncLookupRequest + */ +public class AsyncLookupRequestTest { + private final AsyncLookupRequest model = new AsyncLookupRequest() + .phoneNumbers(Arrays.asList("+1234567890", "+1987654321")); + + /** + * Model tests for AsyncLookupRequest + */ + @Test + public void testAsyncLookupRequest() { + assertThat(model, instanceOf(AsyncLookupRequest.class)); + } + + /** + * Test the property 'phoneNumbers' + */ + @Test + public void phoneNumbersTest() { + assertThat(model.getPhoneNumbers(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CompletedLookupStatusEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CompletedLookupStatusEnumTest.java new file mode 100644 index 00000000..ecb26afe --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/CompletedLookupStatusEnumTest.java @@ -0,0 +1,37 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.equalTo; + +/** + * Model tests for CompletedLookupStatusEnum + */ +public class CompletedLookupStatusEnumTest { + /** + * Model tests for CompletedLookupStatusEnum + */ + @Test + public void testCompletedLookupStatusEnum() { + assertThat(CompletedLookupStatusEnum.COMPLETE.toString(), equalTo("COMPLETE")); + assertThat(CompletedLookupStatusEnum.PARTIAL_COMPLETE.toString(), equalTo("PARTIAL_COMPLETE")); + assertThat(CompletedLookupStatusEnum.FAILED.toString(), equalTo("FAILED")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseDataTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseDataTest.java new file mode 100644 index 00000000..f523d994 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseDataTest.java @@ -0,0 +1,57 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; + +import java.util.UUID; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for CreateAsyncBulkLookupResponseData + */ +public class CreateAsyncBulkLookupResponseDataTest { + private final CreateAsyncBulkLookupResponseData model = new CreateAsyncBulkLookupResponseData() + .requestId(UUID.fromString("123e4567-e89b-12d3-a456-426614174000")) + .status(InProgressLookupStatusEnum.IN_PROGRESS); + + /** + * Model tests for CreateAsyncBulkLookupResponseData + */ + @Test + public void testCreateAsyncBulkLookupResponseData() { + assertThat(model, instanceOf(CreateAsyncBulkLookupResponseData.class)); + } + + /** + * Test the property 'requestId' + */ + @Test + public void requestIdTest() { + assertThat(model.getRequestId(), instanceOf(UUID.class)); + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + assertThat(model.getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseTest.java new file mode 100644 index 00000000..dc61f555 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/CreateAsyncBulkLookupResponseTest.java @@ -0,0 +1,70 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.CreateAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; + +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for CreateAsyncBulkLookupResponse + */ +public class CreateAsyncBulkLookupResponseTest { + private final CreateAsyncBulkLookupResponse model = new CreateAsyncBulkLookupResponse() + .links(Arrays.asList(new LinkSchema())) + .data(new CreateAsyncBulkLookupResponseData()) + .errors(Arrays.asList(new LookupErrorSchema())); + + /** + * Model tests for CreateAsyncBulkLookupResponse + */ + @Test + public void testCreateAsyncBulkLookupResponse() { + assertThat(model, instanceOf(CreateAsyncBulkLookupResponse.class)); + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + assertThat(model.getLinks(), instanceOf(List.class)); + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + assertThat(model.getData(), instanceOf(CreateAsyncBulkLookupResponseData.class)); + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + assertThat(model.getErrors(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateLookupResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateLookupResponseTest.java deleted file mode 100644 index 5f2500de..00000000 --- a/src/test/java/com/bandwidth/sdk/unit/models/CreateLookupResponseTest.java +++ /dev/null @@ -1,55 +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.unit.models; - -import org.junit.jupiter.api.Test; - -import com.bandwidth.sdk.model.CreateLookupResponse; -import com.bandwidth.sdk.model.LookupStatusEnum; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.CoreMatchers.instanceOf; - -/** - * Model tests for CreateLookupResponse - */ -public class CreateLookupResponseTest { - private final CreateLookupResponse model = new CreateLookupResponse() - .requestId("requestId") - .status(LookupStatusEnum.COMPLETE); - - /** - * Model tests for CreateLookupResponse - */ - @Test - public void testCreateLookupResponse() { - assertThat(model, instanceOf(CreateLookupResponse.class)); - } - - /** - * Test the property 'requestId' - */ - @Test - public void requestIdTest() { - assertThat(model.getRequestId(), instanceOf(String.class)); - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - assertThat(model.getStatus(), instanceOf(LookupStatusEnum.class)); - } - -} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseDataTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseDataTest.java new file mode 100644 index 00000000..36f27741 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseDataTest.java @@ -0,0 +1,73 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; +import com.bandwidth.sdk.model.CreateSyncLookupResponseData; +import com.bandwidth.sdk.model.LineTypeEnum; +import com.bandwidth.sdk.model.LookupResult; + +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for CreateSyncLookupResponseData + */ +public class CreateSyncLookupResponseDataTest { + private final CreateSyncLookupResponseData model = new CreateSyncLookupResponseData() + .requestId(UUID.fromString("123e4567-e89b-12d3-a456-426614174000")) + .status(CompletedLookupStatusEnum.COMPLETE) + .results(Arrays.asList(new LookupResult() + .phoneNumber("+1234567890") + .lineType(LineTypeEnum.MOBILE))); + + /** + * Model tests for CreateSyncLookupResponseData + */ + @Test + public void testCreateSyncLookupResponseData() { + assertThat(model, instanceOf(CreateSyncLookupResponseData.class)); + } + + /** + * Test the property 'requestId' + */ + @Test + public void requestIdTest() { + assertThat(model.getRequestId(), instanceOf(UUID.class)); + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + assertThat(model.getStatus(), instanceOf(CompletedLookupStatusEnum.class)); + } + + /** + * Test the property 'results' + */ + @Test + public void resultsTest() { + assertThat(model.getResults(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseTest.java new file mode 100644 index 00000000..934afb23 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/CreateSyncLookupResponseTest.java @@ -0,0 +1,80 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.unit.models; + +import com.bandwidth.sdk.model.CompletedLookupStatusEnum; +import com.bandwidth.sdk.model.CreateSyncLookupResponse; +import com.bandwidth.sdk.model.CreateSyncLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for CreateSyncLookupResponse + */ +public class CreateSyncLookupResponseTest { + private final CreateSyncLookupResponse model = new CreateSyncLookupResponse() + .links(Arrays.asList(new LinkSchema() + .href("https://api.bandwidth.com/v1.0/lookups/12345") + .rel("self").method("GET"))) + .data(new CreateSyncLookupResponseData() + .requestId(java.util.UUID.fromString("123e4567-e89b-12d3-a456-426614174000")) + .status(CompletedLookupStatusEnum.COMPLETE) + .results(new ArrayList<>())) + .errors(Arrays.asList(new LookupErrorSchema() + .code("InvalidNumber") + .description("The phone number provided is invalid.") + .type("ValidationError"))); + + /** + * Model tests for CreateSyncLookupResponse + */ + @Test + public void testCreateSyncLookupResponse() { + assertThat(model, instanceOf(CreateSyncLookupResponse.class)); + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + assertThat(model.getLinks(), instanceOf(List.class)); + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + assertThat(model.getData(), instanceOf(CreateSyncLookupResponseData.class)); + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + assertThat(model.getErrors(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/DeactivationEventEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/DeactivationEventEnumTest.java new file mode 100644 index 00000000..2e944180 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/DeactivationEventEnumTest.java @@ -0,0 +1,35 @@ +/* + * 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.unit.models; + +import org.junit.jupiter.api.Test; + +import com.bandwidth.sdk.model.DeactivationEventEnum; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.equalTo; + +/** + * Model tests for DeactivationEventEnum + */ +public class DeactivationEventEnumTest { + /** + * Model tests for DeactivationEventEnum + */ + @Test + public void testDeactivationEventEnum() { + assertThat(DeactivationEventEnum.DEACTIVATED.toString(), equalTo("DEACTIVATED")); + } + +} 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/GetAsyncBulkLookupResponseDataTest.java b/src/test/java/com/bandwidth/sdk/unit/models/GetAsyncBulkLookupResponseDataTest.java new file mode 100644 index 00000000..d02ef7f5 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/GetAsyncBulkLookupResponseDataTest.java @@ -0,0 +1,71 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; +import com.bandwidth.sdk.model.LookupResult; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for GetAsyncBulkLookupResponseData + */ +public class GetAsyncBulkLookupResponseDataTest { + private final GetAsyncBulkLookupResponseData model = new GetAsyncBulkLookupResponseData() + .requestId(UUID.fromString("123e4567-e89b-12d3-a456-426614174000")) + .status(InProgressLookupStatusEnum.IN_PROGRESS) + .results(new ArrayList(Arrays.asList(new LookupResult()))); + + /** + * Model tests for GetAsyncBulkLookupResponseData + */ + @Test + public void testGetAsyncBulkLookupResponseData() { + assertThat(model, instanceOf(GetAsyncBulkLookupResponseData.class)); + } + + /** + * Test the property 'requestId' + */ + @Test + public void requestIdTest() { + assertThat(model.getRequestId(), instanceOf(UUID.class)); + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + assertThat(model.getStatus(), instanceOf(InProgressLookupStatusEnum.class)); + } + + /** + * Test the property 'results' + */ + @Test + public void resultsTest() { + assertThat(model.getResults(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/GetAsyncBulkLookupResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/GetAsyncBulkLookupResponseTest.java new file mode 100644 index 00000000..88e52854 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/GetAsyncBulkLookupResponseTest.java @@ -0,0 +1,71 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponse; +import com.bandwidth.sdk.model.GetAsyncBulkLookupResponseData; +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorSchema; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for GetAsyncBulkLookupResponse + */ +public class GetAsyncBulkLookupResponseTest { + private final GetAsyncBulkLookupResponse model = new GetAsyncBulkLookupResponse() + .links(new ArrayList(Arrays.asList(new LinkSchema()))) + .data(new GetAsyncBulkLookupResponseData()) + .errors(new ArrayList(Arrays.asList(new LookupErrorSchema()))); + + /** + * Model tests for GetAsyncBulkLookupResponse + */ + @Test + public void testGetAsyncBulkLookupResponse() { + assertThat(model, instanceOf(GetAsyncBulkLookupResponse.class)); + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + assertThat(model.getLinks(), instanceOf(List.class)); + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + assertThat(model.getData(), instanceOf(GetAsyncBulkLookupResponseData.class)); + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + assertThat(model.getErrors(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/InProgressLookupStatusEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/InProgressLookupStatusEnumTest.java new file mode 100644 index 00000000..51e00159 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/InProgressLookupStatusEnumTest.java @@ -0,0 +1,38 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.InProgressLookupStatusEnum; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.equalTo; + +/** + * Model tests for InProgressLookupStatusEnum + */ +public class InProgressLookupStatusEnumTest { + /** + * Model tests for InProgressLookupStatusEnum + */ + @Test + public void testInProgressLookupStatusEnum() { + assertThat(InProgressLookupStatusEnum.IN_PROGRESS.toString(), equalTo("IN_PROGRESS")); + assertThat(InProgressLookupStatusEnum.COMPLETE.toString(), equalTo("COMPLETE")); + assertThat(InProgressLookupStatusEnum.PARTIAL_COMPLETE.toString(), equalTo("PARTIAL_COMPLETE")); + assertThat(InProgressLookupStatusEnum.FAILED.toString(), equalTo("FAILED")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LatestMessageDeliveryStatusEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LatestMessageDeliveryStatusEnumTest.java new file mode 100644 index 00000000..11983344 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LatestMessageDeliveryStatusEnumTest.java @@ -0,0 +1,37 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.equalTo; + +/** + * Model tests for LatestMessageDeliveryStatusEnum + */ +public class LatestMessageDeliveryStatusEnumTest { + /** + * Model tests for LatestMessageDeliveryStatusEnum + */ + @Test + public void testLatestMessageDeliveryStatusEnum() { + assertThat(LatestMessageDeliveryStatusEnum.ACTIVE.toString(), equalTo("ACTIVE")); + assertThat(LatestMessageDeliveryStatusEnum.DEACTIVATED.toString(), equalTo("DEACTIVATED")); + assertThat(LatestMessageDeliveryStatusEnum.UNKNOWN.toString(), equalTo("UNKNOWN")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LineTypeEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LineTypeEnumTest.java new file mode 100644 index 00000000..59dffa72 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LineTypeEnumTest.java @@ -0,0 +1,38 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.LineTypeEnum; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.equalTo; + +/** + * Model tests for LineTypeEnum + */ +public class LineTypeEnumTest { + /** + * Model tests for LineTypeEnum + */ + @Test + public void testLineTypeEnum() { + assertThat(LineTypeEnum.FIXED.toString(), equalTo("FIXED")); + assertThat(LineTypeEnum.VOIP_FIXED.toString(), equalTo("VOIP-FIXED")); + assertThat(LineTypeEnum.MOBILE.toString(), equalTo("MOBILE")); + assertThat(LineTypeEnum.VOIP.toString(), equalTo("VOIP")); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LinkSchemaTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LinkSchemaTest.java new file mode 100644 index 00000000..e812caf8 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LinkSchemaTest.java @@ -0,0 +1,64 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.LinkSchema; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for LinkSchema + */ +public class LinkSchemaTest { + private final LinkSchema model = new LinkSchema() + .rel("self") + .href("https://api.bandwidth.com/v1/users/1234") + .method("GET"); + + /** + * Model tests for LinkSchema + */ + @Test + public void testLinkSchema() { + assertThat(model, instanceOf(LinkSchema.class)); + } + + /** + * Test the property 'href' + */ + @Test + public void hrefTest() { + assertThat(model.getHref(), instanceOf(String.class)); + } + + /** + * Test the property 'rel' + */ + @Test + public void relTest() { + assertThat(model.getRel(), instanceOf(String.class)); + } + + /** + * Test the property 'method' + */ + @Test + public void methodTest() { + assertThat(model.getMethod(), instanceOf(String.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorResponseTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorResponseTest.java new file mode 100644 index 00000000..f3605041 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorResponseTest.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.unit.models; + +import com.bandwidth.sdk.model.LinkSchema; +import com.bandwidth.sdk.model.LookupErrorResponse; +import com.bandwidth.sdk.model.LookupErrorSchema; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for LookupErrorResponse + */ +public class LookupErrorResponseTest { + private final LookupErrorResponse model = new LookupErrorResponse() + .links(new ArrayList(Arrays.asList(new LinkSchema() + .rel("self") + .href("https://api.bandwidth.com/v1/users/1234") + .method("GET") + ))) + .data(new Object()) + .errors(new ArrayList(Arrays.asList(new LookupErrorSchema() + .code("InvalidNumber") + .description("The phone number provided is invalid") + .type("ValidationError") + ))); + + /** + * Model tests for LookupErrorResponse + */ + @Test + public void testLookupErrorResponse() { + assertThat(model, instanceOf(LookupErrorResponse.class)); + } + + /** + * Test the property 'links' + */ + @Test + public void linksTest() { + assertThat(model.getLinks(), instanceOf(List.class)); + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + assertThat(model.getData(), instanceOf(Object.class)); + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + assertThat(model.getErrors(), instanceOf(List.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaMetaTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaMetaTest.java new file mode 100644 index 00000000..5dd67cdc --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaMetaTest.java @@ -0,0 +1,68 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.LookupErrorSchemaMeta; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for LookupErrorSchemaMeta + */ +public class LookupErrorSchemaMetaTest { + private final LookupErrorSchemaMeta model = new LookupErrorSchemaMeta() + .phoneNumbers(new ArrayList(Arrays.asList("1234567890", "0987654321"))) + .message("Sample error message") + .code(400); + + /** + * Model tests for LookupErrorSchemaMeta + */ + @Test + public void testLookupErrorSchemaMeta() { + assertThat(model, instanceOf(LookupErrorSchemaMeta.class)); + } + + /** + * Test the property 'phoneNumbers' + */ + @Test + public void phoneNumbersTest() { + assertThat(model.getPhoneNumbers(), instanceOf(List.class)); + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + assertThat(model.getMessage(), instanceOf(String.class)); + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + assertThat(model.getCode(), instanceOf(Integer.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaTest.java new file mode 100644 index 00000000..555424fd --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/LookupErrorSchemaTest.java @@ -0,0 +1,81 @@ +/* + * 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.unit.models; + +import com.bandwidth.sdk.model.LookupErrorSchema; +import com.bandwidth.sdk.model.LookupErrorSchemaMeta; + +import java.util.Arrays; +import java.util.ArrayList; + +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for LookupErrorSchema + */ +public class LookupErrorSchemaTest { + private final LookupErrorSchema model = new LookupErrorSchema() + .code("VALIDATION_ERROR") + .description("The provided phone number is not valid.") + .type("validation") + .meta(new LookupErrorSchemaMeta() + .phoneNumbers(new ArrayList(Arrays.asList("1234567890", "0987654321"))) + .message("Sample error message") + .code(400) + ); + + /** + * Model tests for LookupErrorSchema + */ + @Test + public void testLookupErrorSchema() { + assertThat(model, instanceOf(LookupErrorSchema.class)); + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + assertThat(model.getCode(), instanceOf(String.class)); + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + assertThat(model.getDescription(), instanceOf(String.class)); + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + assertThat(model.getType(), instanceOf(String.class)); + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + assertThat(model.getMeta(), instanceOf(LookupErrorSchemaMeta.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupResultTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupResultTest.java index d95842de..7c3a7821 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/LookupResultTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/LookupResultTest.java @@ -14,8 +14,13 @@ import org.junit.jupiter.api.Test; +import com.bandwidth.sdk.model.DeactivationEventEnum; +import com.bandwidth.sdk.model.LatestMessageDeliveryStatusEnum; +import com.bandwidth.sdk.model.LineTypeEnum; import com.bandwidth.sdk.model.LookupResult; +import java.time.LocalDate; + import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; @@ -24,15 +29,18 @@ */ public class LookupResultTest { private final LookupResult model = new LookupResult() - .responseCode(200) - .message("message") - .e164Format("e164Format") - .formatted("formatted") - .country("country") - .lineType("lineType") - .lineProvider("lineProvider") - .mobileCountryCode("mobileCountryCode") - .mobileNetworkCode("mobileNetworkCode"); + .phoneNumber("1234567890") + .lineType(LineTypeEnum.MOBILE) + .messagingProvider("TestProvider") + .voiceProvider("TestVoiceProvider") + .countryCodeA3("USA") + .deactivationReporter("TestReporter") + .deactivationDate("2023-01-01T00:00:00Z") + .deactivationEvent(DeactivationEventEnum.DEACTIVATED) + .latestMessageDeliveryStatus(LatestMessageDeliveryStatusEnum.ACTIVE) + .initialMessageDeliveryStatusDate(LocalDate.of(2025, 1, 1)) + .latestMessageDeliveryStatusDate(LocalDate.of(2025, 1, 1)); + /** * Model tests for LookupResult @@ -43,75 +51,91 @@ public void testLookupResult() { } /** - * Test the property 'responseCode' + * Test the property 'phoneNumber' */ @Test - public void responseCodeTest() { - assertThat(model.getResponseCode(), instanceOf(Integer.class)); + public void phoneNumberTest() { + assertThat(model.getPhoneNumber(), instanceOf(String.class)); } /** - * Test the property 'message' + * Test the property 'lineType' */ @Test - public void messageTest() { - assertThat(model.getMessage(), instanceOf(String.class)); + public void lineTypeTest() { + assertThat(model.getLineType(), instanceOf(LineTypeEnum.class)); } /** - * Test the property 'e164Format' + * Test the property 'messagingProvider' */ @Test - public void e164FormatTest() { - assertThat(model.getE164Format(), instanceOf(String.class)); + public void messagingProviderTest() { + assertThat(model.getMessagingProvider(), instanceOf(String.class)); } /** - * Test the property 'formatted' + * Test the property 'voiceProvider' */ @Test - public void formattedTest() { - assertThat(model.getFormatted(), instanceOf(String.class)); + public void voiceProviderTest() { + assertThat(model.getVoiceProvider(), instanceOf(String.class)); } /** - * Test the property 'country' + * Test the property 'countryCodeA3' */ @Test - public void countryTest() { - assertThat(model.getCountry(), instanceOf(String.class)); + public void countryCodeA3Test() { + assertThat(model.getCountryCodeA3(), instanceOf(String.class)); } /** - * Test the property 'lineType' + * Test the property 'deactivationReporter' */ @Test - public void lineTypeTest() { - assertThat(model.getLineType(), instanceOf(String.class)); + public void deactivationReporterTest() { + assertThat(model.getDeactivationReporter(), instanceOf(String.class)); + } + + /** + * Test the property 'deactivationDate' + */ + @Test + public void deactivationDateTest() { + assertThat(model.getDeactivationDate(), instanceOf(String.class)); + } + + /** + * Test the property 'deactivationEvent' + */ + @Test + public void deactivationEventTest() { + assertThat(model.getDeactivationEvent(), instanceOf(DeactivationEventEnum.class)); } /** - * Test the property 'lineProvider' + * Test the property 'latestMessageDeliveryStatus' */ @Test - public void lineProviderTest() { - assertThat(model.getLineProvider(), instanceOf(String.class)); + public void latestMessageDeliveryStatusTest() { + assertThat(model.getLatestMessageDeliveryStatus(), instanceOf(LatestMessageDeliveryStatusEnum.class)); } /** - * Test the property 'mobileCountryCode' + * Test the property 'initialMessageDeliveryStatusDate' */ @Test - public void mobileCountryCodeTest() { - assertThat(model.getMobileCountryCode(), instanceOf(String.class)); + public void initialMessageDeliveryStatusDateTest() { + assertThat(model.getInitialMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); } /** - * Test the property 'mobileNetworkCode' + * Test the property 'latestMessageDeliveryStatusDate' */ @Test - public void mobileNetworkCodeTest() { - assertThat(model.getMobileNetworkCode(), instanceOf(String.class)); + public void latestMessageDeliveryStatusDateTest() { + assertThat(model.getLatestMessageDeliveryStatusDate(), instanceOf(LocalDate.class)); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusEnumTest.java deleted file mode 100644 index de349184..00000000 --- a/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusEnumTest.java +++ /dev/null @@ -1,37 +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.unit.models; - -import org.junit.jupiter.api.Test; - -import com.bandwidth.sdk.model.LookupStatusEnum; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.CoreMatchers.equalTo; - -/** - * Model tests for LookupStatusEnum - */ -public class LookupStatusEnumTest { - /** - * Model tests for LookupStatusEnum - */ - @Test - public void testLookupStatusEnum() { - assertThat(LookupStatusEnum.COMPLETE.toString(), equalTo("COMPLETE")); - assertThat(LookupStatusEnum.FAILED.toString(), equalTo("FAILED")); - assertThat(LookupStatusEnum.IN_PROGRESS.toString(), equalTo("IN_PROGRESS")); - assertThat(LookupStatusEnum.PARTIAL_COMPLETE.toString(), equalTo("PARTIAL_COMPLETE")); - } - -} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusTest.java b/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusTest.java deleted file mode 100644 index 3dc66837..00000000 --- a/src/test/java/com/bandwidth/sdk/unit/models/LookupStatusTest.java +++ /dev/null @@ -1,77 +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.unit.models; - -import org.junit.jupiter.api.Test; - -import java.util.List; -import java.util.Arrays; -import java.util.ArrayList; -import com.bandwidth.sdk.model.LookupStatus; -import com.bandwidth.sdk.model.LookupResult; -import com.bandwidth.sdk.model.LookupStatusEnum; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.CoreMatchers.instanceOf; - -/** - * Model tests for LookupStatus - */ -public class LookupStatusTest { - private final LookupStatus model = new LookupStatus() - .requestId("requestId") - .status(LookupStatusEnum.COMPLETE) - .result(new ArrayList(Arrays.asList(new LookupResult()))) - .failedTelephoneNumbers(new ArrayList(Arrays.asList("failedTelephoneNumbers"))); - - /** - * Model tests for LookupStatus - */ - @Test - public void testLookupStatus() { - assertThat(model, instanceOf(LookupStatus.class)); - } - - /** - * Test the property 'requestId' - */ - @Test - public void requestIdTest() { - assertThat(model.getRequestId(), instanceOf(String.class)); - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - assertThat(model.getStatus(), instanceOf(LookupStatusEnum.class)); - } - - /** - * Test the property 'result' - */ - @Test - public void resultTest() { - assertThat(model.getResult(), instanceOf(List.class)); - } - - /** - * Test the property 'failedTelephoneNumbers' - */ - @Test - public void failedTelephoneNumbersTest() { - assertThat(model.getFailedTelephoneNumbers(), instanceOf(List.class)); - } - -} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/MultiChannelErrorTest.java b/src/test/java/com/bandwidth/sdk/unit/models/MultiChannelErrorTest.java index 182a4ffe..55d1ddbc 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/MultiChannelErrorTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/MultiChannelErrorTest.java @@ -44,6 +44,7 @@ public void testMultiChannelError() { /** * Test the property 'links' */ + @SuppressWarnings("null") @Test public void linksTest() { assertThat(model.getLinks(), instanceOf(List.class)); @@ -61,6 +62,7 @@ public void dataTest() { /** * Test the property 'errors' */ + @SuppressWarnings("null") @Test public void errorsTest() { assertThat(model.getErrors(), instanceOf(List.class)); 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")); } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/LookupRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/SyncLookupRequestTest.java similarity index 52% rename from src/test/java/com/bandwidth/sdk/unit/models/LookupRequestTest.java rename to src/test/java/com/bandwidth/sdk/unit/models/SyncLookupRequestTest.java index 3119f419..d7e9f369 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/LookupRequestTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/SyncLookupRequestTest.java @@ -10,41 +10,41 @@ * Do not edit the class manually. */ -package com.bandwidth.sdk.unit.models; - -import org.junit.jupiter.api.Test; -import com.bandwidth.sdk.model.LookupRequest; +package com.bandwidth.sdk.unit.models; -import static org.hamcrest.MatcherAssert.assertThat; +import com.bandwidth.sdk.model.SyncLookupRequest; -import java.util.List; -import java.util.Arrays; import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; /** - * Model tests for LookupRequest + * Model tests for SyncLookupRequest */ -public class LookupRequestTest { - private final LookupRequest model = new LookupRequest() - .tns(new ArrayList(Arrays.asList("tns"))); +public class SyncLookupRequestTest { + private final SyncLookupRequest model = new SyncLookupRequest() + .phoneNumbers(new ArrayList(Arrays.asList("+1234567890", "+1987654321"))); /** - * Model tests for LookupRequest + * Model tests for SyncLookupRequest */ @Test - public void testLookupRequest() { - assertThat(model, instanceOf(LookupRequest.class)); + public void testSyncLookupRequest() { + assertThat(model, instanceOf(SyncLookupRequest.class)); } /** - * Test the property 'tns' + * Test the property 'phoneNumbers' */ @Test - public void tnsTest() { - assertThat(model.getTns(), instanceOf(List.class)); + public void phoneNumbersTest() { + assertThat(model.getPhoneNumbers(), instanceOf(List.class)); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TnLookupRequestErrorTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TnLookupRequestErrorTest.java deleted file mode 100644 index ebb79794..00000000 --- a/src/test/java/com/bandwidth/sdk/unit/models/TnLookupRequestErrorTest.java +++ /dev/null @@ -1,45 +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.unit.models; - -import org.junit.jupiter.api.Test; - -import com.bandwidth.sdk.model.TnLookupRequestError; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.CoreMatchers.instanceOf; - -/** - * Model tests for TnLookupRequestError - */ -public class TnLookupRequestErrorTest { - private final TnLookupRequestError model = new TnLookupRequestError() - .message("message"); - - /** - * Model tests for TnLookupRequestError - */ - @Test - public void testTnLookupRequestError() { - assertThat(model, instanceOf(TnLookupRequestError.class)); - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - assertThat(model.getMessage(), instanceOf(String.class)); - } - -} diff --git a/src/test/java/com/bandwidth/sdk/utils/CallCleanup.java b/src/test/java/com/bandwidth/sdk/utils/CallCleanup.java index f0ac562d..0e714899 100644 --- a/src/test/java/com/bandwidth/sdk/utils/CallCleanup.java +++ b/src/test/java/com/bandwidth/sdk/utils/CallCleanup.java @@ -9,7 +9,6 @@ import com.bandwidth.sdk.model.CallStateEnum; import com.bandwidth.sdk.model.UpdateCall; import com.bandwidth.sdk.ApiException; -import com.bandwidth.sdk.ApiResponse; import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*; @@ -21,6 +20,7 @@ public class CallCleanup { * * @param callIdList List of Bandwidth call ID's */ + @SuppressWarnings("null") public static final void Cleanup(CallsApiTest testClass, List callIdList) throws Exception { TimeUnit.SECONDS.sleep(TEST_SLEEP); @@ -34,9 +34,7 @@ public static final void Cleanup(CallsApiTest testClass, List callIdList if (!callState.equalsIgnoreCase("disconnected")) { UpdateCall updateCallBody = new UpdateCall(); updateCallBody.setState(CallStateEnum.COMPLETED); - ApiResponse response = testClass.api.updateCallWithHttpInfo(BW_ACCOUNT_ID, - callIdList.get(i), - updateCallBody); + testClass.api.updateCallWithHttpInfo(BW_ACCOUNT_ID, callIdList.get(i), updateCallBody); } } } catch (ApiException e) { @@ -51,6 +49,7 @@ public static final void Cleanup(CallsApiTest testClass, List callIdList * * @param callId Bandwidth call ID */ + @SuppressWarnings("null") public static final void Cleanup(ConferencesApiTest testClass, String callId) throws Exception { TimeUnit.SECONDS.sleep(TEST_SLEEP); @@ -62,9 +61,7 @@ public static final void Cleanup(ConferencesApiTest testClass, String callId) th if (!callState.equalsIgnoreCase("disconnected")) { UpdateCall updateCallBody = new UpdateCall(); updateCallBody.setState(CallStateEnum.COMPLETED); - ApiResponse response = testClass.callsApi.updateCallWithHttpInfo(BW_ACCOUNT_ID, - callId, - updateCallBody); + testClass.callsApi.updateCallWithHttpInfo(BW_ACCOUNT_ID, callId, updateCallBody); } } catch (ApiException e) { System.out.println("API Error: " + e.toString()); @@ -72,6 +69,7 @@ public static final void Cleanup(ConferencesApiTest testClass, String callId) th } } + @SuppressWarnings("null") public static final void Cleanup(RecordingsApiTest testClass, String callId) throws Exception { TimeUnit.SECONDS.sleep(TEST_SLEEP); @@ -83,9 +81,7 @@ public static final void Cleanup(RecordingsApiTest testClass, String callId) thr if (!callState.equalsIgnoreCase("disconnected")) { UpdateCall updateCallBody = new UpdateCall(); updateCallBody.setState(CallStateEnum.COMPLETED); - ApiResponse response = testClass.callsApi.updateCallWithHttpInfo(BW_ACCOUNT_ID, - callId, - updateCallBody); + testClass.callsApi.updateCallWithHttpInfo(BW_ACCOUNT_ID, callId, updateCallBody); } } catch (ApiException e) { System.out.println("API Error: " + e.toString());