From a52de9475c59806cb770a4a88f57a87c0aedf6bb Mon Sep 17 00:00:00 2001 From: Spencer Huyck Date: Thu, 20 Mar 2025 19:13:37 -0700 Subject: [PATCH 1/6] Updating openapi generator for java-v1 to 7.12.0 --- sdks/java-v1/README.md | 8 +- sdks/java-v1/VERSION | 2 +- sdks/java-v1/build.gradle | 2 +- sdks/java-v1/build.sbt | 2 +- sdks/java-v1/docs/AccountApi.md | 345 --- sdks/java-v1/docs/AccountCreateRequest.md | 17 - sdks/java-v1/docs/AccountCreateResponse.md | 16 - sdks/java-v1/docs/AccountGetResponse.md | 15 - sdks/java-v1/docs/AccountResponse.md | 24 - sdks/java-v1/docs/AccountResponseQuotas.md | 19 - sdks/java-v1/docs/AccountResponseUsage.md | 14 - sdks/java-v1/docs/AccountUpdateRequest.md | 16 - sdks/java-v1/docs/AccountVerifyRequest.md | 14 - sdks/java-v1/docs/AccountVerifyResponse.md | 15 - .../docs/AccountVerifyResponseAccount.md | 14 - sdks/java-v1/docs/ApiAppApi.md | 461 ---- sdks/java-v1/docs/ApiAppCreateRequest.md | 20 - sdks/java-v1/docs/ApiAppGetResponse.md | 15 - sdks/java-v1/docs/ApiAppListResponse.md | 16 - sdks/java-v1/docs/ApiAppResponse.md | 23 - sdks/java-v1/docs/ApiAppResponseOAuth.md | 17 - sdks/java-v1/docs/ApiAppResponseOptions.md | 14 - .../docs/ApiAppResponseOwnerAccount.md | 15 - .../ApiAppResponseWhiteLabelingOptions.md | 27 - sdks/java-v1/docs/ApiAppUpdateRequest.md | 20 - sdks/java-v1/docs/BulkSendJobApi.md | 178 -- sdks/java-v1/docs/BulkSendJobGetResponse.md | 17 - ...BulkSendJobGetResponseSignatureRequests.md | 38 - sdks/java-v1/docs/BulkSendJobListResponse.md | 16 - sdks/java-v1/docs/BulkSendJobResponse.md | 17 - sdks/java-v1/docs/BulkSendJobSendResponse.md | 15 - sdks/java-v1/docs/EmbeddedApi.md | 182 -- sdks/java-v1/docs/EmbeddedEditUrlRequest.md | 23 - sdks/java-v1/docs/EmbeddedEditUrlResponse.md | 15 - .../docs/EmbeddedEditUrlResponseEmbedded.md | 15 - sdks/java-v1/docs/EmbeddedSignUrlResponse.md | 15 - .../docs/EmbeddedSignUrlResponseEmbedded.md | 15 - sdks/java-v1/docs/ErrorResponse.md | 14 - sdks/java-v1/docs/ErrorResponseError.md | 16 - sdks/java-v1/docs/EventCallbackRequest.md | 17 - .../java-v1/docs/EventCallbackRequestEvent.md | 47 - .../docs/EventCallbackRequestEventMetadata.md | 17 - sdks/java-v1/docs/FaxApi.md | 424 ---- sdks/java-v1/docs/FaxGetResponse.md | 15 - sdks/java-v1/docs/FaxLineAddUserRequest.md | 16 - sdks/java-v1/docs/FaxLineApi.md | 600 ----- .../docs/FaxLineAreaCodeGetCountryEnum.md | 15 - .../docs/FaxLineAreaCodeGetProvinceEnum.md | 35 - .../docs/FaxLineAreaCodeGetResponse.md | 14 - .../docs/FaxLineAreaCodeGetStateEnum.md | 111 - sdks/java-v1/docs/FaxLineCreateRequest.md | 27 - sdks/java-v1/docs/FaxLineDeleteRequest.md | 14 - sdks/java-v1/docs/FaxLineListResponse.md | 16 - sdks/java-v1/docs/FaxLineRemoveUserRequest.md | 16 - sdks/java-v1/docs/FaxLineResponse.md | 15 - sdks/java-v1/docs/FaxLineResponseFaxLine.md | 17 - sdks/java-v1/docs/FaxListResponse.md | 15 - sdks/java-v1/docs/FaxResponse.md | 24 - sdks/java-v1/docs/FaxResponseTransmission.md | 31 - sdks/java-v1/docs/FaxSendRequest.md | 22 - sdks/java-v1/docs/FileResponse.md | 15 - sdks/java-v1/docs/FileResponseDataUri.md | 14 - sdks/java-v1/docs/ListInfoResponse.md | 17 - sdks/java-v1/docs/OAuthApi.md | 179 -- .../java-v1/docs/OAuthTokenGenerateRequest.md | 18 - sdks/java-v1/docs/OAuthTokenRefreshRequest.md | 17 - sdks/java-v1/docs/OAuthTokenResponse.md | 18 - sdks/java-v1/docs/ReportApi.md | 99 - sdks/java-v1/docs/ReportCreateRequest.md | 25 - sdks/java-v1/docs/ReportCreateResponse.md | 15 - sdks/java-v1/docs/ReportResponse.md | 26 - sdks/java-v1/docs/SignatureRequestApi.md | 2155 ---------------- ...stBulkCreateEmbeddedWithTemplateRequest.md | 26 - ...atureRequestBulkSendWithTemplateRequest.md | 26 - .../SignatureRequestCreateEmbeddedRequest.md | 37 - ...equestCreateEmbeddedWithTemplateRequest.md | 28 - .../SignatureRequestEditEmbeddedRequest.md | 37 - ...eRequestEditEmbeddedWithTemplateRequest.md | 28 - .../docs/SignatureRequestEditRequest.md | 38 - ...SignatureRequestEditWithTemplateRequest.md | 29 - .../docs/SignatureRequestGetResponse.md | 15 - .../docs/SignatureRequestListResponse.md | 16 - .../docs/SignatureRequestRemindRequest.md | 15 - sdks/java-v1/docs/SignatureRequestResponse.md | 38 - .../SignatureRequestResponseAttachment.md | 19 - ...SignatureRequestResponseCustomFieldBase.md | 21 - ...atureRequestResponseCustomFieldCheckbox.md | 15 - ...SignatureRequestResponseCustomFieldText.md | 15 - ...atureRequestResponseCustomFieldTypeEnum.md | 13 - .../docs/SignatureRequestResponseDataBase.md | 18 - .../SignatureRequestResponseDataTypeEnum.md | 27 - ...gnatureRequestResponseDataValueCheckbox.md | 15 - ...reRequestResponseDataValueCheckboxMerge.md | 15 - ...atureRequestResponseDataValueDateSigned.md | 15 - ...gnatureRequestResponseDataValueDropdown.md | 15 - ...gnatureRequestResponseDataValueInitials.md | 16 - .../SignatureRequestResponseDataValueRadio.md | 15 - ...natureRequestResponseDataValueSignature.md | 16 - .../SignatureRequestResponseDataValueText.md | 15 - ...natureRequestResponseDataValueTextMerge.md | 15 - .../SignatureRequestResponseSignatures.md | 32 - .../docs/SignatureRequestSendRequest.md | 39 - ...SignatureRequestSendWithTemplateRequest.md | 30 - .../docs/SignatureRequestUpdateRequest.md | 17 - sdks/java-v1/docs/SubAttachment.md | 17 - sdks/java-v1/docs/SubBulkSignerList.md | 15 - .../docs/SubBulkSignerListCustomField.md | 15 - sdks/java-v1/docs/SubCC.md | 15 - sdks/java-v1/docs/SubCustomField.md | 21 - sdks/java-v1/docs/SubEditorOptions.md | 15 - sdks/java-v1/docs/SubFieldOptions.md | 27 - sdks/java-v1/docs/SubFormFieldGroup.md | 16 - sdks/java-v1/docs/SubFormFieldRule.md | 17 - sdks/java-v1/docs/SubFormFieldRuleAction.md | 26 - sdks/java-v1/docs/SubFormFieldRuleTrigger.md | 29 - .../docs/SubFormFieldsPerDocumentBase.md | 37 - .../docs/SubFormFieldsPerDocumentCheckbox.md | 16 - .../SubFormFieldsPerDocumentCheckboxMerge.md | 14 - .../SubFormFieldsPerDocumentDateSigned.md | 39 - .../docs/SubFormFieldsPerDocumentDropdown.md | 41 - .../docs/SubFormFieldsPerDocumentFontEnum.md | 41 - .../docs/SubFormFieldsPerDocumentHyperlink.md | 41 - .../docs/SubFormFieldsPerDocumentInitials.md | 14 - .../docs/SubFormFieldsPerDocumentRadio.md | 16 - .../docs/SubFormFieldsPerDocumentSignature.md | 14 - .../docs/SubFormFieldsPerDocumentText.md | 64 - .../docs/SubFormFieldsPerDocumentTextMerge.md | 39 - .../docs/SubFormFieldsPerDocumentTypeEnum.md | 29 - sdks/java-v1/docs/SubMergeField.md | 24 - sdks/java-v1/docs/SubOAuth.md | 30 - sdks/java-v1/docs/SubOptions.md | 14 - .../docs/SubSignatureRequestGroupedSigners.md | 16 - .../java-v1/docs/SubSignatureRequestSigner.md | 28 - .../docs/SubSignatureRequestTemplateSigner.md | 28 - sdks/java-v1/docs/SubSigningOptions.md | 31 - sdks/java-v1/docs/SubTeamResponse.md | 15 - sdks/java-v1/docs/SubTemplateRole.md | 15 - sdks/java-v1/docs/SubUnclaimedDraftSigner.md | 16 - .../docs/SubUnclaimedDraftTemplateSigner.md | 16 - sdks/java-v1/docs/SubWhiteLabelingOptions.md | 39 - sdks/java-v1/docs/TeamAddMemberRequest.md | 27 - sdks/java-v1/docs/TeamApi.md | 837 ------- sdks/java-v1/docs/TeamCreateRequest.md | 14 - sdks/java-v1/docs/TeamGetInfoResponse.md | 15 - sdks/java-v1/docs/TeamGetResponse.md | 15 - sdks/java-v1/docs/TeamInfoResponse.md | 18 - sdks/java-v1/docs/TeamInviteResponse.md | 19 - sdks/java-v1/docs/TeamInvitesResponse.md | 15 - sdks/java-v1/docs/TeamMemberResponse.md | 16 - sdks/java-v1/docs/TeamMembersResponse.md | 16 - sdks/java-v1/docs/TeamParentResponse.md | 15 - sdks/java-v1/docs/TeamRemoveMemberRequest.md | 29 - sdks/java-v1/docs/TeamResponse.md | 17 - sdks/java-v1/docs/TeamSubTeamsResponse.md | 16 - sdks/java-v1/docs/TeamUpdateRequest.md | 14 - sdks/java-v1/docs/TemplateAddUserRequest.md | 16 - sdks/java-v1/docs/TemplateApi.md | 1077 -------- .../TemplateCreateEmbeddedDraftRequest.md | 38 - .../TemplateCreateEmbeddedDraftResponse.md | 15 - ...lateCreateEmbeddedDraftResponseTemplate.md | 17 - sdks/java-v1/docs/TemplateCreateRequest.md | 31 - sdks/java-v1/docs/TemplateCreateResponse.md | 15 - .../docs/TemplateCreateResponseTemplate.md | 14 - sdks/java-v1/docs/TemplateEditResponse.md | 14 - sdks/java-v1/docs/TemplateGetResponse.md | 15 - sdks/java-v1/docs/TemplateListResponse.md | 16 - .../java-v1/docs/TemplateRemoveUserRequest.md | 15 - sdks/java-v1/docs/TemplateResponse.md | 29 - sdks/java-v1/docs/TemplateResponseAccount.md | 19 - .../docs/TemplateResponseAccountQuota.md | 17 - sdks/java-v1/docs/TemplateResponseCCRole.md | 14 - sdks/java-v1/docs/TemplateResponseDocument.md | 19 - ...TemplateResponseDocumentCustomFieldBase.md | 23 - ...lateResponseDocumentCustomFieldCheckbox.md | 14 - ...TemplateResponseDocumentCustomFieldText.md | 18 - .../TemplateResponseDocumentFieldGroup.md | 15 - .../TemplateResponseDocumentFieldGroupRule.md | 15 - .../TemplateResponseDocumentFormFieldBase.md | 22 - ...mplateResponseDocumentFormFieldCheckbox.md | 15 - ...lateResponseDocumentFormFieldDateSigned.md | 15 - ...mplateResponseDocumentFormFieldDropdown.md | 15 - ...plateResponseDocumentFormFieldHyperlink.md | 19 - ...mplateResponseDocumentFormFieldInitials.md | 15 - .../TemplateResponseDocumentFormFieldRadio.md | 15 - ...plateResponseDocumentFormFieldSignature.md | 15 - .../TemplateResponseDocumentFormFieldText.md | 37 - ...TemplateResponseDocumentStaticFieldBase.md | 23 - ...lateResponseDocumentStaticFieldCheckbox.md | 14 - ...teResponseDocumentStaticFieldDateSigned.md | 14 - ...lateResponseDocumentStaticFieldDropdown.md | 14 - ...ateResponseDocumentStaticFieldHyperlink.md | 14 - ...lateResponseDocumentStaticFieldInitials.md | 14 - ...emplateResponseDocumentStaticFieldRadio.md | 14 - ...ateResponseDocumentStaticFieldSignature.md | 14 - ...TemplateResponseDocumentStaticFieldText.md | 14 - .../TemplateResponseFieldAvgTextLength.md | 15 - .../docs/TemplateResponseSignerRole.md | 15 - .../docs/TemplateUpdateFilesRequest.md | 19 - .../docs/TemplateUpdateFilesResponse.md | 14 - .../TemplateUpdateFilesResponseTemplate.md | 15 - sdks/java-v1/docs/UnclaimedDraftApi.md | 400 --- .../UnclaimedDraftCreateEmbeddedRequest.md | 58 - ...dDraftCreateEmbeddedWithTemplateRequest.md | 43 - .../docs/UnclaimedDraftCreateRequest.md | 46 - .../docs/UnclaimedDraftCreateResponse.md | 15 - .../UnclaimedDraftEditAndResendRequest.md | 21 - sdks/java-v1/docs/UnclaimedDraftResponse.md | 19 - sdks/java-v1/docs/WarningResponse.md | 15 - sdks/java-v1/gradle.properties | 2 +- sdks/java-v1/openapi-config.yaml | 2 +- sdks/java-v1/run-build | 2 +- sdks/java-v1/src/main/AndroidManifest.xml | 3 - .../main/java/com/dropbox/sign/ApiClient.java | 1328 ---------- .../java/com/dropbox/sign/ApiException.java | 128 - .../java/com/dropbox/sign/ApiResponse.java | 73 - .../java/com/dropbox/sign/Configuration.java | 42 - .../com/dropbox/sign/EventCallbackHelper.java | 63 - .../src/main/java/com/dropbox/sign/JSON.java | 261 -- .../com/dropbox/sign/JavaTimeFormatter.java | 72 - .../src/main/java/com/dropbox/sign/Pair.java | 58 - .../com/dropbox/sign/RFC3339DateFormat.java | 58 - .../com/dropbox/sign/ServerConfiguration.java | 79 - .../java/com/dropbox/sign/ServerVariable.java | 37 - .../java/com/dropbox/sign/StringUtil.java | 83 - .../java/com/dropbox/sign/api/AccountApi.java | 372 --- .../java/com/dropbox/sign/api/ApiAppApi.java | 452 ---- .../com/dropbox/sign/api/BulkSendJobApi.java | 298 --- .../com/dropbox/sign/api/EmbeddedApi.java | 208 -- .../java/com/dropbox/sign/api/FaxApi.java | 425 ---- .../java/com/dropbox/sign/api/FaxLineApi.java | 707 ------ .../java/com/dropbox/sign/api/OAuthApi.java | 190 -- .../java/com/dropbox/sign/api/ReportApi.java | 120 - .../dropbox/sign/api/SignatureRequestApi.java | 1950 --------------- .../java/com/dropbox/sign/api/TeamApi.java | 897 ------- .../com/dropbox/sign/api/TemplateApi.java | 1090 --------- .../dropbox/sign/api/UnclaimedDraftApi.java | 399 --- .../com/dropbox/sign/auth/ApiKeyAuth.java | 86 - .../com/dropbox/sign/auth/Authentication.java | 37 - .../com/dropbox/sign/auth/HttpBasicAuth.java | 64 - .../com/dropbox/sign/auth/HttpBearerAuth.java | 73 - .../sign/model/AbstractOpenApiSchema.java | 147 -- .../sign/model/AccountCreateRequest.java | 316 --- .../sign/model/AccountCreateResponse.java | 273 --- .../sign/model/AccountGetResponse.java | 224 -- .../dropbox/sign/model/AccountResponse.java | 654 ----- .../sign/model/AccountResponseQuotas.java | 430 ---- .../sign/model/AccountResponseUsage.java | 167 -- .../sign/model/AccountUpdateRequest.java | 265 -- .../sign/model/AccountVerifyRequest.java | 168 -- .../sign/model/AccountVerifyResponse.java | 224 -- .../model/AccountVerifyResponseAccount.java | 170 -- .../sign/model/ApiAppCreateRequest.java | 468 ---- .../dropbox/sign/model/ApiAppGetResponse.java | 224 -- .../sign/model/ApiAppListResponse.java | 281 --- .../dropbox/sign/model/ApiAppResponse.java | 618 ----- .../sign/model/ApiAppResponseOAuth.java | 323 --- .../sign/model/ApiAppResponseOptions.java | 173 -- .../model/ApiAppResponseOwnerAccount.java | 219 -- .../ApiAppResponseWhiteLabelingOptions.java | 897 ------- .../sign/model/ApiAppUpdateRequest.java | 466 ---- .../sign/model/BulkSendJobGetResponse.java | 338 --- ...lkSendJobGetResponseSignatureRequests.java | 1456 ----------- .../sign/model/BulkSendJobListResponse.java | 284 --- .../sign/model/BulkSendJobResponse.java | 315 --- .../sign/model/BulkSendJobSendResponse.java | 227 -- .../sign/model/EmbeddedEditUrlRequest.java | 646 ----- .../sign/model/EmbeddedEditUrlResponse.java | 225 -- .../EmbeddedEditUrlResponseEmbedded.java | 218 -- .../sign/model/EmbeddedSignUrlResponse.java | 225 -- .../EmbeddedSignUrlResponseEmbedded.java | 218 -- .../com/dropbox/sign/model/ErrorResponse.java | 166 -- .../sign/model/ErrorResponseError.java | 267 -- .../sign/model/EventCallbackRequest.java | 308 --- .../sign/model/EventCallbackRequestEvent.java | 396 --- .../EventCallbackRequestEventMetadata.java | 332 --- .../dropbox/sign/model/FaxGetResponse.java | 221 -- .../sign/model/FaxLineAddUserRequest.java | 265 -- .../model/FaxLineAreaCodeGetCountryEnum.java | 51 - .../model/FaxLineAreaCodeGetProvinceEnum.java | 71 - .../model/FaxLineAreaCodeGetResponse.java | 180 -- .../model/FaxLineAreaCodeGetStateEnum.java | 147 -- .../sign/model/FaxLineCreateRequest.java | 348 --- .../sign/model/FaxLineDeleteRequest.java | 166 -- .../sign/model/FaxLineListResponse.java | 275 --- .../sign/model/FaxLineRemoveUserRequest.java | 266 -- .../dropbox/sign/model/FaxLineResponse.java | 211 -- .../sign/model/FaxLineResponseFaxLine.java | 320 --- .../dropbox/sign/model/FaxListResponse.java | 224 -- .../com/dropbox/sign/model/FaxResponse.java | 674 ----- .../sign/model/FaxResponseTransmission.java | 313 --- .../dropbox/sign/model/FaxSendRequest.java | 578 ----- .../com/dropbox/sign/model/FileResponse.java | 214 -- .../sign/model/FileResponseDataUri.java | 166 -- .../dropbox/sign/model/ListInfoResponse.java | 311 --- .../sign/model/OAuthTokenGenerateRequest.java | 364 --- .../sign/model/OAuthTokenRefreshRequest.java | 321 --- .../sign/model/OAuthTokenResponse.java | 359 --- .../sign/model/ReportCreateRequest.java | 314 --- .../sign/model/ReportCreateResponse.java | 224 -- .../dropbox/sign/model/ReportResponse.java | 357 --- ...BulkCreateEmbeddedWithTemplateRequest.java | 875 ------- ...ureRequestBulkSendWithTemplateRequest.java | 853 ------- ...SignatureRequestCreateEmbeddedRequest.java | 1474 ----------- ...uestCreateEmbeddedWithTemplateRequest.java | 963 -------- .../SignatureRequestEditEmbeddedRequest.java | 1471 ----------- ...equestEditEmbeddedWithTemplateRequest.java | 958 -------- .../model/SignatureRequestEditRequest.java | 1497 ------------ ...gnatureRequestEditWithTemplateRequest.java | 983 -------- .../model/SignatureRequestGetResponse.java | 228 -- .../model/SignatureRequestListResponse.java | 291 --- .../model/SignatureRequestRemindRequest.java | 220 -- .../sign/model/SignatureRequestResponse.java | 1434 ----------- .../SignatureRequestResponseAttachment.java | 418 ---- ...gnatureRequestResponseCustomFieldBase.java | 388 --- ...ureRequestResponseCustomFieldCheckbox.java | 242 -- ...gnatureRequestResponseCustomFieldText.java | 240 -- ...ureRequestResponseCustomFieldTypeEnum.java | 50 - .../SignatureRequestResponseDataBase.java | 403 --- .../SignatureRequestResponseDataTypeEnum.java | 64 - ...atureRequestResponseDataValueCheckbox.java | 238 -- ...RequestResponseDataValueCheckboxMerge.java | 242 -- ...ureRequestResponseDataValueDateSigned.java | 239 -- ...atureRequestResponseDataValueDropdown.java | 238 -- ...atureRequestResponseDataValueInitials.java | 286 --- ...ignatureRequestResponseDataValueRadio.java | 236 -- ...tureRequestResponseDataValueSignature.java | 288 --- ...SignatureRequestResponseDataValueText.java | 236 -- ...tureRequestResponseDataValueTextMerge.java | 239 -- .../SignatureRequestResponseSignatures.java | 1069 -------- .../model/SignatureRequestSendRequest.java | 1559 ------------ ...gnatureRequestSendWithTemplateRequest.java | 1047 -------- .../model/SignatureRequestUpdateRequest.java | 318 --- .../com/dropbox/sign/model/SubAttachment.java | 312 --- .../dropbox/sign/model/SubBulkSignerList.java | 235 -- .../model/SubBulkSignerListCustomField.java | 218 -- .../java/com/dropbox/sign/model/SubCC.java | 215 -- .../dropbox/sign/model/SubCustomField.java | 325 --- .../dropbox/sign/model/SubEditorOptions.java | 221 -- .../dropbox/sign/model/SubFieldOptions.java | 217 -- .../dropbox/sign/model/SubFormFieldGroup.java | 272 --- .../dropbox/sign/model/SubFormFieldRule.java | 331 --- .../sign/model/SubFormFieldRuleAction.java | 348 --- .../sign/model/SubFormFieldRuleTrigger.java | 382 --- .../model/SubFormFieldsPerDocumentBase.java | 714 ------ .../SubFormFieldsPerDocumentCheckbox.java | 284 --- ...SubFormFieldsPerDocumentCheckboxMerge.java | 190 -- .../SubFormFieldsPerDocumentDateSigned.java | 351 --- .../SubFormFieldsPerDocumentDropdown.java | 453 ---- .../SubFormFieldsPerDocumentFontEnum.java | 77 - .../SubFormFieldsPerDocumentHyperlink.java | 446 ---- .../SubFormFieldsPerDocumentInitials.java | 186 -- .../model/SubFormFieldsPerDocumentRadio.java | 286 --- .../SubFormFieldsPerDocumentSignature.java | 186 -- .../model/SubFormFieldsPerDocumentText.java | 825 ------- .../SubFormFieldsPerDocumentTextMerge.java | 351 --- .../SubFormFieldsPerDocumentTypeEnum.java | 65 - .../com/dropbox/sign/model/SubMergeField.java | 247 -- .../java/com/dropbox/sign/model/SubOAuth.java | 271 --- .../com/dropbox/sign/model/SubOptions.java | 171 -- .../SubSignatureRequestGroupedSigners.java | 277 --- .../sign/model/SubSignatureRequestSigner.java | 460 ---- .../SubSignatureRequestTemplateSigner.java | 465 ---- .../dropbox/sign/model/SubSigningOptions.java | 397 --- .../dropbox/sign/model/SubTeamResponse.java | 210 -- .../dropbox/sign/model/SubTemplateRole.java | 211 -- .../sign/model/SubUnclaimedDraftSigner.java | 264 -- .../SubUnclaimedDraftTemplateSigner.java | 267 -- .../sign/model/SubWhiteLabelingOptions.java | 972 -------- .../sign/model/TeamAddMemberRequest.java | 308 --- .../dropbox/sign/model/TeamCreateRequest.java | 165 -- .../sign/model/TeamGetInfoResponse.java | 224 -- .../dropbox/sign/model/TeamGetResponse.java | 221 -- .../dropbox/sign/model/TeamInfoResponse.java | 357 --- .../sign/model/TeamInviteResponse.java | 403 --- .../sign/model/TeamInvitesResponse.java | 234 -- .../sign/model/TeamMemberResponse.java | 263 -- .../sign/model/TeamMembersResponse.java | 283 --- .../sign/model/TeamParentResponse.java | 213 -- .../sign/model/TeamRemoveMemberRequest.java | 413 ---- .../com/dropbox/sign/model/TeamResponse.java | 337 --- .../sign/model/TeamSubTeamsResponse.java | 283 --- .../dropbox/sign/model/TeamUpdateRequest.java | 165 -- .../sign/model/TemplateAddUserRequest.java | 269 -- .../TemplateCreateEmbeddedDraftRequest.java | 1499 ------------ .../TemplateCreateEmbeddedDraftResponse.java | 228 -- ...teCreateEmbeddedDraftResponseTemplate.java | 335 --- .../sign/model/TemplateCreateRequest.java | 1125 --------- .../sign/model/TemplateCreateResponse.java | 225 -- .../model/TemplateCreateResponseTemplate.java | 170 -- .../sign/model/TemplateEditResponse.java | 168 -- .../sign/model/TemplateGetResponse.java | 224 -- .../sign/model/TemplateListResponse.java | 283 --- .../sign/model/TemplateRemoveUserRequest.java | 221 -- .../dropbox/sign/model/TemplateResponse.java | 987 -------- .../sign/model/TemplateResponseAccount.java | 408 ---- .../model/TemplateResponseAccountQuota.java | 335 --- .../sign/model/TemplateResponseCCRole.java | 166 -- .../sign/model/TemplateResponseDocument.java | 451 ---- ...mplateResponseDocumentCustomFieldBase.java | 623 ----- ...teResponseDocumentCustomFieldCheckbox.java | 195 -- ...mplateResponseDocumentCustomFieldText.java | 394 --- .../TemplateResponseDocumentFieldGroup.java | 216 -- ...emplateResponseDocumentFieldGroupRule.java | 229 -- ...TemplateResponseDocumentFormFieldBase.java | 590 ----- ...lateResponseDocumentFormFieldCheckbox.java | 249 -- ...teResponseDocumentFormFieldDateSigned.java | 250 -- ...lateResponseDocumentFormFieldDropdown.java | 249 -- ...ateResponseDocumentFormFieldHyperlink.java | 456 ---- ...lateResponseDocumentFormFieldInitials.java | 249 -- ...emplateResponseDocumentFormFieldRadio.java | 247 -- ...ateResponseDocumentFormFieldSignature.java | 250 -- ...TemplateResponseDocumentFormFieldText.java | 557 ----- ...mplateResponseDocumentStaticFieldBase.java | 637 ----- ...teResponseDocumentStaticFieldCheckbox.java | 201 -- ...ResponseDocumentStaticFieldDateSigned.java | 203 -- ...teResponseDocumentStaticFieldDropdown.java | 201 -- ...eResponseDocumentStaticFieldHyperlink.java | 201 -- ...teResponseDocumentStaticFieldInitials.java | 201 -- ...plateResponseDocumentStaticFieldRadio.java | 200 -- ...eResponseDocumentStaticFieldSignature.java | 201 -- ...mplateResponseDocumentStaticFieldText.java | 199 -- .../TemplateResponseFieldAvgTextLength.java | 221 -- .../model/TemplateResponseSignerRole.java | 215 -- .../model/TemplateUpdateFilesRequest.java | 427 ---- .../model/TemplateUpdateFilesResponse.java | 168 -- .../TemplateUpdateFilesResponseTemplate.java | 232 -- .../UnclaimedDraftCreateEmbeddedRequest.java | 2157 ----------------- ...raftCreateEmbeddedWithTemplateRequest.java | 1779 -------------- .../model/UnclaimedDraftCreateRequest.java | 1497 ------------ .../model/UnclaimedDraftCreateResponse.java | 229 -- .../UnclaimedDraftEditAndResendRequest.java | 557 ----- .../sign/model/UnclaimedDraftResponse.java | 433 ---- .../dropbox/sign/model/WarningResponse.java | 219 -- .../BeanValidationException.mustache | 4 +- sdks/java-v1/templates/JSON.mustache | 2 + .../RFC3339InstantDeserializer.mustache | 89 + .../templates/RFC3339JavaTimeModule.mustache | 20 + sdks/java-v1/templates/build.gradle.mustache | 12 +- sdks/java-v1/templates/javaBuilder.mustache | 10 +- .../apache-httpclient/ApiClient.mustache | 9 +- .../libraries/apache-httpclient/api.mustache | 6 +- .../apache-httpclient/api_test.mustache | 4 +- .../libraries/apache-httpclient/pom.mustache | 2 + .../libraries/feign/ApiClient.mustache | 6 + .../templates/libraries/feign/README.mustache | 2 +- .../templates/libraries/feign/api.mustache | 20 +- .../libraries/feign/api_test.mustache | 4 +- .../libraries/feign/build.gradle.mustache | 12 +- .../libraries/feign/build.sbt.mustache | 5 +- .../templates/libraries/feign/model.mustache | 4 +- .../templates/libraries/feign/pojo.mustache | 25 +- .../templates/libraries/feign/pom.mustache | 16 +- .../google-api-client/ApiClient.mustache | 5 + .../libraries/jersey2/ApiClient.mustache | 56 +- .../templates/libraries/jersey2/JSON.mustache | 3 +- .../libraries/jersey2/anyof_model.mustache | 44 +- .../templates/libraries/jersey2/api.mustache | 18 +- .../libraries/jersey2/api_test.mustache | 4 +- .../libraries/jersey2/build.gradle.mustache | 9 +- .../libraries/jersey2/build.sbt.mustache | 3 + .../libraries/jersey2/model.mustache | 4 +- .../libraries/jersey2/oneof_model.mustache | 19 +- .../templates/libraries/jersey2/pojo.mustache | 25 +- .../templates/libraries/jersey2/pom.mustache | 14 + .../libraries/jersey3/ApiClient.mustache | 56 +- .../templates/libraries/jersey3/JSON.mustache | 3 +- .../libraries/jersey3/anyof_model.mustache | 44 +- .../templates/libraries/jersey3/api.mustache | 14 +- .../libraries/jersey3/build.gradle.mustache | 6 + .../libraries/jersey3/build.sbt.mustache | 3 + .../libraries/jersey3/oneof_model.mustache | 19 +- .../templates/libraries/jersey3/pojo.mustache | 17 +- .../templates/libraries/jersey3/pom.mustache | 14 +- .../libraries/microprofile/api.mustache | 15 +- .../beanValidationCookieParams.mustache | 1 + .../microprofile/cookieParams.mustache | 1 + .../microprofile/cookieParamsImpl.mustache | 1 + .../libraries/microprofile/enumClass.mustache | 4 +- .../microprofile/enumOuterClass.mustache | 4 +- .../libraries/microprofile/model.mustache | 12 +- .../libraries/microprofile/pojo.mustache | 29 +- .../microprofile/pojoOverrides.mustache | 64 + .../libraries/microprofile/pom.mustache | 17 +- .../libraries/microprofile/pom_3.0.mustache | 28 +- .../libraries/native/ApiClient.mustache | 9 +- .../templates/libraries/native/JSON.mustache | 5 + .../libraries/native/anyof_model.mustache | 15 +- .../templates/libraries/native/api.mustache | 51 +- .../libraries/native/api_test.mustache | 4 +- .../libraries/native/build.gradle.mustache | 20 +- .../templates/libraries/native/model.mustache | 4 +- .../libraries/native/modelEnum.mustache | 2 +- .../libraries/native/oneof_model.mustache | 15 +- .../templates/libraries/native/pojo.mustache | 33 +- .../templates/libraries/native/pom.mustache | 13 + .../libraries/okhttp-gson/ApiClient.mustache | 5 +- .../libraries/okhttp-gson/JSON.mustache | 2 + .../libraries/okhttp-gson/README.mustache | 2 +- .../okhttp-gson/anyof_model.mustache | 7 +- .../libraries/okhttp-gson/api.mustache | 48 +- .../libraries/okhttp-gson/api_test.mustache | 4 +- .../okhttp-gson/build.gradle.mustache | 2 +- .../libraries/okhttp-gson/build.sbt.mustache | 2 +- .../libraries/okhttp-gson/model.mustache | 4 +- .../libraries/okhttp-gson/modelEnum.mustache | 2 +- .../okhttp-gson/modelInnerEnum.mustache | 2 +- .../okhttp-gson/oneof_model.mustache | 6 +- .../libraries/okhttp-gson/pojo.mustache | 22 +- .../libraries/okhttp-gson/pom.mustache | 4 +- .../rest-assured/JacksonObjectMapper.mustache | 2 +- .../libraries/rest-assured/api.mustache | 14 +- .../libraries/rest-assured/api_test.mustache | 4 +- .../libraries/rest-assured/pom.mustache | 2 + .../libraries/restclient/ApiClient.mustache | 56 +- .../libraries/restclient/api.mustache | 105 +- .../libraries/restclient/api_test.mustache | 11 +- .../libraries/restclient/auth/OAuth.mustache | 36 +- .../libraries/restclient/pom.mustache | 4 +- .../libraries/resteasy/JSON.mustache | 2 +- .../additional_properties.mustache | 45 + .../libraries/resttemplate/api.mustache | 4 +- .../libraries/resttemplate/api_test.mustache | 4 +- .../resttemplate/auth/OAuth.mustache | 2 +- .../resttemplate/build.gradle.mustache | 9 +- .../libraries/resttemplate/model.mustache | 78 + .../libraries/resttemplate/pojo.mustache | 620 +++++ .../libraries/resttemplate/pom.mustache | 6 +- .../libraries/retrofit2/ApiClient.mustache | 2 + .../libraries/retrofit2/JSON.mustache | 2 + .../libraries/retrofit2/JSON_jackson.mustache | 2 +- .../libraries/retrofit2/api.mustache | 4 +- .../libraries/retrofit2/api_test.mustache | 4 +- .../libraries/retrofit2/play26/api.mustache | 4 +- .../libraries/retrofit2/pom.mustache | 2 + .../libraries/vertx/ApiClient.mustache | 2 +- .../libraries/webclient/ApiClient.mustache | 15 +- .../webclient/additional_properties.mustache | 45 + .../libraries/webclient/api.mustache | 93 +- .../libraries/webclient/api_test.mustache | 4 +- .../libraries/webclient/build.gradle.mustache | 2 + .../libraries/webclient/model.mustache | 78 + .../libraries/webclient/pojo.mustache | 620 +++++ sdks/java-v1/templates/model.mustache | 4 +- sdks/java-v1/templates/modelEnum.mustache | 2 +- .../java-v1/templates/modelInnerEnum.mustache | 4 +- .../nullable_var_annotations.mustache | 1 + sdks/java-v1/templates/pojo.mustache | 21 +- sdks/java-v1/templates/pom.mustache | 29 +- .../templates/typeInfoAnnotation.mustache | 6 + 549 files changed, 2627 insertions(+), 97411 deletions(-) delete mode 100644 sdks/java-v1/docs/AccountApi.md delete mode 100644 sdks/java-v1/docs/AccountCreateRequest.md delete mode 100644 sdks/java-v1/docs/AccountCreateResponse.md delete mode 100644 sdks/java-v1/docs/AccountGetResponse.md delete mode 100644 sdks/java-v1/docs/AccountResponse.md delete mode 100644 sdks/java-v1/docs/AccountResponseQuotas.md delete mode 100644 sdks/java-v1/docs/AccountResponseUsage.md delete mode 100644 sdks/java-v1/docs/AccountUpdateRequest.md delete mode 100644 sdks/java-v1/docs/AccountVerifyRequest.md delete mode 100644 sdks/java-v1/docs/AccountVerifyResponse.md delete mode 100644 sdks/java-v1/docs/AccountVerifyResponseAccount.md delete mode 100644 sdks/java-v1/docs/ApiAppApi.md delete mode 100644 sdks/java-v1/docs/ApiAppCreateRequest.md delete mode 100644 sdks/java-v1/docs/ApiAppGetResponse.md delete mode 100644 sdks/java-v1/docs/ApiAppListResponse.md delete mode 100644 sdks/java-v1/docs/ApiAppResponse.md delete mode 100644 sdks/java-v1/docs/ApiAppResponseOAuth.md delete mode 100644 sdks/java-v1/docs/ApiAppResponseOptions.md delete mode 100644 sdks/java-v1/docs/ApiAppResponseOwnerAccount.md delete mode 100644 sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md delete mode 100644 sdks/java-v1/docs/ApiAppUpdateRequest.md delete mode 100644 sdks/java-v1/docs/BulkSendJobApi.md delete mode 100644 sdks/java-v1/docs/BulkSendJobGetResponse.md delete mode 100644 sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md delete mode 100644 sdks/java-v1/docs/BulkSendJobListResponse.md delete mode 100644 sdks/java-v1/docs/BulkSendJobResponse.md delete mode 100644 sdks/java-v1/docs/BulkSendJobSendResponse.md delete mode 100644 sdks/java-v1/docs/EmbeddedApi.md delete mode 100644 sdks/java-v1/docs/EmbeddedEditUrlRequest.md delete mode 100644 sdks/java-v1/docs/EmbeddedEditUrlResponse.md delete mode 100644 sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md delete mode 100644 sdks/java-v1/docs/EmbeddedSignUrlResponse.md delete mode 100644 sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md delete mode 100644 sdks/java-v1/docs/ErrorResponse.md delete mode 100644 sdks/java-v1/docs/ErrorResponseError.md delete mode 100644 sdks/java-v1/docs/EventCallbackRequest.md delete mode 100644 sdks/java-v1/docs/EventCallbackRequestEvent.md delete mode 100644 sdks/java-v1/docs/EventCallbackRequestEventMetadata.md delete mode 100644 sdks/java-v1/docs/FaxApi.md delete mode 100644 sdks/java-v1/docs/FaxGetResponse.md delete mode 100644 sdks/java-v1/docs/FaxLineAddUserRequest.md delete mode 100644 sdks/java-v1/docs/FaxLineApi.md delete mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md delete mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md delete mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md delete mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md delete mode 100644 sdks/java-v1/docs/FaxLineCreateRequest.md delete mode 100644 sdks/java-v1/docs/FaxLineDeleteRequest.md delete mode 100644 sdks/java-v1/docs/FaxLineListResponse.md delete mode 100644 sdks/java-v1/docs/FaxLineRemoveUserRequest.md delete mode 100644 sdks/java-v1/docs/FaxLineResponse.md delete mode 100644 sdks/java-v1/docs/FaxLineResponseFaxLine.md delete mode 100644 sdks/java-v1/docs/FaxListResponse.md delete mode 100644 sdks/java-v1/docs/FaxResponse.md delete mode 100644 sdks/java-v1/docs/FaxResponseTransmission.md delete mode 100644 sdks/java-v1/docs/FaxSendRequest.md delete mode 100644 sdks/java-v1/docs/FileResponse.md delete mode 100644 sdks/java-v1/docs/FileResponseDataUri.md delete mode 100644 sdks/java-v1/docs/ListInfoResponse.md delete mode 100644 sdks/java-v1/docs/OAuthApi.md delete mode 100644 sdks/java-v1/docs/OAuthTokenGenerateRequest.md delete mode 100644 sdks/java-v1/docs/OAuthTokenRefreshRequest.md delete mode 100644 sdks/java-v1/docs/OAuthTokenResponse.md delete mode 100644 sdks/java-v1/docs/ReportApi.md delete mode 100644 sdks/java-v1/docs/ReportCreateRequest.md delete mode 100644 sdks/java-v1/docs/ReportCreateResponse.md delete mode 100644 sdks/java-v1/docs/ReportResponse.md delete mode 100644 sdks/java-v1/docs/SignatureRequestApi.md delete mode 100644 sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestEditRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestGetResponse.md delete mode 100644 sdks/java-v1/docs/SignatureRequestListResponse.md delete mode 100644 sdks/java-v1/docs/SignatureRequestRemindRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponse.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseAttachment.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataBase.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueText.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md delete mode 100644 sdks/java-v1/docs/SignatureRequestResponseSignatures.md delete mode 100644 sdks/java-v1/docs/SignatureRequestSendRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/SignatureRequestUpdateRequest.md delete mode 100644 sdks/java-v1/docs/SubAttachment.md delete mode 100644 sdks/java-v1/docs/SubBulkSignerList.md delete mode 100644 sdks/java-v1/docs/SubBulkSignerListCustomField.md delete mode 100644 sdks/java-v1/docs/SubCC.md delete mode 100644 sdks/java-v1/docs/SubCustomField.md delete mode 100644 sdks/java-v1/docs/SubEditorOptions.md delete mode 100644 sdks/java-v1/docs/SubFieldOptions.md delete mode 100644 sdks/java-v1/docs/SubFormFieldGroup.md delete mode 100644 sdks/java-v1/docs/SubFormFieldRule.md delete mode 100644 sdks/java-v1/docs/SubFormFieldRuleAction.md delete mode 100644 sdks/java-v1/docs/SubFormFieldRuleTrigger.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentText.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md delete mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md delete mode 100644 sdks/java-v1/docs/SubMergeField.md delete mode 100644 sdks/java-v1/docs/SubOAuth.md delete mode 100644 sdks/java-v1/docs/SubOptions.md delete mode 100644 sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md delete mode 100644 sdks/java-v1/docs/SubSignatureRequestSigner.md delete mode 100644 sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md delete mode 100644 sdks/java-v1/docs/SubSigningOptions.md delete mode 100644 sdks/java-v1/docs/SubTeamResponse.md delete mode 100644 sdks/java-v1/docs/SubTemplateRole.md delete mode 100644 sdks/java-v1/docs/SubUnclaimedDraftSigner.md delete mode 100644 sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md delete mode 100644 sdks/java-v1/docs/SubWhiteLabelingOptions.md delete mode 100644 sdks/java-v1/docs/TeamAddMemberRequest.md delete mode 100644 sdks/java-v1/docs/TeamApi.md delete mode 100644 sdks/java-v1/docs/TeamCreateRequest.md delete mode 100644 sdks/java-v1/docs/TeamGetInfoResponse.md delete mode 100644 sdks/java-v1/docs/TeamGetResponse.md delete mode 100644 sdks/java-v1/docs/TeamInfoResponse.md delete mode 100644 sdks/java-v1/docs/TeamInviteResponse.md delete mode 100644 sdks/java-v1/docs/TeamInvitesResponse.md delete mode 100644 sdks/java-v1/docs/TeamMemberResponse.md delete mode 100644 sdks/java-v1/docs/TeamMembersResponse.md delete mode 100644 sdks/java-v1/docs/TeamParentResponse.md delete mode 100644 sdks/java-v1/docs/TeamRemoveMemberRequest.md delete mode 100644 sdks/java-v1/docs/TeamResponse.md delete mode 100644 sdks/java-v1/docs/TeamSubTeamsResponse.md delete mode 100644 sdks/java-v1/docs/TeamUpdateRequest.md delete mode 100644 sdks/java-v1/docs/TemplateAddUserRequest.md delete mode 100644 sdks/java-v1/docs/TemplateApi.md delete mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md delete mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md delete mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md delete mode 100644 sdks/java-v1/docs/TemplateCreateRequest.md delete mode 100644 sdks/java-v1/docs/TemplateCreateResponse.md delete mode 100644 sdks/java-v1/docs/TemplateCreateResponseTemplate.md delete mode 100644 sdks/java-v1/docs/TemplateEditResponse.md delete mode 100644 sdks/java-v1/docs/TemplateGetResponse.md delete mode 100644 sdks/java-v1/docs/TemplateListResponse.md delete mode 100644 sdks/java-v1/docs/TemplateRemoveUserRequest.md delete mode 100644 sdks/java-v1/docs/TemplateResponse.md delete mode 100644 sdks/java-v1/docs/TemplateResponseAccount.md delete mode 100644 sdks/java-v1/docs/TemplateResponseAccountQuota.md delete mode 100644 sdks/java-v1/docs/TemplateResponseCCRole.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocument.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md delete mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md delete mode 100644 sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md delete mode 100644 sdks/java-v1/docs/TemplateResponseSignerRole.md delete mode 100644 sdks/java-v1/docs/TemplateUpdateFilesRequest.md delete mode 100644 sdks/java-v1/docs/TemplateUpdateFilesResponse.md delete mode 100644 sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftApi.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateRequest.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateResponse.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md delete mode 100644 sdks/java-v1/docs/UnclaimedDraftResponse.md delete mode 100644 sdks/java-v1/docs/WarningResponse.md delete mode 100644 sdks/java-v1/src/main/AndroidManifest.xml delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java delete mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java create mode 100644 sdks/java-v1/templates/RFC3339InstantDeserializer.mustache create mode 100644 sdks/java-v1/templates/RFC3339JavaTimeModule.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/model.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/pojo.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/additional_properties.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/model.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/pojo.mustache create mode 100644 sdks/java-v1/templates/nullable_var_annotations.mustache diff --git a/sdks/java-v1/README.md b/sdks/java-v1/README.md index 69fa45d1d..a59c05565 100644 --- a/sdks/java-v1/README.md +++ b/sdks/java-v1/README.md @@ -55,7 +55,7 @@ Add this dependency to your project's POM: com.dropbox.sign dropbox-sign - 1.8-dev + 1.8.1-dev compile ``` @@ -71,7 +71,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "com.dropbox.sign:dropbox-sign:1.8-dev" + implementation "com.dropbox.sign:dropbox-sign:1.8.1-dev" } ``` @@ -85,7 +85,7 @@ mvn clean package Then manually install the following JARs: -- `target/dropbox-sign-1.8-dev.jar` +- `target/dropbox-sign-1.8.1-dev.jar` - `target/lib/*.jar` ## Getting Started @@ -476,7 +476,7 @@ apisupport@hellosign.com This Java package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `3.0.0` - - Package version: `1.8-dev` + - Package version: `1.8.1-dev` - Build package: `org.openapitools.codegen.languages.JavaClientCodegen` diff --git a/sdks/java-v1/VERSION b/sdks/java-v1/VERSION index d82db9132..00f91b858 100644 --- a/sdks/java-v1/VERSION +++ b/sdks/java-v1/VERSION @@ -1 +1 @@ -1.8-dev +1.8.1-dev diff --git a/sdks/java-v1/build.gradle b/sdks/java-v1/build.gradle index e09981d03..ef2920f41 100644 --- a/sdks/java-v1/build.gradle +++ b/sdks/java-v1/build.gradle @@ -21,7 +21,7 @@ apply plugin: 'signing' group = 'com.dropbox.sign' archivesBaseName = 'dropbox-sign' -version = '1.8-dev' +version = '1.8.1-dev' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/sdks/java-v1/build.sbt b/sdks/java-v1/build.sbt index b949b2013..203853da9 100644 --- a/sdks/java-v1/build.sbt +++ b/sdks/java-v1/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "com.dropbox.sign", name := "dropbox-sign", - version := "1.8-dev", + version := "1.8.1-dev", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), Compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/sdks/java-v1/docs/AccountApi.md b/sdks/java-v1/docs/AccountApi.md deleted file mode 100644 index cd7c9244f..000000000 --- a/sdks/java-v1/docs/AccountApi.md +++ /dev/null @@ -1,345 +0,0 @@ -# AccountApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**accountCreate**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account -[**accountGet**](AccountApi.md#accountGet) | **GET** /account | Get Account -[**accountUpdate**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account -[**accountVerify**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account - - - -## accountCreate - -> AccountCreateResponse accountCreate(accountCreateRequest) - -Create Account - -Creates a new Dropbox Sign Account that is associated with the specified `email_address`. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class AccountCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var accountCreateRequest = new AccountCreateRequest(); - accountCreateRequest.emailAddress("newuser@dropboxsign.com"); - - try - { - var response = new AccountApi(config).accountCreate( - accountCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **accountCreateRequest** | [**AccountCreateRequest**](AccountCreateRequest.md)| | - -### Return type - -[**AccountCreateResponse**](AccountCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## accountGet - -> AccountGetResponse accountGet(accountId, emailAddress) - -Get Account - -Returns the properties and settings of your Account. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class AccountGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new AccountApi(config).accountGet(); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountGet"); - 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**| `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] - **emailAddress** | **String**| `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] - -### Return type - -[**AccountGetResponse**](AccountGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## accountUpdate - -> AccountGetResponse accountUpdate(accountUpdateRequest) - -Update Account - -Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class AccountUpdateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var accountUpdateRequest = new AccountUpdateRequest(); - accountUpdateRequest.callbackUrl("https://www.example.com/callback"); - accountUpdateRequest.locale("en-US"); - - try - { - var response = new AccountApi(config).accountUpdate( - accountUpdateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountUpdate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **accountUpdateRequest** | [**AccountUpdateRequest**](AccountUpdateRequest.md)| | - -### Return type - -[**AccountGetResponse**](AccountGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## accountVerify - -> AccountVerifyResponse accountVerify(accountVerifyRequest) - -Verify Account - -Verifies whether an Dropbox Sign Account exists for the given email address. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class AccountVerifyExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var accountVerifyRequest = new AccountVerifyRequest(); - accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); - - try - { - var response = new AccountApi(config).accountVerify( - accountVerifyRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling AccountApi#accountVerify"); - 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 | -|------------- | ------------- | ------------- | -------------| - **accountVerifyRequest** | [**AccountVerifyRequest**](AccountVerifyRequest.md)| | - -### Return type - -[**AccountVerifyResponse**](AccountVerifyResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/AccountCreateRequest.md b/sdks/java-v1/docs/AccountCreateRequest.md deleted file mode 100644 index 9c75292a7..000000000 --- a/sdks/java-v1/docs/AccountCreateRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# AccountCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress`*_required_ | ```String``` | The email address which will be associated with the new Account. | | -| `clientId` | ```String``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | -| `clientSecret` | ```String``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | -| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | - - - diff --git a/sdks/java-v1/docs/AccountCreateResponse.md b/sdks/java-v1/docs/AccountCreateResponse.md deleted file mode 100644 index 7e09def2b..000000000 --- a/sdks/java-v1/docs/AccountCreateResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AccountCreateResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `account`*_required_ | [```AccountResponse```](AccountResponse.md) | | | -| `oauthData` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/AccountGetResponse.md b/sdks/java-v1/docs/AccountGetResponse.md deleted file mode 100644 index f5ed78b06..000000000 --- a/sdks/java-v1/docs/AccountGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# AccountGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `account`*_required_ | [```AccountResponse```](AccountResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/AccountResponse.md b/sdks/java-v1/docs/AccountResponse.md deleted file mode 100644 index 5b73aa02d..000000000 --- a/sdks/java-v1/docs/AccountResponse.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# AccountResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The ID of the Account | | -| `emailAddress` | ```String``` | The email address associated with the Account. | | -| `isLocked` | ```Boolean``` | Returns `true` if the user has been locked out of their account by a team admin. | | -| `isPaidHs` | ```Boolean``` | Returns `true` if the user has a paid Dropbox Sign account. | | -| `isPaidHf` | ```Boolean``` | Returns `true` if the user has a paid HelloFax account. | | -| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | | | -| `callbackUrl` | ```String``` | The URL that Dropbox Sign events will `POST` to. | | -| `roleCode` | ```String``` | The membership role for the team. | | -| `teamId` | ```String``` | The id of the team account belongs to. | | -| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | -| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | - - - diff --git a/sdks/java-v1/docs/AccountResponseQuotas.md b/sdks/java-v1/docs/AccountResponseQuotas.md deleted file mode 100644 index e7510a8d7..000000000 --- a/sdks/java-v1/docs/AccountResponseQuotas.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# AccountResponseQuotas - -Details concerning remaining monthly quotas. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `apiSignatureRequestsLeft` | ```Integer``` | API signature requests remaining. | | -| `documentsLeft` | ```Integer``` | Signature requests remaining. | | -| `templatesTotal` | ```Integer``` | Total API templates allowed. | | -| `templatesLeft` | ```Integer``` | API templates remaining. | | -| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | -| `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | - - - diff --git a/sdks/java-v1/docs/AccountResponseUsage.md b/sdks/java-v1/docs/AccountResponseUsage.md deleted file mode 100644 index 1cdb76629..000000000 --- a/sdks/java-v1/docs/AccountResponseUsage.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AccountResponseUsage - -Details concerning monthly usage - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `faxPagesSent` | ```Integer``` | Number of fax pages sent | | - - - diff --git a/sdks/java-v1/docs/AccountUpdateRequest.md b/sdks/java-v1/docs/AccountUpdateRequest.md deleted file mode 100644 index 43121c890..000000000 --- a/sdks/java-v1/docs/AccountUpdateRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# AccountUpdateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The ID of the Account | | -| `callbackUrl` | ```String``` | The URL that Dropbox Sign should POST events to. | | -| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | - - - diff --git a/sdks/java-v1/docs/AccountVerifyRequest.md b/sdks/java-v1/docs/AccountVerifyRequest.md deleted file mode 100644 index d14a8eb2b..000000000 --- a/sdks/java-v1/docs/AccountVerifyRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AccountVerifyRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress`*_required_ | ```String``` | Email address to run the verification for. | | - - - diff --git a/sdks/java-v1/docs/AccountVerifyResponse.md b/sdks/java-v1/docs/AccountVerifyResponse.md deleted file mode 100644 index 8868f15b2..000000000 --- a/sdks/java-v1/docs/AccountVerifyResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# AccountVerifyResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/AccountVerifyResponseAccount.md b/sdks/java-v1/docs/AccountVerifyResponseAccount.md deleted file mode 100644 index f83f9f0eb..000000000 --- a/sdks/java-v1/docs/AccountVerifyResponseAccount.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AccountVerifyResponseAccount - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress` | ```String``` | The email address associated with the Account. | | - - - diff --git a/sdks/java-v1/docs/ApiAppApi.md b/sdks/java-v1/docs/ApiAppApi.md deleted file mode 100644 index 672878e86..000000000 --- a/sdks/java-v1/docs/ApiAppApi.md +++ /dev/null @@ -1,461 +0,0 @@ -# ApiAppApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**apiAppCreate**](ApiAppApi.md#apiAppCreate) | **POST** /api_app | Create API App -[**apiAppDelete**](ApiAppApi.md#apiAppDelete) | **DELETE** /api_app/{client_id} | Delete API App -[**apiAppGet**](ApiAppApi.md#apiAppGet) | **GET** /api_app/{client_id} | Get API App -[**apiAppList**](ApiAppApi.md#apiAppList) | **GET** /api_app/list | List API Apps -[**apiAppUpdate**](ApiAppApi.md#apiAppUpdate) | **PUT** /api_app/{client_id} | Update API App - - - -## apiAppCreate - -> ApiAppGetResponse apiAppCreate(apiAppCreateRequest) - -Create API App - -Creates a new API App. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ApiAppCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var oauth = new SubOAuth(); - oauth.callbackUrl("https://example.com/oauth"); - oauth.scopes(List.of ( - SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, - SubOAuth.ScopesEnum.REQUEST_SIGNATURE - )); - - var whiteLabelingOptions = new SubWhiteLabelingOptions(); - whiteLabelingOptions.primaryButtonColor("#00b3e6"); - whiteLabelingOptions.primaryButtonTextColor("#ffffff"); - - var apiAppCreateRequest = new ApiAppCreateRequest(); - apiAppCreateRequest.name("My Production App"); - apiAppCreateRequest.domains(List.of ( - "example.com" - )); - apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); - apiAppCreateRequest.oauth(oauth); - apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); - - try - { - var response = new ApiAppApi(config).apiAppCreate( - apiAppCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAppApi#apiAppCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **apiAppCreateRequest** | [**ApiAppCreateRequest**](ApiAppCreateRequest.md)| | - -### Return type - -[**ApiAppGetResponse**](ApiAppGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## apiAppDelete - -> apiAppDelete(clientId) - -Delete API App - -Deletes an API App. Can only be invoked for apps you own. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ApiAppDeleteExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - new ApiAppApi(config).apiAppDelete( - "0dd3b823a682527788c4e40cb7b6f7e9" // clientId - ); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAppApi#apiAppDelete"); - 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 | -|------------- | ------------- | ------------- | -------------| - **clientId** | **String**| The client id of the API App to delete. | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## apiAppGet - -> ApiAppGetResponse apiAppGet(clientId) - -Get API App - -Returns an object with information about an API App. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ApiAppGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new ApiAppApi(config).apiAppGet( - "0dd3b823a682527788c4e40cb7b6f7e9" // clientId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAppApi#apiAppGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **clientId** | **String**| The client id of the API App to retrieve. | - -### Return type - -[**ApiAppGetResponse**](ApiAppGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## apiAppList - -> ApiAppListResponse apiAppList(page, pageSize) - -List API Apps - -Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ApiAppListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new ApiAppApi(config).apiAppList( - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAppApi#apiAppList"); - 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 | -|------------- | ------------- | ------------- | -------------| - **page** | **Integer**| Which page number of the API App List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - -### Return type - -[**ApiAppListResponse**](ApiAppListResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## apiAppUpdate - -> ApiAppGetResponse apiAppUpdate(clientId, apiAppUpdateRequest) - -Update API App - -Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ApiAppUpdateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var oauth = new SubOAuth(); - oauth.callbackUrl("https://example.com/oauth"); - oauth.scopes(List.of ( - SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, - SubOAuth.ScopesEnum.REQUEST_SIGNATURE - )); - - var whiteLabelingOptions = new SubWhiteLabelingOptions(); - whiteLabelingOptions.primaryButtonColor("#00b3e6"); - whiteLabelingOptions.primaryButtonTextColor("#ffffff"); - - var apiAppUpdateRequest = new ApiAppUpdateRequest(); - apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); - apiAppUpdateRequest.name("New Name"); - apiAppUpdateRequest.domains(List.of ( - "example.com" - )); - apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); - apiAppUpdateRequest.oauth(oauth); - apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); - - try - { - var response = new ApiAppApi(config).apiAppUpdate( - "0dd3b823a682527788c4e40cb7b6f7e9", // clientId - apiAppUpdateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **clientId** | **String**| The client id of the API App to update. | - **apiAppUpdateRequest** | [**ApiAppUpdateRequest**](ApiAppUpdateRequest.md)| | - -### Return type - -[**ApiAppGetResponse**](ApiAppGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/ApiAppCreateRequest.md b/sdks/java-v1/docs/ApiAppCreateRequest.md deleted file mode 100644 index b787bc7c0..000000000 --- a/sdks/java-v1/docs/ApiAppCreateRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# ApiAppCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `domains`*_required_ | ```List``` | The domain names the ApiApp will be associated with. | | -| `name`*_required_ | ```String``` | The name you want to assign to the ApiApp. | | -| `callbackUrl` | ```String``` | The URL at which the ApiApp should receive event callbacks. | | -| `customLogoFile` | ```File``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | | | -| `options` | [```SubOptions```](SubOptions.md) | | | -| `whiteLabelingOptions` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | - - - diff --git a/sdks/java-v1/docs/ApiAppGetResponse.md b/sdks/java-v1/docs/ApiAppGetResponse.md deleted file mode 100644 index 98e2f98d6..000000000 --- a/sdks/java-v1/docs/ApiAppGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ApiAppGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `apiApp`*_required_ | [```ApiAppResponse```](ApiAppResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/ApiAppListResponse.md b/sdks/java-v1/docs/ApiAppListResponse.md deleted file mode 100644 index 14c287f97..000000000 --- a/sdks/java-v1/docs/ApiAppListResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ApiAppListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `apiApps`*_required_ | [```List```](ApiAppResponse.md) | Contains information about API Apps. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/ApiAppResponse.md b/sdks/java-v1/docs/ApiAppResponse.md deleted file mode 100644 index afe95c850..000000000 --- a/sdks/java-v1/docs/ApiAppResponse.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# ApiAppResponse - -Contains information about an API App. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `callbackUrl` | ```String``` | The app's callback URL (for events) | | -| `clientId` | ```String``` | The app's client id | | -| `createdAt` | ```Integer``` | The time that the app was created | | -| `domains` | ```List``` | The domain name(s) associated with the app | | -| `name` | ```String``` | The name of the app | | -| `isApproved` | ```Boolean``` | Boolean to indicate if the app has been approved | | -| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | | | -| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | | | -| `ownerAccount` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | | | -| `whiteLabelingOptions` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | | | - - - diff --git a/sdks/java-v1/docs/ApiAppResponseOAuth.md b/sdks/java-v1/docs/ApiAppResponseOAuth.md deleted file mode 100644 index c2f705c7a..000000000 --- a/sdks/java-v1/docs/ApiAppResponseOAuth.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ApiAppResponseOAuth - -An object describing the app's OAuth properties, or null if OAuth is not configured for the app. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `callbackUrl` | ```String``` | The app's OAuth callback URL. | | -| `secret` | ```String``` | The app's OAuth secret, or null if the app does not belong to user. | | -| `scopes` | ```List``` | Array of OAuth scopes used by the app. | | -| `chargesUsers` | ```Boolean``` | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | | - - - diff --git a/sdks/java-v1/docs/ApiAppResponseOptions.md b/sdks/java-v1/docs/ApiAppResponseOptions.md deleted file mode 100644 index 07979f387..000000000 --- a/sdks/java-v1/docs/ApiAppResponseOptions.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ApiAppResponseOptions - -An object with options that override account settings. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `canInsertEverywhere` | ```Boolean``` | Boolean denoting if signers can "Insert Everywhere" in one click while signing a document | | - - - diff --git a/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md b/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md deleted file mode 100644 index b4d6d4249..000000000 --- a/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ApiAppResponseOwnerAccount - -An object describing the app's owner - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The owner account's ID | | -| `emailAddress` | ```String``` | The owner account's email address | | - - - diff --git a/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md deleted file mode 100644 index be6d022fd..000000000 --- a/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# ApiAppResponseWhiteLabelingOptions - -An object with options to customize the app's signer page - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `headerBackgroundColor` | ```String``` | | | -| `legalVersion` | ```String``` | | | -| `linkColor` | ```String``` | | | -| `pageBackgroundColor` | ```String``` | | | -| `primaryButtonColor` | ```String``` | | | -| `primaryButtonColorHover` | ```String``` | | | -| `primaryButtonTextColor` | ```String``` | | | -| `primaryButtonTextColorHover` | ```String``` | | | -| `secondaryButtonColor` | ```String``` | | | -| `secondaryButtonColorHover` | ```String``` | | | -| `secondaryButtonTextColor` | ```String``` | | | -| `secondaryButtonTextColorHover` | ```String``` | | | -| `textColor1` | ```String``` | | | -| `textColor2` | ```String``` | | | - - - diff --git a/sdks/java-v1/docs/ApiAppUpdateRequest.md b/sdks/java-v1/docs/ApiAppUpdateRequest.md deleted file mode 100644 index 1c0efafdc..000000000 --- a/sdks/java-v1/docs/ApiAppUpdateRequest.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# ApiAppUpdateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `callbackUrl` | ```String``` | The URL at which the API App should receive event callbacks. | | -| `customLogoFile` | ```File``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | -| `domains` | ```List``` | The domain names the ApiApp will be associated with. | | -| `name` | ```String``` | The name you want to assign to the ApiApp. | | -| `oauth` | [```SubOAuth```](SubOAuth.md) | | | -| `options` | [```SubOptions```](SubOptions.md) | | | -| `whiteLabelingOptions` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | - - - diff --git a/sdks/java-v1/docs/BulkSendJobApi.md b/sdks/java-v1/docs/BulkSendJobApi.md deleted file mode 100644 index 742d55134..000000000 --- a/sdks/java-v1/docs/BulkSendJobApi.md +++ /dev/null @@ -1,178 +0,0 @@ -# BulkSendJobApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**bulkSendJobGet**](BulkSendJobApi.md#bulkSendJobGet) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job -[**bulkSendJobList**](BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs - - - -## bulkSendJobGet - -> BulkSendJobGetResponse bulkSendJobGet(bulkSendJobId, page, pageSize) - -Get Bulk Send Job - -Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class BulkSendJobGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new BulkSendJobApi(config).bulkSendJobGet( - "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **bulkSendJobId** | **String**| The id of the BulkSendJob to retrieve. | - **page** | **Integer**| Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional] [default to 20] - -### Return type - -[**BulkSendJobGetResponse**](BulkSendJobGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## bulkSendJobList - -> BulkSendJobListResponse bulkSendJobList(page, pageSize) - -List Bulk Send Jobs - -Returns a list of BulkSendJob that you can access. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class BulkSendJobListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new BulkSendJobApi(config).bulkSendJobList( - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); - 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 | -|------------- | ------------- | ------------- | -------------| - **page** | **Integer**| Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional] [default to 20] - -### Return type - -[**BulkSendJobListResponse**](BulkSendJobListResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/BulkSendJobGetResponse.md b/sdks/java-v1/docs/BulkSendJobGetResponse.md deleted file mode 100644 index 93395ee2d..000000000 --- a/sdks/java-v1/docs/BulkSendJobGetResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BulkSendJobGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `bulkSendJob`*_required_ | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `signatureRequests`*_required_ | [```List```](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md deleted file mode 100644 index 09809ea86..000000000 --- a/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# BulkSendJobGetResponseSignatureRequests - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `testMode` | ```Boolean``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | | -| `signatureRequestId` | ```String``` | The id of the SignatureRequest. | | -| `requesterEmailAddress` | ```String``` | The email address of the initiator of the SignatureRequest. | | -| `title` | ```String``` | The title the specified Account uses for the SignatureRequest. | | -| `originalTitle` | ```String``` | Default Label for account. | | -| `subject` | ```String``` | The subject in the email that was initially sent to the signers. | | -| `message` | ```String``` | The custom message in the email that was initially sent to the signers. | | -| `metadata` | ```Map``` | The metadata attached to the signature request. | | -| `createdAt` | ```Integer``` | Time the signature request was created. | | -| `expiresAt` | ```Integer``` | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | -| `isComplete` | ```Boolean``` | Whether or not the SignatureRequest has been fully executed by all signers. | | -| `isDeclined` | ```Boolean``` | Whether or not the SignatureRequest has been declined by a signer. | | -| `hasError` | ```Boolean``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | -| `filesUrl` | ```String``` | The URL where a copy of the request's documents can be downloaded. | | -| `signingUrl` | ```String``` | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | | -| `detailsUrl` | ```String``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | -| `ccEmailAddresses` | ```List``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | -| `signingRedirectUrl` | ```String``` | The URL you want the signer redirected to after they successfully sign. | | -| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | -| `templateIds` | ```List``` | Templates IDs used in this SignatureRequest (if any). | | -| `customFields` | [```List```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | -| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | -| `responseData` | [```List```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | -| `signatures` | [```List```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | -| `bulkSendJobId` | ```String``` | The id of the BulkSendJob. | | - - - diff --git a/sdks/java-v1/docs/BulkSendJobListResponse.md b/sdks/java-v1/docs/BulkSendJobListResponse.md deleted file mode 100644 index e5eb2315d..000000000 --- a/sdks/java-v1/docs/BulkSendJobListResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# BulkSendJobListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `bulkSendJobs`*_required_ | [```List```](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/BulkSendJobResponse.md b/sdks/java-v1/docs/BulkSendJobResponse.md deleted file mode 100644 index eb2278a34..000000000 --- a/sdks/java-v1/docs/BulkSendJobResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BulkSendJobResponse - -Contains information about the BulkSendJob such as when it was created and how many signature requests are queued. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `bulkSendJobId` | ```String``` | The id of the BulkSendJob. | | -| `total` | ```Integer``` | The total amount of Signature Requests queued for sending. | | -| `isCreator` | ```Boolean``` | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | | -| `createdAt` | ```Integer``` | Time that the BulkSendJob was created. | | - - - diff --git a/sdks/java-v1/docs/BulkSendJobSendResponse.md b/sdks/java-v1/docs/BulkSendJobSendResponse.md deleted file mode 100644 index 532b64b5b..000000000 --- a/sdks/java-v1/docs/BulkSendJobSendResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# BulkSendJobSendResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `bulkSendJob`*_required_ | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/EmbeddedApi.md b/sdks/java-v1/docs/EmbeddedApi.md deleted file mode 100644 index 04700004d..000000000 --- a/sdks/java-v1/docs/EmbeddedApi.md +++ /dev/null @@ -1,182 +0,0 @@ -# EmbeddedApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**embeddedEditUrl**](EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL -[**embeddedSignUrl**](EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL - - - -## embeddedEditUrl - -> EmbeddedEditUrlResponse embeddedEditUrl(templateId, embeddedEditUrlRequest) - -Get Embedded Template Edit URL - -Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class EmbeddedEditUrlExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var mergeFields = new ArrayList(List.of ()); - - var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); - embeddedEditUrlRequest.ccRoles(List.of ( - "" - )); - embeddedEditUrlRequest.mergeFields(mergeFields); - - try - { - var response = new EmbeddedApi(config).embeddedEditUrl( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - embeddedEditUrlRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the template to edit. | - **embeddedEditUrlRequest** | [**EmbeddedEditUrlRequest**](EmbeddedEditUrlRequest.md)| | - -### Return type - -[**EmbeddedEditUrlResponse**](EmbeddedEditUrlResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## embeddedSignUrl - -> EmbeddedSignUrlResponse embeddedSignUrl(signatureId) - -Get Embedded Sign URL - -Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class EmbeddedSignUrlExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new EmbeddedApi(config).embeddedSignUrl( - "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureId** | **String**| The id of the signature to get a signature url for. | - -### Return type - -[**EmbeddedSignUrlResponse**](EmbeddedSignUrlResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/EmbeddedEditUrlRequest.md b/sdks/java-v1/docs/EmbeddedEditUrlRequest.md deleted file mode 100644 index 4e2d8c2e9..000000000 --- a/sdks/java-v1/docs/EmbeddedEditUrlRequest.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# EmbeddedEditUrlRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `allowEditCcs` | ```Boolean``` | This allows the requester to enable/disable to add or change CC roles when editing the template. | | -| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. | | -| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | -| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | -| `mergeFields` | [```List```](SubMergeField.md) | Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template.

Remove all merge fields on the template by passing an empty array `[]`. | | -| `previewOnly` | ```Boolean``` | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

**NOTE:** This parameter overwrites `show_preview=true` (if set). | | -| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `testMode` | ```Boolean``` | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | | - - - diff --git a/sdks/java-v1/docs/EmbeddedEditUrlResponse.md b/sdks/java-v1/docs/EmbeddedEditUrlResponse.md deleted file mode 100644 index 959e0c75f..000000000 --- a/sdks/java-v1/docs/EmbeddedEditUrlResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# EmbeddedEditUrlResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `embedded`*_required_ | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md deleted file mode 100644 index 78ad7026c..000000000 --- a/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# EmbeddedEditUrlResponseEmbedded - -An embedded template object. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `editUrl` | ```String``` | A template url that can be opened in an iFrame. | | -| `expiresAt` | ```Integer``` | The specific time that the the `edit_url` link expires, in epoch. | | - - - diff --git a/sdks/java-v1/docs/EmbeddedSignUrlResponse.md b/sdks/java-v1/docs/EmbeddedSignUrlResponse.md deleted file mode 100644 index 6f39b97fe..000000000 --- a/sdks/java-v1/docs/EmbeddedSignUrlResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# EmbeddedSignUrlResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `embedded`*_required_ | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md deleted file mode 100644 index b2fd6c9df..000000000 --- a/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# EmbeddedSignUrlResponseEmbedded - -An object that contains necessary information to set up embedded signing. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signUrl` | ```String``` | A signature url that can be opened in an iFrame. | | -| `expiresAt` | ```Integer``` | The specific time that the the `sign_url` link expires, in epoch. | | - - - diff --git a/sdks/java-v1/docs/ErrorResponse.md b/sdks/java-v1/docs/ErrorResponse.md deleted file mode 100644 index f1a560c3b..000000000 --- a/sdks/java-v1/docs/ErrorResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ErrorResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | | | - - - diff --git a/sdks/java-v1/docs/ErrorResponseError.md b/sdks/java-v1/docs/ErrorResponseError.md deleted file mode 100644 index 656aa5c7f..000000000 --- a/sdks/java-v1/docs/ErrorResponseError.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ErrorResponseError - -Contains information about an error that occurred. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `errorMsg`*_required_ | ```String``` | Message describing an error. | | -| `errorName`*_required_ | ```String``` | Name of the error. | | -| `errorPath` | ```String``` | Path at which an error occurred. | | - - - diff --git a/sdks/java-v1/docs/EventCallbackRequest.md b/sdks/java-v1/docs/EventCallbackRequest.md deleted file mode 100644 index 73daf943e..000000000 --- a/sdks/java-v1/docs/EventCallbackRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# EventCallbackRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | | | -| `account` | [```AccountResponse```](AccountResponse.md) | | | -| `signatureRequest` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | -| `template` | [```TemplateResponse```](TemplateResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/EventCallbackRequestEvent.md b/sdks/java-v1/docs/EventCallbackRequestEvent.md deleted file mode 100644 index 19ab491c2..000000000 --- a/sdks/java-v1/docs/EventCallbackRequestEvent.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# EventCallbackRequestEvent - -Basic information about the event that occurred. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `eventTime`*_required_ | ```String``` | Time the event was created (using Unix time). | | -| `eventType`*_required_ | [```EventTypeEnum```](#EventTypeEnum) | Type of callback event that was triggered. | | -| `eventHash`*_required_ | ```String``` | Generated hash used to verify source of event data. | | -| `eventMetadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | - - - -## Enum: EventTypeEnum - -| Name | Value | ----- | ----- -| ACCOUNT_CONFIRMED | "account_confirmed" | -| UNKNOWN_ERROR | "unknown_error" | -| FILE_ERROR | "file_error" | -| SIGN_URL_INVALID | "sign_url_invalid" | -| SIGNATURE_REQUEST_VIEWED | "signature_request_viewed" | -| SIGNATURE_REQUEST_SIGNED | "signature_request_signed" | -| SIGNATURE_REQUEST_SENT | "signature_request_sent" | -| SIGNATURE_REQUEST_ALL_SIGNED | "signature_request_all_signed" | -| SIGNATURE_REQUEST_EMAIL_BOUNCE | "signature_request_email_bounce" | -| SIGNATURE_REQUEST_REMIND | "signature_request_remind" | -| SIGNATURE_REQUEST_INCOMPLETE_QES | "signature_request_incomplete_qes" | -| SIGNATURE_REQUEST_DESTROYED | "signature_request_destroyed" | -| SIGNATURE_REQUEST_CANCELED | "signature_request_canceled" | -| SIGNATURE_REQUEST_DOWNLOADABLE | "signature_request_downloadable" | -| SIGNATURE_REQUEST_DECLINED | "signature_request_declined" | -| SIGNATURE_REQUEST_REASSIGNED | "signature_request_reassigned" | -| SIGNATURE_REQUEST_INVALID | "signature_request_invalid" | -| SIGNATURE_REQUEST_PREPARED | "signature_request_prepared" | -| SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | -| TEMPLATE_CREATED | "template_created" | -| TEMPLATE_ERROR | "template_error" | -| CALLBACK_TEST | "callback_test" | -| SIGNATURE_REQUEST_SIGNER_REMOVED | "signature_request_signer_removed" | - - - diff --git a/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md b/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md deleted file mode 100644 index 13208c2d1..000000000 --- a/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# EventCallbackRequestEventMetadata - -Specific metadata about the event. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `relatedSignatureId` | ```String``` | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | | -| `reportedForAccountId` | ```String``` | Account ID the event was reported for. | | -| `reportedForAppId` | ```String``` | App ID the event was reported for. | | -| `eventMessage` | ```String``` | Message about a declined or failed (due to error) signature flow. | | - - - diff --git a/sdks/java-v1/docs/FaxApi.md b/sdks/java-v1/docs/FaxApi.md deleted file mode 100644 index b092573e7..000000000 --- a/sdks/java-v1/docs/FaxApi.md +++ /dev/null @@ -1,424 +0,0 @@ -# FaxApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**faxDelete**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax -[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download Fax Files -[**faxGet**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax -[**faxList**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes -[**faxSend**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax - - - -## faxDelete - -> faxDelete(faxId) - -Delete Fax - -Deletes the specified Fax from the system - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxDeleteExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - new FaxApi(config).faxDelete( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId - ); - } catch (ApiException e) { - System.err.println("Exception when calling FaxApi#faxDelete"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxId** | **String**| Fax ID | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxFiles - -> File faxFiles(faxId) - -Download Fax Files - -Downloads files associated with a Fax - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxFilesExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxApi(config).faxFiles( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId - ); - response.renameTo(new File("./file_response")); - } catch (ApiException e) { - System.err.println("Exception when calling FaxApi#faxFiles"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxId** | **String**| Fax ID | - -### Return type - -[**File**](File.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/pdf, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxGet - -> FaxGetResponse faxGet(faxId) - -Get Fax - -Returns information about a Fax - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxApi(config).faxGet( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxApi#faxGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxId** | **String**| Fax ID | - -### Return type - -[**FaxGetResponse**](FaxGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxList - -> FaxListResponse faxList(page, pageSize) - -Lists Faxes - -Returns properties of multiple Faxes - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxApi(config).faxList( - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxApi#faxList"); - 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 | -|------------- | ------------- | ------------- | -------------| - **page** | **Integer**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - -### Return type - -[**FaxListResponse**](FaxListResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxSend - -> FaxGetResponse faxSend(faxSendRequest) - -Send Fax - -Creates and sends a new Fax with the submitted file(s) - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxSendExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var faxSendRequest = new FaxSendRequest(); - faxSendRequest.recipient("16690000001"); - faxSendRequest.sender("16690000000"); - faxSendRequest.testMode(true); - faxSendRequest.coverPageTo("Jill Fax"); - faxSendRequest.coverPageFrom("Faxer Faxerson"); - faxSendRequest.coverPageMessage("I'm sending you a fax!"); - faxSendRequest.title("This is what the fax is about!"); - faxSendRequest.files(List.of ( - new File("./example_fax.pdf") - )); - - try - { - var response = new FaxApi(config).faxSend( - faxSendRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxApi#faxSend"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md)| | - -### Return type - -[**FaxGetResponse**](FaxGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/FaxGetResponse.md b/sdks/java-v1/docs/FaxGetResponse.md deleted file mode 100644 index cc9dc6e57..000000000 --- a/sdks/java-v1/docs/FaxGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FaxGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/FaxLineAddUserRequest.md b/sdks/java-v1/docs/FaxLineAddUserRequest.md deleted file mode 100644 index 4023bd024..000000000 --- a/sdks/java-v1/docs/FaxLineAddUserRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FaxLineAddUserRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number | | -| `accountId` | ```String``` | Account ID | | -| `emailAddress` | ```String``` | Email address | | - - - diff --git a/sdks/java-v1/docs/FaxLineApi.md b/sdks/java-v1/docs/FaxLineApi.md deleted file mode 100644 index d1aafb013..000000000 --- a/sdks/java-v1/docs/FaxLineApi.md +++ /dev/null @@ -1,600 +0,0 @@ -# FaxLineApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**faxLineAddUser**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User -[**faxLineAreaCodeGet**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes -[**faxLineCreate**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line -[**faxLineDelete**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line -[**faxLineGet**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line -[**faxLineList**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines -[**faxLineRemoveUser**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access - - - -## faxLineAddUser - -> FaxLineResponse faxLineAddUser(faxLineAddUserRequest) - -Add Fax Line User - -Grants a user access to the specified Fax Line. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineAddUserExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var faxLineAddUserRequest = new FaxLineAddUserRequest(); - faxLineAddUserRequest.number("[FAX_NUMBER]"); - faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); - - try - { - var response = new FaxLineApi(config).faxLineAddUser( - faxLineAddUserRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md)| | - -### Return type - -[**FaxLineResponse**](FaxLineResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineAreaCodeGet - -> FaxLineAreaCodeGetResponse faxLineAreaCodeGet(country, state, province, city) - -Get Available Fax Line Area Codes - -Returns a list of available area codes for a given state/province and city - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineAreaCodeGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxLineApi(config).faxLineAreaCodeGet( - "US", // country - null, // state - null, // province - null // city - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **country** | **String**| Filter area codes by country | [enum: CA, US, UK] - **state** | **String**| Filter area codes by state | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] - **province** | **String**| Filter area codes by province | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] - **city** | **String**| Filter area codes by city | [optional] - -### Return type - -[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineCreate - -> FaxLineResponse faxLineCreate(faxLineCreateRequest) - -Purchase Fax Line - -Purchases a new Fax Line - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var faxLineCreateRequest = new FaxLineCreateRequest(); - faxLineCreateRequest.areaCode(209); - faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); - - try - { - var response = new FaxLineApi(config).faxLineCreate( - faxLineCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxLineCreateRequest** | [**FaxLineCreateRequest**](FaxLineCreateRequest.md)| | - -### Return type - -[**FaxLineResponse**](FaxLineResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineDelete - -> faxLineDelete(faxLineDeleteRequest) - -Delete Fax Line - -Deletes the specified Fax Line from the subscription. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineDeleteExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var faxLineDeleteRequest = new FaxLineDeleteRequest(); - faxLineDeleteRequest.number("[FAX_NUMBER]"); - - try - { - new FaxLineApi(config).faxLineDelete( - faxLineDeleteRequest - ); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineDelete"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md)| | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineGet - -> FaxLineResponse faxLineGet(number) - -Get Fax Line - -Returns the properties and settings of a Fax Line. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxLineApi(config).faxLineGet( - "123-123-1234" // number - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **number** | **String**| The Fax Line number | - -### Return type - -[**FaxLineResponse**](FaxLineResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineList - -> FaxLineListResponse faxLineList(accountId, page, pageSize, showTeamLines) - -List Fax Lines - -Returns the properties and settings of multiple Fax Lines. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - var response = new FaxLineApi(config).faxLineList( - "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId - 1, // page - 20, // pageSize - null // showTeamLines - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineList"); - 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**| Account ID | [optional] - **page** | **Integer**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - **showTeamLines** | **Boolean**| Include Fax Lines belonging to team members in the list | [optional] - -### Return type - -[**FaxLineListResponse**](FaxLineListResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## faxLineRemoveUser - -> FaxLineResponse faxLineRemoveUser(faxLineRemoveUserRequest) - -Remove Fax Line Access - -Removes a user's access to the specified Fax Line - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class FaxLineRemoveUserExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); - faxLineRemoveUserRequest.number("[FAX_NUMBER]"); - faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); - - try - { - var response = new FaxLineApi(config).faxLineRemoveUser( - faxLineRemoveUserRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); - 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 | -|------------- | ------------- | ------------- | -------------| - **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md)| | - -### Return type - -[**FaxLineResponse**](FaxLineResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md deleted file mode 100644 index 10275bc6c..000000000 --- a/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FaxLineAreaCodeGetCountryEnum - -## Enum - - -* `CA` (value: `"CA"`) - -* `US` (value: `"US"`) - -* `UK` (value: `"UK"`) - - - diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md deleted file mode 100644 index 13cf50078..000000000 --- a/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md +++ /dev/null @@ -1,35 +0,0 @@ - - -# FaxLineAreaCodeGetProvinceEnum - -## Enum - - -* `AB` (value: `"AB"`) - -* `BC` (value: `"BC"`) - -* `MB` (value: `"MB"`) - -* `NB` (value: `"NB"`) - -* `NL` (value: `"NL"`) - -* `NT` (value: `"NT"`) - -* `NS` (value: `"NS"`) - -* `NU` (value: `"NU"`) - -* `ON` (value: `"ON"`) - -* `PE` (value: `"PE"`) - -* `QC` (value: `"QC"`) - -* `SK` (value: `"SK"`) - -* `YT` (value: `"YT"`) - - - diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md b/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md deleted file mode 100644 index 002619333..000000000 --- a/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FaxLineAreaCodeGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `areaCodes`*_required_ | ```List``` | | | - - - diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md deleted file mode 100644 index 577a48c63..000000000 --- a/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md +++ /dev/null @@ -1,111 +0,0 @@ - - -# FaxLineAreaCodeGetStateEnum - -## Enum - - -* `AK` (value: `"AK"`) - -* `AL` (value: `"AL"`) - -* `AR` (value: `"AR"`) - -* `AZ` (value: `"AZ"`) - -* `CA` (value: `"CA"`) - -* `CO` (value: `"CO"`) - -* `CT` (value: `"CT"`) - -* `DC` (value: `"DC"`) - -* `DE` (value: `"DE"`) - -* `FL` (value: `"FL"`) - -* `GA` (value: `"GA"`) - -* `HI` (value: `"HI"`) - -* `IA` (value: `"IA"`) - -* `ID` (value: `"ID"`) - -* `IL` (value: `"IL"`) - -* `IN` (value: `"IN"`) - -* `KS` (value: `"KS"`) - -* `KY` (value: `"KY"`) - -* `LA` (value: `"LA"`) - -* `MA` (value: `"MA"`) - -* `MD` (value: `"MD"`) - -* `ME` (value: `"ME"`) - -* `MI` (value: `"MI"`) - -* `MN` (value: `"MN"`) - -* `MO` (value: `"MO"`) - -* `MS` (value: `"MS"`) - -* `MT` (value: `"MT"`) - -* `NC` (value: `"NC"`) - -* `ND` (value: `"ND"`) - -* `NE` (value: `"NE"`) - -* `NH` (value: `"NH"`) - -* `NJ` (value: `"NJ"`) - -* `NM` (value: `"NM"`) - -* `NV` (value: `"NV"`) - -* `NY` (value: `"NY"`) - -* `OH` (value: `"OH"`) - -* `OK` (value: `"OK"`) - -* `OR` (value: `"OR"`) - -* `PA` (value: `"PA"`) - -* `RI` (value: `"RI"`) - -* `SC` (value: `"SC"`) - -* `SD` (value: `"SD"`) - -* `TN` (value: `"TN"`) - -* `TX` (value: `"TX"`) - -* `UT` (value: `"UT"`) - -* `VA` (value: `"VA"`) - -* `VT` (value: `"VT"`) - -* `WA` (value: `"WA"`) - -* `WI` (value: `"WI"`) - -* `WV` (value: `"WV"`) - -* `WY` (value: `"WY"`) - - - diff --git a/sdks/java-v1/docs/FaxLineCreateRequest.md b/sdks/java-v1/docs/FaxLineCreateRequest.md deleted file mode 100644 index 7fd1be6bf..000000000 --- a/sdks/java-v1/docs/FaxLineCreateRequest.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# FaxLineCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `areaCode`*_required_ | ```Integer``` | Area code of the new Fax Line | | -| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country of the area code | | -| `city` | ```String``` | City of the area code | | -| `accountId` | ```String``` | Account ID of the account that will be assigned this new Fax Line | | - - - -## Enum: CountryEnum - -| Name | Value | ----- | ----- -| CA | "CA" | -| US | "US" | -| UK | "UK" | - - - diff --git a/sdks/java-v1/docs/FaxLineDeleteRequest.md b/sdks/java-v1/docs/FaxLineDeleteRequest.md deleted file mode 100644 index 4b45b339f..000000000 --- a/sdks/java-v1/docs/FaxLineDeleteRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FaxLineDeleteRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number | | - - - diff --git a/sdks/java-v1/docs/FaxLineListResponse.md b/sdks/java-v1/docs/FaxLineListResponse.md deleted file mode 100644 index 69891dc2f..000000000 --- a/sdks/java-v1/docs/FaxLineListResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FaxLineListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `faxLines`*_required_ | [```List```](FaxLineResponseFaxLine.md) | | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md deleted file mode 100644 index 8e55d572d..000000000 --- a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# FaxLineRemoveUserRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `number`*_required_ | ```String``` | The Fax Line number | | -| `accountId` | ```String``` | Account ID of the user to remove access | | -| `emailAddress` | ```String``` | Email address of the user to remove access | | - - - diff --git a/sdks/java-v1/docs/FaxLineResponse.md b/sdks/java-v1/docs/FaxLineResponse.md deleted file mode 100644 index c5256bbc6..000000000 --- a/sdks/java-v1/docs/FaxLineResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FaxLineResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `faxLine`*_required_ | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | -| `warnings` | [```WarningResponse```](WarningResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/FaxLineResponseFaxLine.md b/sdks/java-v1/docs/FaxLineResponseFaxLine.md deleted file mode 100644 index daf0d206a..000000000 --- a/sdks/java-v1/docs/FaxLineResponseFaxLine.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# FaxLineResponseFaxLine - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `number` | ```String``` | Number | | -| `createdAt` | ```Integer``` | Created at | | -| `updatedAt` | ```Integer``` | Updated at | | -| `accounts` | [```List```](AccountResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/FaxListResponse.md b/sdks/java-v1/docs/FaxListResponse.md deleted file mode 100644 index f25379a27..000000000 --- a/sdks/java-v1/docs/FaxListResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FaxListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `faxes`*_required_ | [```List```](FaxResponse.md) | | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/FaxResponse.md b/sdks/java-v1/docs/FaxResponse.md deleted file mode 100644 index a1c857b48..000000000 --- a/sdks/java-v1/docs/FaxResponse.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# FaxResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `faxId`*_required_ | ```String``` | Fax ID | | -| `title`*_required_ | ```String``` | Fax Title | | -| `originalTitle`*_required_ | ```String``` | Fax Original Title | | -| `metadata`*_required_ | ```Map``` | Fax Metadata | | -| `createdAt`*_required_ | ```Integer``` | Fax Created At Timestamp | | -| `sender`*_required_ | ```String``` | Fax Sender Email | | -| `filesUrl`*_required_ | ```String``` | Fax Files URL | | -| `transmissions`*_required_ | [```List```](FaxResponseTransmission.md) | Fax Transmissions List | | -| `subject` | ```String``` | Fax Subject | | -| `message` | ```String``` | Fax Message | | -| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | - - - diff --git a/sdks/java-v1/docs/FaxResponseTransmission.md b/sdks/java-v1/docs/FaxResponseTransmission.md deleted file mode 100644 index 535750b13..000000000 --- a/sdks/java-v1/docs/FaxResponseTransmission.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# FaxResponseTransmission - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | -| `statusCode`*_required_ | [```StatusCodeEnum```](#StatusCodeEnum) | Fax Transmission Status Code | | -| `sentAt` | ```Integer``` | Fax Transmission Sent Timestamp | | - - - -## Enum: StatusCodeEnum - -| Name | Value | ----- | ----- -| SUCCESS | "success" | -| TRANSMITTING | "transmitting" | -| ERROR_COULD_NOT_FAX | "error_could_not_fax" | -| ERROR_UNKNOWN | "error_unknown" | -| ERROR_BUSY | "error_busy" | -| ERROR_NO_ANSWER | "error_no_answer" | -| ERROR_DISCONNECTED | "error_disconnected" | -| ERROR_BAD_DESTINATION | "error_bad_destination" | - - - diff --git a/sdks/java-v1/docs/FaxSendRequest.md b/sdks/java-v1/docs/FaxSendRequest.md deleted file mode 100644 index 65b105756..000000000 --- a/sdks/java-v1/docs/FaxSendRequest.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# FaxSendRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `recipient`*_required_ | ```String``` | Recipient of the fax Can be a phone number in E.164 format or email address | | -| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `testMode` | ```Boolean``` | API Test Mode Setting | | -| `coverPageTo` | ```String``` | Fax cover page recipient information | | -| `coverPageFrom` | ```String``` | Fax cover page sender information | | -| `coverPageMessage` | ```String``` | Fax Cover Page Message | | -| `title` | ```String``` | Fax Title | | - - - diff --git a/sdks/java-v1/docs/FileResponse.md b/sdks/java-v1/docs/FileResponse.md deleted file mode 100644 index 058a80ed5..000000000 --- a/sdks/java-v1/docs/FileResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# FileResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `fileUrl`*_required_ | ```String``` | URL to the file. | | -| `expiresAt`*_required_ | ```Integer``` | When the link expires. | | - - - diff --git a/sdks/java-v1/docs/FileResponseDataUri.md b/sdks/java-v1/docs/FileResponseDataUri.md deleted file mode 100644 index 65c0b7dbc..000000000 --- a/sdks/java-v1/docs/FileResponseDataUri.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FileResponseDataUri - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `dataUri`*_required_ | ```String``` | File as base64 encoded string. | | - - - diff --git a/sdks/java-v1/docs/ListInfoResponse.md b/sdks/java-v1/docs/ListInfoResponse.md deleted file mode 100644 index b9d464ec7..000000000 --- a/sdks/java-v1/docs/ListInfoResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ListInfoResponse - -Contains pagination information about the data returned. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `numPages` | ```Integer``` | Total number of pages available. | | -| `numResults` | ```Integer``` | Total number of objects available. | | -| `page` | ```Integer``` | Number of the page being returned. | | -| `pageSize` | ```Integer``` | Objects returned per page. | | - - - diff --git a/sdks/java-v1/docs/OAuthApi.md b/sdks/java-v1/docs/OAuthApi.md deleted file mode 100644 index ed9b039c2..000000000 --- a/sdks/java-v1/docs/OAuthApi.md +++ /dev/null @@ -1,179 +0,0 @@ -# OAuthApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**oauthTokenGenerate**](OAuthApi.md#oauthTokenGenerate) | **POST** /oauth/token | OAuth Token Generate -[**oauthTokenRefresh**](OAuthApi.md#oauthTokenRefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh - - - -## oauthTokenGenerate - -> OAuthTokenResponse oauthTokenGenerate(oauthTokenGenerateRequest) - -OAuth Token Generate - -Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class OauthTokenGenerateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - - var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); - oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); - oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); - oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); - oAuthTokenGenerateRequest.state("900e06e2"); - oAuthTokenGenerateRequest.grantType("authorization_code"); - - try - { - var response = new OAuthApi(config).oauthTokenGenerate( - oAuthTokenGenerateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **oauthTokenGenerateRequest** | [**OAuthTokenGenerateRequest**](OAuthTokenGenerateRequest.md)| | - -### Return type - -[**OAuthTokenResponse**](OAuthTokenResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## oauthTokenRefresh - -> OAuthTokenResponse oauthTokenRefresh(oauthTokenRefreshRequest) - -OAuth Token Refresh - -Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class OauthTokenRefreshExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - - var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); - oAuthTokenRefreshRequest.grantType("refresh_token"); - oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); - - try - { - var response = new OAuthApi(config).oauthTokenRefresh( - oAuthTokenRefreshRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); - 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 | -|------------- | ------------- | ------------- | -------------| - **oauthTokenRefreshRequest** | [**OAuthTokenRefreshRequest**](OAuthTokenRefreshRequest.md)| | - -### Return type - -[**OAuthTokenResponse**](OAuthTokenResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/OAuthTokenGenerateRequest.md b/sdks/java-v1/docs/OAuthTokenGenerateRequest.md deleted file mode 100644 index 45ad0b08e..000000000 --- a/sdks/java-v1/docs/OAuthTokenGenerateRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# OAuthTokenGenerateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | The client id of the app requesting authorization. | | -| `clientSecret`*_required_ | ```String``` | The secret token of your app. | | -| `code`*_required_ | ```String``` | The code passed to your callback when the user granted access. | | -| `grantType`*_required_ | ```String``` | When generating a new token use `authorization_code`. | | -| `state`*_required_ | ```String``` | Same as the state you specified earlier. | | - - - diff --git a/sdks/java-v1/docs/OAuthTokenRefreshRequest.md b/sdks/java-v1/docs/OAuthTokenRefreshRequest.md deleted file mode 100644 index f0ce43061..000000000 --- a/sdks/java-v1/docs/OAuthTokenRefreshRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OAuthTokenRefreshRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `grantType`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | | -| `refreshToken`*_required_ | ```String``` | The token provided when you got the expired access token. | | -| `clientId` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | -| `clientSecret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | - - - diff --git a/sdks/java-v1/docs/OAuthTokenResponse.md b/sdks/java-v1/docs/OAuthTokenResponse.md deleted file mode 100644 index 86824ccb0..000000000 --- a/sdks/java-v1/docs/OAuthTokenResponse.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# OAuthTokenResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accessToken` | ```String``` | | | -| `tokenType` | ```String``` | | | -| `refreshToken` | ```String``` | | | -| `expiresIn` | ```Integer``` | Number of seconds until the `access_token` expires. Uses epoch time. | | -| `state` | ```String``` | | | - - - diff --git a/sdks/java-v1/docs/ReportApi.md b/sdks/java-v1/docs/ReportApi.md deleted file mode 100644 index 1ef6af025..000000000 --- a/sdks/java-v1/docs/ReportApi.md +++ /dev/null @@ -1,99 +0,0 @@ -# ReportApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**reportCreate**](ReportApi.md#reportCreate) | **POST** /report/create | Create Report - - - -## reportCreate - -> ReportCreateResponse reportCreate(reportCreateRequest) - -Create Report - -Request the creation of one or more report(s). - -When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class ReportCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var reportCreateRequest = new ReportCreateRequest(); - reportCreateRequest.startDate("09/01/2020"); - reportCreateRequest.endDate("09/01/2020"); - reportCreateRequest.reportType(List.of ( - ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, - ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS - )); - - try - { - var response = new ReportApi(config).reportCreate( - reportCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling ReportApi#reportCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **reportCreateRequest** | [**ReportCreateRequest**](ReportCreateRequest.md)| | - -### Return type - -[**ReportCreateResponse**](ReportCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/ReportCreateRequest.md b/sdks/java-v1/docs/ReportCreateRequest.md deleted file mode 100644 index d2f4b67e2..000000000 --- a/sdks/java-v1/docs/ReportCreateRequest.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ReportCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `endDate`*_required_ | ```String``` | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | | -| `reportType`*_required_ | [```List<ReportTypeEnum>```](#List<ReportTypeEnum>) | The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | | -| `startDate`*_required_ | ```String``` | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | | - - - -## Enum: List<ReportTypeEnum> - -| Name | Value | ----- | ----- -| USER_ACTIVITY | "user_activity" | -| DOCUMENT_STATUS | "document_status" | - - - diff --git a/sdks/java-v1/docs/ReportCreateResponse.md b/sdks/java-v1/docs/ReportCreateResponse.md deleted file mode 100644 index 9fc8565de..000000000 --- a/sdks/java-v1/docs/ReportCreateResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ReportCreateResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `report`*_required_ | [```ReportResponse```](ReportResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/ReportResponse.md b/sdks/java-v1/docs/ReportResponse.md deleted file mode 100644 index b48dde6f4..000000000 --- a/sdks/java-v1/docs/ReportResponse.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# ReportResponse - -Contains information about the report request. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `success` | ```String``` | A message indicating the requested operation's success | | -| `startDate` | ```String``` | The (inclusive) start date for the report data in MM/DD/YYYY format. | | -| `endDate` | ```String``` | The (inclusive) end date for the report data in MM/DD/YYYY format. | | -| `reportType` | [```List<ReportTypeEnum>```](#List<ReportTypeEnum>) | The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | | - - - -## Enum: List<ReportTypeEnum> - -| Name | Value | ----- | ----- -| USER_ACTIVITY | "user_activity" | -| DOCUMENT_STATUS | "document_status" | - - - diff --git a/sdks/java-v1/docs/SignatureRequestApi.md b/sdks/java-v1/docs/SignatureRequestApi.md deleted file mode 100644 index 9c22f6611..000000000 --- a/sdks/java-v1/docs/SignatureRequestApi.md +++ /dev/null @@ -1,2155 +0,0 @@ -# SignatureRequestApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**signatureRequestBulkCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestBulkCreateEmbeddedWithTemplate) | **POST** /signature_request/bulk_create_embedded_with_template | Embedded Bulk Send with Template -[**signatureRequestBulkSendWithTemplate**](SignatureRequestApi.md#signatureRequestBulkSendWithTemplate) | **POST** /signature_request/bulk_send_with_template | Bulk Send with Template -[**signatureRequestCancel**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request -[**signatureRequestCreateEmbedded**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request -[**signatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template -[**signatureRequestEdit**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request -[**signatureRequestEditEmbedded**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request -[**signatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template -[**signatureRequestEditWithTemplate**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template -[**signatureRequestFiles**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files -[**signatureRequestFilesAsDataUri**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri -[**signatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url -[**signatureRequestGet**](SignatureRequestApi.md#signatureRequestGet) | **GET** /signature_request/{signature_request_id} | Get Signature Request -[**signatureRequestList**](SignatureRequestApi.md#signatureRequestList) | **GET** /signature_request/list | List Signature Requests -[**signatureRequestReleaseHold**](SignatureRequestApi.md#signatureRequestReleaseHold) | **POST** /signature_request/release_hold/{signature_request_id} | Release On-Hold Signature Request -[**signatureRequestRemind**](SignatureRequestApi.md#signatureRequestRemind) | **POST** /signature_request/remind/{signature_request_id} | Send Request Reminder -[**signatureRequestRemove**](SignatureRequestApi.md#signatureRequestRemove) | **POST** /signature_request/remove/{signature_request_id} | Remove Signature Request Access -[**signatureRequestSend**](SignatureRequestApi.md#signatureRequestSend) | **POST** /signature_request/send | Send Signature Request -[**signatureRequestSendWithTemplate**](SignatureRequestApi.md#signatureRequestSendWithTemplate) | **POST** /signature_request/send_with_template | Send with Template -[**signatureRequestUpdate**](SignatureRequestApi.md#signatureRequestUpdate) | **POST** /signature_request/update/{signature_request_id} | Update Signature Request - - - -## signatureRequestBulkCreateEmbeddedWithTemplate - -> BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate(signatureRequestBulkCreateEmbeddedWithTemplateRequest) - -Embedded Bulk Send with Template - -Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. - -**NOTE:** Only available for Standard plan and higher. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestBulkCreateEmbeddedWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - var signerList2CustomFields1 = new SubBulkSignerListCustomField(); - signerList2CustomFields1.name("company"); - signerList2CustomFields1.value("123 LLC"); - - var signerList2CustomFields = new ArrayList(List.of ( - signerList2CustomFields1 - )); - - var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); - signerList2Signers1.role("Client"); - signerList2Signers1.name("Mary"); - signerList2Signers1.emailAddress("mary@example.com"); - signerList2Signers1.pin("gd9as5b"); - - var signerList2Signers = new ArrayList(List.of ( - signerList2Signers1 - )); - - var signerList1CustomFields1 = new SubBulkSignerListCustomField(); - signerList1CustomFields1.name("company"); - signerList1CustomFields1.value("ABC Corp"); - - var signerList1CustomFields = new ArrayList(List.of ( - signerList1CustomFields1 - )); - - var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); - signerList1Signers1.role("Client"); - signerList1Signers1.name("George"); - signerList1Signers1.emailAddress("george@example.com"); - signerList1Signers1.pin("d79a3td"); - - var signerList1Signers = new ArrayList(List.of ( - signerList1Signers1 - )); - - var signerList1 = new SubBulkSignerList(); - signerList1.customFields(signerList1CustomFields); - signerList1.signers(signerList1Signers); - - var signerList2 = new SubBulkSignerList(); - signerList2.customFields(signerList2CustomFields); - signerList2.signers(signerList2Signers); - - var signerList = new ArrayList(List.of ( - signerList1, - signerList2 - )); - - var ccs1 = new SubCC(); - ccs1.role("Accounting"); - ccs1.emailAddress("accounting@example.com"); - - var ccs = new ArrayList(List.of ( - ccs1 - )); - - var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( - "c26b8a16784a872da37ea946b9ddec7c1e11dff6" - )); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); - signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); - - try - { - var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( - signatureRequestBulkCreateEmbeddedWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestBulkCreateEmbeddedWithTemplateRequest** | [**SignatureRequestBulkCreateEmbeddedWithTemplateRequest**](SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md)| | - -### Return type - -[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestBulkSendWithTemplate - -> BulkSendJobSendResponse signatureRequestBulkSendWithTemplate(signatureRequestBulkSendWithTemplateRequest) - -Bulk Send with Template - -Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. - -**NOTE:** Only available for Standard plan and higher. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestBulkSendWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signerList2CustomFields1 = new SubBulkSignerListCustomField(); - signerList2CustomFields1.name("company"); - signerList2CustomFields1.value("123 LLC"); - - var signerList2CustomFields = new ArrayList(List.of ( - signerList2CustomFields1 - )); - - var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); - signerList2Signers1.role("Client"); - signerList2Signers1.name("Mary"); - signerList2Signers1.emailAddress("mary@example.com"); - signerList2Signers1.pin("gd9as5b"); - - var signerList2Signers = new ArrayList(List.of ( - signerList2Signers1 - )); - - var signerList1CustomFields1 = new SubBulkSignerListCustomField(); - signerList1CustomFields1.name("company"); - signerList1CustomFields1.value("ABC Corp"); - - var signerList1CustomFields = new ArrayList(List.of ( - signerList1CustomFields1 - )); - - var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); - signerList1Signers1.role("Client"); - signerList1Signers1.name("George"); - signerList1Signers1.emailAddress("george@example.com"); - signerList1Signers1.pin("d79a3td"); - - var signerList1Signers = new ArrayList(List.of ( - signerList1Signers1 - )); - - var signerList1 = new SubBulkSignerList(); - signerList1.customFields(signerList1CustomFields); - signerList1.signers(signerList1Signers); - - var signerList2 = new SubBulkSignerList(); - signerList2.customFields(signerList2CustomFields); - signerList2.signers(signerList2Signers); - - var signerList = new ArrayList(List.of ( - signerList1, - signerList2 - )); - - var ccs1 = new SubCC(); - ccs1.role("Accounting"); - ccs1.emailAddress("accounting@example.com"); - - var ccs = new ArrayList(List.of ( - ccs1 - )); - - var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); - signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( - "c26b8a16784a872da37ea946b9ddec7c1e11dff6" - )); - signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); - signatureRequestBulkSendWithTemplateRequest.testMode(true); - signatureRequestBulkSendWithTemplateRequest.signerList(signerList); - signatureRequestBulkSendWithTemplateRequest.ccs(ccs); - - try - { - var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( - signatureRequestBulkSendWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestBulkSendWithTemplateRequest** | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md)| | - -### Return type - -[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestCancel - -> signatureRequestCancel(signatureRequestId) - -Cancel Incomplete Signature Request - -Cancels an incomplete signature request. This action is **not reversible**. - -The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. - -This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. - -To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. - -**NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestCancelExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - new SignatureRequestApi(config).signatureRequestCancel( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId - ); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the incomplete SignatureRequest to cancel. | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestCreateEmbedded - -> SignatureRequestGetResponse signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest) - -Create Embedded Signature Request - -Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestCreateEmbeddedExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestSigner(); - signers1.name("Jack"); - signers1.emailAddress("jack@example.com"); - signers1.order(0); - - var signers2 = new SubSignatureRequestSigner(); - signers2.name("Jill"); - signers2.emailAddress("jill@example.com"); - signers2.order(1); - - var signers = new ArrayList(List.of ( - signers1, - signers2 - )); - - var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); - signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); - signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); - signatureRequestCreateEmbeddedRequest.testMode(true); - signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); - signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - )); - signatureRequestCreateEmbeddedRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); - signatureRequestCreateEmbeddedRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( - signatureRequestCreateEmbeddedRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestCreateEmbeddedWithTemplate - -> SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest) - -Create Embedded Signature Request with Template - -Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestCreateEmbeddedWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestTemplateSigner(); - signers1.role("Client"); - signers1.name("George"); - signers1.emailAddress("george@example.com"); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); - signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( - "c26b8a16784a872da37ea946b9ddec7c1e11dff6" - )); - signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); - signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); - signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); - signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( - signatureRequestCreateEmbeddedWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestEdit - -> SignatureRequestGetResponse signatureRequestEdit(signatureRequestId, signatureRequestEditRequest) - -Edit Signature Request - -Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - -**NOTE:** Edit and resend will not deduct your signature request quota. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestEditExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var fieldOptions = new SubFieldOptions(); - fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestSigner(); - signers1.name("Jack"); - signers1.emailAddress("jack@example.com"); - signers1.order(0); - - var signers2 = new SubSignatureRequestSigner(); - signers2.name("Jill"); - signers2.emailAddress("jill@example.com"); - signers2.order(1); - - var signers = new ArrayList(List.of ( - signers1, - signers2 - )); - - var signatureRequestEditRequest = new SignatureRequestEditRequest(); - signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); - signatureRequestEditRequest.subject("The NDA we talked about"); - signatureRequestEditRequest.testMode(true); - signatureRequestEditRequest.title("NDA with Acme Co."); - signatureRequestEditRequest.ccEmailAddresses(List.of ( - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - )); - signatureRequestEditRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - signatureRequestEditRequest.metadata(JSON.deserialize(""" - { - "custom_id": 1234, - "custom_text": "NDA #9" - } - """, Map.class)); - signatureRequestEditRequest.fieldOptions(fieldOptions); - signatureRequestEditRequest.signingOptions(signingOptions); - signatureRequestEditRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestEdit( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestEditRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | - **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestEditEmbedded - -> SignatureRequestGetResponse signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest) - -Edit Embedded Signature Request - -Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestEditEmbeddedExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestSigner(); - signers1.name("Jack"); - signers1.emailAddress("jack@example.com"); - signers1.order(0); - - var signers2 = new SubSignatureRequestSigner(); - signers2.name("Jill"); - signers2.emailAddress("jill@example.com"); - signers2.order(1); - - var signers = new ArrayList(List.of ( - signers1, - signers2 - )); - - var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); - signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); - signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); - signatureRequestEditEmbeddedRequest.testMode(true); - signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); - signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - )); - signatureRequestEditEmbeddedRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); - signatureRequestEditEmbeddedRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestEditEmbeddedRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | - **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestEditEmbeddedWithTemplate - -> SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) - -Edit Embedded Signature Request with Template - -Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestEditEmbeddedWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestTemplateSigner(); - signers1.role("Client"); - signers1.name("George"); - signers1.emailAddress("george@example.com"); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); - signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( - "c26b8a16784a872da37ea946b9ddec7c1e11dff6" - )); - signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); - signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); - signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); - signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestEditEmbeddedWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | - **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestEditWithTemplate - -> SignatureRequestGetResponse signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest) - -Edit Signature Request With Template - -Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. - -**NOTE:** Edit and resend will not deduct your signature request quota. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestEditWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestTemplateSigner(); - signers1.role("Client"); - signers1.name("George"); - signers1.emailAddress("george@example.com"); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var ccs1 = new SubCC(); - ccs1.role("Accounting"); - ccs1.emailAddress("accounting@example.com"); - - var ccs = new ArrayList(List.of ( - ccs1 - )); - - var customFields1 = new SubCustomField(); - customFields1.name("Cost"); - customFields1.editor("Client"); - customFields1.required(true); - customFields1.value("$20,000"); - - var customFields = new ArrayList(List.of ( - customFields1 - )); - - var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); - signatureRequestEditWithTemplateRequest.templateIds(List.of ( - "61a832ff0d8423f91d503e76bfbcc750f7417c78" - )); - signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestEditWithTemplateRequest.subject("Purchase Order"); - signatureRequestEditWithTemplateRequest.testMode(true); - signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); - signatureRequestEditWithTemplateRequest.signers(signers); - signatureRequestEditWithTemplateRequest.ccs(ccs); - signatureRequestEditWithTemplateRequest.customFields(customFields); - - try - { - var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestEditWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | - **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestFiles - -> File signatureRequestFiles(signatureRequestId, fileType) - -Download Files - -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. - -If the files are currently being prepared, a status code of `409` will be returned instead. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestFilesExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestFiles( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - "pdf" // fileType - ); - response.renameTo(new File("./file_response")); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | - **fileType** | **String**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to pdf] [enum: pdf, zip] - -### Return type - -[**File**](File.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/pdf, application/zip, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestFilesAsDataUri - -> FileResponseDataUri signatureRequestFilesAsDataUri(signatureRequestId) - -Download Files as Data Uri - -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - -If the files are currently being prepared, a status code of `409` will be returned instead. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestFilesAsDataUriExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | - -### Return type - -[**FileResponseDataUri**](FileResponseDataUri.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestFilesAsFileUrl - -> FileResponse signatureRequestFilesAsFileUrl(signatureRequestId, forceDownload) - -Download Files as File Url - -Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). - -If the files are currently being prepared, a status code of `409` will be returned instead. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestFilesAsFileUrlExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - 1 // forceDownload - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | - **forceDownload** | **Integer**| By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. | [optional] [default to 1] - -### Return type - -[**FileResponse**](FileResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestGet - -> SignatureRequestGetResponse signatureRequestGet(signatureRequestId) - -Get Signature Request - -Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestGet( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestList - -> SignatureRequestListResponse signatureRequestList(accountId, page, pageSize, query) - -List Signature Requests - -Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. - -Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestList( - null, // accountId - 1, // page - 20, // pageSize - null // query - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); - 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**| Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] - **page** | **Integer**| Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - **query** | **String**| String that includes search terms and/or fields to be used to filter the SignatureRequest objects. | [optional] - -### Return type - -[**SignatureRequestListResponse**](SignatureRequestListResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestReleaseHold - -> SignatureRequestGetResponse signatureRequestReleaseHold(signatureRequestId) - -Release On-Hold Signature Request - -Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestReleaseHoldExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestReleaseHold( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to release. | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestRemind - -> SignatureRequestGetResponse signatureRequestRemind(signatureRequestId, signatureRequestRemindRequest) - -Send Request Reminder - -Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. - -**NOTE:** This action can **not** be used with embedded signature requests. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestRemindExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); - signatureRequestRemindRequest.emailAddress("john@example.com"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestRemind( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestRemindRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to send a reminder for. | - **signatureRequestRemindRequest** | [**SignatureRequestRemindRequest**](SignatureRequestRemindRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestRemove - -> signatureRequestRemove(signatureRequestId) - -Remove Signature Request Access - -Removes your access to a completed signature request. This action is **not reversible**. - -The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). - -Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestRemoveExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - - try - { - new SignatureRequestApi(config).signatureRequestRemove( - "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId - ); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to remove. | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestSend - -> SignatureRequestGetResponse signatureRequestSend(signatureRequestSendRequest) - -Send Signature Request - -Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestSendExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var fieldOptions = new SubFieldOptions(); - fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestSigner(); - signers1.name("Jack"); - signers1.emailAddress("jack@example.com"); - signers1.order(0); - - var signers2 = new SubSignatureRequestSigner(); - signers2.name("Jill"); - signers2.emailAddress("jill@example.com"); - signers2.order(1); - - var signers = new ArrayList(List.of ( - signers1, - signers2 - )); - - var signatureRequestSendRequest = new SignatureRequestSendRequest(); - signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); - signatureRequestSendRequest.subject("The NDA we talked about"); - signatureRequestSendRequest.testMode(true); - signatureRequestSendRequest.title("NDA with Acme Co."); - signatureRequestSendRequest.ccEmailAddresses(List.of ( - "lawyer1@dropboxsign.com", - "lawyer2@dropboxsign.com" - )); - signatureRequestSendRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - signatureRequestSendRequest.metadata(JSON.deserialize(""" - { - "custom_id": 1234, - "custom_text": "NDA #9" - } - """, Map.class)); - signatureRequestSendRequest.fieldOptions(fieldOptions); - signatureRequestSendRequest.signingOptions(signingOptions); - signatureRequestSendRequest.signers(signers); - - try - { - var response = new SignatureRequestApi(config).signatureRequestSend( - signatureRequestSendRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestSendRequest** | [**SignatureRequestSendRequest**](SignatureRequestSendRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestSendWithTemplate - -> SignatureRequestGetResponse signatureRequestSendWithTemplate(signatureRequestSendWithTemplateRequest) - -Send with Template - -Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestSendWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signingOptions = new SubSigningOptions(); - signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); - signingOptions.draw(true); - signingOptions.phone(false); - signingOptions.type(true); - signingOptions.upload(true); - - var signers1 = new SubSignatureRequestTemplateSigner(); - signers1.role("Client"); - signers1.name("George"); - signers1.emailAddress("george@example.com"); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var ccs1 = new SubCC(); - ccs1.role("Accounting"); - ccs1.emailAddress("accounting@example.com"); - - var ccs = new ArrayList(List.of ( - ccs1 - )); - - var customFields1 = new SubCustomField(); - customFields1.name("Cost"); - customFields1.editor("Client"); - customFields1.required(true); - customFields1.value("$20,000"); - - var customFields = new ArrayList(List.of ( - customFields1 - )); - - var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); - signatureRequestSendWithTemplateRequest.templateIds(List.of ( - "61a832ff0d8423f91d503e76bfbcc750f7417c78" - )); - signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); - signatureRequestSendWithTemplateRequest.subject("Purchase Order"); - signatureRequestSendWithTemplateRequest.testMode(true); - signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); - signatureRequestSendWithTemplateRequest.signers(signers); - signatureRequestSendWithTemplateRequest.ccs(ccs); - signatureRequestSendWithTemplateRequest.customFields(customFields); - - try - { - var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( - signatureRequestSendWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestSendWithTemplateRequest** | [**SignatureRequestSendWithTemplateRequest**](SignatureRequestSendWithTemplateRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## signatureRequestUpdate - -> SignatureRequestGetResponse signatureRequestUpdate(signatureRequestId, signatureRequestUpdateRequest) - -Update Signature Request - -Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. - -Updating the email address of a signer will generate a new `signature_id` value. - -**NOTE:** This action cannot be performed on a signature request with an appended signature page. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class SignatureRequestUpdateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); - signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); - signatureRequestUpdateRequest.emailAddress("john@example.com"); - - try - { - var response = new SignatureRequestApi(config).signatureRequestUpdate( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - signatureRequestUpdateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The id of the SignatureRequest to update. | - **signatureRequestUpdateRequest** | [**SignatureRequestUpdateRequest**](SignatureRequestUpdateRequest.md)| | - -### Return type - -[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md deleted file mode 100644 index 4243ead1c..000000000 --- a/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# SignatureRequestBulkCreateEmbeddedWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signerFile` | ```File``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | -| `signerList` | [```List```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md deleted file mode 100644 index 1798f6fdc..000000000 --- a/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# SignatureRequestBulkSendWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signerFile` | ```File``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | -| `signerList` | [```List```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md deleted file mode 100644 index 383f8a8f3..000000000 --- a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# SignatureRequestCreateEmbeddedRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md deleted file mode 100644 index 050a7e631..000000000 --- a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# SignatureRequestCreateEmbeddedWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md deleted file mode 100644 index dd8b06061..000000000 --- a/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# SignatureRequestEditEmbeddedRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md deleted file mode 100644 index 3cc3dee72..000000000 --- a/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# SignatureRequestEditEmbeddedWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | -| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestEditRequest.md b/sdks/java-v1/docs/SignatureRequestEditRequest.md deleted file mode 100644 index 7fa3aca65..000000000 --- a/sdks/java-v1/docs/SignatureRequestEditRequest.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# SignatureRequestEditRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | -| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md deleted file mode 100644 index d079524b1..000000000 --- a/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# SignatureRequestEditWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestGetResponse.md b/sdks/java-v1/docs/SignatureRequestGetResponse.md deleted file mode 100644 index 25ce665c4..000000000 --- a/sdks/java-v1/docs/SignatureRequestGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signatureRequest`*_required_ | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestListResponse.md b/sdks/java-v1/docs/SignatureRequestListResponse.md deleted file mode 100644 index 6384d2ad0..000000000 --- a/sdks/java-v1/docs/SignatureRequestListResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SignatureRequestListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signatureRequests`*_required_ | [```List```](SignatureRequestResponse.md) | Contains information about signature requests. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestRemindRequest.md b/sdks/java-v1/docs/SignatureRequestRemindRequest.md deleted file mode 100644 index bf76e08f4..000000000 --- a/sdks/java-v1/docs/SignatureRequestRemindRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestRemindRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress`*_required_ | ```String``` | The email address of the signer to send a reminder to. | | -| `name` | ```String``` | The name of the signer to send a reminder to. Include if two or more signers share an email address. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponse.md b/sdks/java-v1/docs/SignatureRequestResponse.md deleted file mode 100644 index 6e8d9645c..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponse.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# SignatureRequestResponse - -Contains information about a signature request. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `testMode` | ```Boolean``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | | -| `signatureRequestId` | ```String``` | The id of the SignatureRequest. | | -| `requesterEmailAddress` | ```String``` | The email address of the initiator of the SignatureRequest. | | -| `title` | ```String``` | The title the specified Account uses for the SignatureRequest. | | -| `originalTitle` | ```String``` | Default Label for account. | | -| `subject` | ```String``` | The subject in the email that was initially sent to the signers. | | -| `message` | ```String``` | The custom message in the email that was initially sent to the signers. | | -| `metadata` | ```Map``` | The metadata attached to the signature request. | | -| `createdAt` | ```Integer``` | Time the signature request was created. | | -| `expiresAt` | ```Integer``` | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | -| `isComplete` | ```Boolean``` | Whether or not the SignatureRequest has been fully executed by all signers. | | -| `isDeclined` | ```Boolean``` | Whether or not the SignatureRequest has been declined by a signer. | | -| `hasError` | ```Boolean``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | -| `filesUrl` | ```String``` | The URL where a copy of the request's documents can be downloaded. | | -| `signingUrl` | ```String``` | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | | -| `detailsUrl` | ```String``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | -| `ccEmailAddresses` | ```List``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | -| `signingRedirectUrl` | ```String``` | The URL you want the signer redirected to after they successfully sign. | | -| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | -| `templateIds` | ```List``` | Templates IDs used in this SignatureRequest (if any). | | -| `customFields` | [```List```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | -| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | -| `responseData` | [```List```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | -| `signatures` | [```List```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | -| `bulkSendJobId` | ```String``` | The ID of the Bulk Send job which sent the signature request, if applicable. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseAttachment.md b/sdks/java-v1/docs/SignatureRequestResponseAttachment.md deleted file mode 100644 index 1ef3a209b..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseAttachment.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SignatureRequestResponseAttachment - -Signer attachments. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `id`*_required_ | ```String``` | The unique ID for this attachment. | | -| `signer`*_required_ | ```String``` | The Signer this attachment is assigned to. | | -| `name`*_required_ | ```String``` | The name of this attachment. | | -| `required`*_required_ | ```Boolean``` | A boolean value denoting if this attachment is required. | | -| `instructions` | ```String``` | Instructions for Signer. | | -| `uploadedAt` | ```Integer``` | Timestamp when attachment was uploaded by Signer. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md deleted file mode 100644 index 7b5f104c4..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# SignatureRequestResponseCustomFieldBase - -An array of Custom Field objects containing the name and type of each custom field. - -* Text Field uses `SignatureRequestResponseCustomFieldText` -* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | -| `name`*_required_ | ```String``` | The name of the Custom Field. | | -| `required` | ```Boolean``` | A boolean value denoting if this field is required. | | -| `apiId` | ```String``` | The unique ID for this field. | | -| `editor` | ```String``` | The name of the Role that is able to edit this field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md deleted file mode 100644 index c2cb8414b..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseCustomFieldCheckbox - -This class extends `SignatureRequestResponseCustomFieldBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | -| `value` | ```Boolean``` | A true/false for checkbox fields | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md deleted file mode 100644 index 23ceb565c..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseCustomFieldText - -This class extends `SignatureRequestResponseCustomFieldBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | -| `value` | ```String``` | A text string for text fields | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md deleted file mode 100644 index 099a8c07a..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SignatureRequestResponseCustomFieldTypeEnum - -## Enum - - -* `TEXT` (value: `"text"`) - -* `CHECKBOX` (value: `"checkbox"`) - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataBase.md b/sdks/java-v1/docs/SignatureRequestResponseDataBase.md deleted file mode 100644 index a9605a44a..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataBase.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# SignatureRequestResponseDataBase - -An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `apiId` | ```String``` | The unique ID for this field. | | -| `signatureId` | ```String``` | The ID of the signature to which this response is linked. | | -| `name` | ```String``` | The name of the form field. | | -| `required` | ```Boolean``` | A boolean value denoting if this field is required. | | -| `type` | ```String``` | | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md b/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md deleted file mode 100644 index 76c8f14fd..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# SignatureRequestResponseDataTypeEnum - -## Enum - - -* `TEXT` (value: `"text"`) - -* `CHECKBOX` (value: `"checkbox"`) - -* `DATE_SIGNED` (value: `"date_signed"`) - -* `DROPDOWN` (value: `"dropdown"`) - -* `INITIALS` (value: `"initials"`) - -* `RADIO` (value: `"radio"`) - -* `SIGNATURE` (value: `"signature"`) - -* `TEXT_MERGE` (value: `"text-merge"`) - -* `CHECKBOX_MERGE` (value: `"checkbox-merge"`) - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md deleted file mode 100644 index fda57045a..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueCheckbox - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A yes/no checkbox | | -| `value` | ```Boolean``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md deleted file mode 100644 index 96af5ebaf..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueCheckboxMerge - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A checkbox field that has default value set by the api | | -| `value` | ```String``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md deleted file mode 100644 index 308bd8bf2..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueDateSigned - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A date | | -| `value` | ```String``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md deleted file mode 100644 index 599cb3cef..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueDropdown - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | An input field for dropdowns | | -| `value` | ```String``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md deleted file mode 100644 index 760618b49..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SignatureRequestResponseDataValueInitials - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | An input field for initials | | -| `value` | ```String``` | The value of the form field. | | -| `isSigned` | ```Boolean``` | This field contains the boolean true if the field is signed. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md deleted file mode 100644 index b8e073f1f..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueRadio - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | An input field for radios | | -| `value` | ```Boolean``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md deleted file mode 100644 index 8cea5ac2e..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SignatureRequestResponseDataValueSignature - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A signature input field | | -| `value` | ```String``` | The value of the form field. | | -| `isSigned` | ```Boolean``` | This field contains the boolean true if the field is signed. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md deleted file mode 100644 index e08ec8ff8..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueText - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A text input field | | -| `value` | ```String``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md deleted file mode 100644 index 2b5e0d3fe..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SignatureRequestResponseDataValueTextMerge - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type` | ```String``` | A text field that has default text set by the api | | -| `value` | ```String``` | The value of the form field. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestResponseSignatures.md b/sdks/java-v1/docs/SignatureRequestResponseSignatures.md deleted file mode 100644 index 2f0e16dc0..000000000 --- a/sdks/java-v1/docs/SignatureRequestResponseSignatures.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# SignatureRequestResponseSignatures - -An array of signature objects, 1 for each signer. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signatureId` | ```String``` | Signature identifier. | | -| `signerGroupGuid` | ```String``` | Signer Group GUID | | -| `signerEmailAddress` | ```String``` | The email address of the signer. | | -| `signerName` | ```String``` | The name of the signer. | | -| `signerRole` | ```String``` | The role of the signer. | | -| `order` | ```Integer``` | If signer order is assigned this is the 0-based index for this signer. | | -| `statusCode` | ```String``` | The current status of the signature. eg: awaiting_signature, signed, declined. | | -| `declineReason` | ```String``` | The reason provided by the signer for declining the request. | | -| `signedAt` | ```Integer``` | Time that the document was signed or null. | | -| `lastViewedAt` | ```Integer``` | The time that the document was last viewed by this signer or null. | | -| `lastRemindedAt` | ```Integer``` | The time the last reminder email was sent to the signer or null. | | -| `hasPin` | ```Boolean``` | Boolean to indicate whether this signature requires a PIN to access. | | -| `hasSmsAuth` | ```Boolean``` | Boolean to indicate whether this signature has SMS authentication enabled. | | -| `hasSmsDelivery` | ```Boolean``` | Boolean to indicate whether this signature has SMS delivery enabled. | | -| `smsPhoneNumber` | ```String``` | The SMS phone number used for authentication or signature request delivery. | | -| `reassignedBy` | ```String``` | Email address of original signer who reassigned to this signer. | | -| `reassignmentReason` | ```String``` | Reason provided by original signer who reassigned to this signer. | | -| `reassignedFrom` | ```String``` | Previous signature identifier. | | -| `error` | ```String``` | Error message pertaining to this signer, or null. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestSendRequest.md b/sdks/java-v1/docs/SignatureRequestSendRequest.md deleted file mode 100644 index 914303935..000000000 --- a/sdks/java-v1/docs/SignatureRequestSendRequest.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# SignatureRequestSendRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | -| `isQualifiedSignature` | ```Boolean``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md deleted file mode 100644 index 7a8d8c88a..000000000 --- a/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# SignatureRequestSendWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | -| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `isQualifiedSignature` | ```Boolean``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | - - - diff --git a/sdks/java-v1/docs/SignatureRequestUpdateRequest.md b/sdks/java-v1/docs/SignatureRequestUpdateRequest.md deleted file mode 100644 index 4b38c53e7..000000000 --- a/sdks/java-v1/docs/SignatureRequestUpdateRequest.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SignatureRequestUpdateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signatureId`*_required_ | ```String``` | The signature ID for the recipient. | | -| `emailAddress` | ```String``` | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | | -| `name` | ```String``` | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | | -| `expiresAt` | ```Integer``` | The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | - - - diff --git a/sdks/java-v1/docs/SubAttachment.md b/sdks/java-v1/docs/SubAttachment.md deleted file mode 100644 index b5e9c80fd..000000000 --- a/sdks/java-v1/docs/SubAttachment.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SubAttachment - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name`*_required_ | ```String``` | The name of attachment. | | -| `signerIndex`*_required_ | ```Integer``` | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | | -| `instructions` | ```String``` | The instructions for uploading the attachment. | | -| `required` | ```Boolean``` | Determines if the attachment must be uploaded. | | - - - diff --git a/sdks/java-v1/docs/SubBulkSignerList.md b/sdks/java-v1/docs/SubBulkSignerList.md deleted file mode 100644 index 918c935b1..000000000 --- a/sdks/java-v1/docs/SubBulkSignerList.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubBulkSignerList - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `customFields` | [```List```](SubBulkSignerListCustomField.md) | An array of custom field values. | | -| `signers` | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | - - - diff --git a/sdks/java-v1/docs/SubBulkSignerListCustomField.md b/sdks/java-v1/docs/SubBulkSignerListCustomField.md deleted file mode 100644 index b37ad53bc..000000000 --- a/sdks/java-v1/docs/SubBulkSignerListCustomField.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubBulkSignerListCustomField - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name`*_required_ | ```String``` | The name of the custom field. Must be the field's `name` or `api_id`. | | -| `value`*_required_ | ```String``` | The value of the custom field. | | - - - diff --git a/sdks/java-v1/docs/SubCC.md b/sdks/java-v1/docs/SubCC.md deleted file mode 100644 index 37eacd3b8..000000000 --- a/sdks/java-v1/docs/SubCC.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubCC - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `role`*_required_ | ```String``` | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | | -| `emailAddress`*_required_ | ```String``` | The email address of the CC recipient. | | - - - diff --git a/sdks/java-v1/docs/SubCustomField.md b/sdks/java-v1/docs/SubCustomField.md deleted file mode 100644 index a309fd6e0..000000000 --- a/sdks/java-v1/docs/SubCustomField.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# SubCustomField - -When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. - -Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. - -For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name`*_required_ | ```String``` | The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing. | | -| `editor` | ```String``` | Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`.

**NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. | | -| `required` | ```Boolean``` | Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. | | -| `value` | ```String``` | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | | - - - diff --git a/sdks/java-v1/docs/SubEditorOptions.md b/sdks/java-v1/docs/SubEditorOptions.md deleted file mode 100644 index 5483d255f..000000000 --- a/sdks/java-v1/docs/SubEditorOptions.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubEditorOptions - -This allows the requester to specify editor options when a preparing a document - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `allowEditSigners` | ```Boolean``` | Allows requesters to edit the list of signers | | -| `allowEditDocuments` | ```Boolean``` | Allows requesters to edit documents, including delete and add | | - - - diff --git a/sdks/java-v1/docs/SubFieldOptions.md b/sdks/java-v1/docs/SubFieldOptions.md deleted file mode 100644 index e1be7690d..000000000 --- a/sdks/java-v1/docs/SubFieldOptions.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# SubFieldOptions - -This allows the requester to specify field options for a signature request. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `dateFormat`*_required_ | [```DateFormatEnum```](#DateFormatEnum) | Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats))

**NOTE:** Only available for Premium and higher. | | - - - -## Enum: DateFormatEnum - -| Name | Value | ----- | ----- -| MMDDYYYY | "MM / DD / YYYY" | -| MM_DD_YYYY | "MM - DD - YYYY" | -| DDMMYYYY | "DD / MM / YYYY" | -| DD_MM_YYYY | "DD - MM - YYYY" | -| YYYYMMDD | "YYYY / MM / DD" | -| YYYY_MM_DD | "YYYY - MM - DD" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldGroup.md b/sdks/java-v1/docs/SubFormFieldGroup.md deleted file mode 100644 index c55ffa355..000000000 --- a/sdks/java-v1/docs/SubFormFieldGroup.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubFormFieldGroup - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `groupId`*_required_ | ```String``` | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | | -| `groupLabel`*_required_ | ```String``` | Name of the group | | -| `requirement`*_required_ | ```String``` | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldRule.md b/sdks/java-v1/docs/SubFormFieldRule.md deleted file mode 100644 index ca44afdb6..000000000 --- a/sdks/java-v1/docs/SubFormFieldRule.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SubFormFieldRule - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `id`*_required_ | ```String``` | Must be unique across all defined rules. | | -| `triggerOperator`*_required_ | ```String``` | Currently only `AND` is supported. Support for `OR` is being worked on. | | -| `triggers`*_required_ | [```List```](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | | -| `actions`*_required_ | [```List```](SubFormFieldRuleAction.md) | An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldRuleAction.md b/sdks/java-v1/docs/SubFormFieldRuleAction.md deleted file mode 100644 index 6a2d43481..000000000 --- a/sdks/java-v1/docs/SubFormFieldRuleAction.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# SubFormFieldRuleAction - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `hidden`*_required_ | ```Boolean``` | `true` to hide the target field when rule is satisfied, otherwise `false`. | | -| `type`*_required_ | [```TypeEnum```](#TypeEnum) | | | -| `fieldId` | ```String``` | **field_id** or **group_id** is required, but not both.

Must reference the `api_id` of an existing field defined within `form_fields_per_document`.

Cannot use with `group_id`. Trigger and action fields must belong to the same signer. | | -| `groupId` | ```String``` | **group_id** or **field_id** is required, but not both.

Must reference the ID of an existing group defined within `form_field_groups`.

Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. | | - - - -## Enum: TypeEnum - -| Name | Value | ----- | ----- -| FIELD_VISIBILITY | "change-field-visibility" | -| GROUP_VISIBILITY | "change-group-visibility" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldRuleTrigger.md b/sdks/java-v1/docs/SubFormFieldRuleTrigger.md deleted file mode 100644 index 3a82561bd..000000000 --- a/sdks/java-v1/docs/SubFormFieldRuleTrigger.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# SubFormFieldRuleTrigger - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `id`*_required_ | ```String``` | Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. | | -| `operator`*_required_ | [```OperatorEnum```](#OperatorEnum) | Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value | | -| `value` | ```String``` | **value** or **values** is required, but not both.

The value to match against **operator**.

- When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match`

Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` | | -| `values` | ```List``` | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | | - - - -## Enum: OperatorEnum - -| Name | Value | ----- | ----- -| ANY | "any" | -| IS | "is" | -| MATCH | "match" | -| NONE | "none" | -| NOT | "not" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md deleted file mode 100644 index a44994a32..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# SubFormFieldsPerDocumentBase - -The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) - -**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. - -* Text Field use `SubFormFieldsPerDocumentText` -* Dropdown Field use `SubFormFieldsPerDocumentDropdown` -* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` -* Checkbox Field use `SubFormFieldsPerDocumentCheckbox` -* Radio Field use `SubFormFieldsPerDocumentRadio` -* Signature Field use `SubFormFieldsPerDocumentSignature` -* Date Signed Field use `SubFormFieldsPerDocumentDateSigned` -* Initials Field use `SubFormFieldsPerDocumentInitials` -* Text Merge Field use `SubFormFieldsPerDocumentTextMerge` -* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `documentIndex`*_required_ | ```Integer``` | Represents the integer index of the `file` or `file_url` document the field should be attached to. | | -| `apiId`*_required_ | ```String``` | An identifier for the field that is unique across all documents in the request. | | -| `height`*_required_ | ```Integer``` | Size of the field in pixels. | | -| `required`*_required_ | ```Boolean``` | Whether this field is required. | | -| `signer`*_required_ | ```String``` | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.

**NOTE:** To set the value of the field as the preparer you must set this to `me_now`

**NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | | -| `type`*_required_ | ```String``` | | | -| `width`*_required_ | ```Integer``` | Size of the field in pixels. | | -| `x`*_required_ | ```Integer``` | Location coordinates of the field in pixels. | | -| `y`*_required_ | ```Integer``` | Location coordinates of the field in pixels. | | -| `name` | ```String``` | Display name for the field. | | -| `page` | ```Integer``` | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md deleted file mode 100644 index c4e473f3f..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubFormFieldsPerDocumentCheckbox - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | | -| `isChecked`*_required_ | ```Boolean``` | `true` for checking the checkbox field by default, otherwise `false`. | | -| `group` | ```String``` | String referencing group defined in `form_field_groups` parameter. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md deleted file mode 100644 index 824359645..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SubFormFieldsPerDocumentCheckboxMerge - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md deleted file mode 100644 index bffc1a4b5..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# SubFormFieldsPerDocumentDateSigned - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | | -| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | -| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | - - - -## Enum: FontFamilyEnum - -| Name | Value | ----- | ----- -| HELVETICA | "helvetica" | -| ARIAL | "arial" | -| COURIER | "courier" | -| CALIBRI | "calibri" | -| CAMBRIA | "cambria" | -| GEORGIA | "georgia" | -| TIMES | "times" | -| TREBUCHET | "trebuchet" | -| VERDANA | "verdana" | -| ROBOTO | "roboto" | -| ROBOTO_MONO | "robotoMono" | -| NOTO_SANS | "notoSans" | -| NOTO_SERIF | "notoSerif" | -| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | -| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | -| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md deleted file mode 100644 index ca470eaa4..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# SubFormFieldsPerDocumentDropdown - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | | -| `options`*_required_ | ```List``` | Array of string values representing dropdown values. | | -| `content` | ```String``` | Selected value in `options` array. Value must exist in array. | | -| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | -| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | - - - -## Enum: FontFamilyEnum - -| Name | Value | ----- | ----- -| HELVETICA | "helvetica" | -| ARIAL | "arial" | -| COURIER | "courier" | -| CALIBRI | "calibri" | -| CAMBRIA | "cambria" | -| GEORGIA | "georgia" | -| TIMES | "times" | -| TREBUCHET | "trebuchet" | -| VERDANA | "verdana" | -| ROBOTO | "roboto" | -| ROBOTO_MONO | "robotoMono" | -| NOTO_SANS | "notoSans" | -| NOTO_SERIF | "notoSerif" | -| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | -| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | -| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md deleted file mode 100644 index b7582a236..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# SubFormFieldsPerDocumentFontEnum - -## Enum - - -* `HELVETICA` (value: `"helvetica"`) - -* `ARIAL` (value: `"arial"`) - -* `COURIER` (value: `"courier"`) - -* `CALIBRI` (value: `"calibri"`) - -* `CAMBRIA` (value: `"cambria"`) - -* `GEORGIA` (value: `"georgia"`) - -* `TIMES` (value: `"times"`) - -* `TREBUCHET` (value: `"trebuchet"`) - -* `VERDANA` (value: `"verdana"`) - -* `ROBOTO` (value: `"roboto"`) - -* `ROBOTO_MONO` (value: `"robotoMono"`) - -* `NOTO_SANS` (value: `"notoSans"`) - -* `NOTO_SERIF` (value: `"notoSerif"`) - -* `NOTO_CJK_JP_REGULAR` (value: `"notoCJK-JP-Regular"`) - -* `NOTO_HEBREW_REGULAR` (value: `"notoHebrew-Regular"`) - -* `NOTO_SAN_THAI_MERGED` (value: `"notoSanThaiMerged"`) - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md deleted file mode 100644 index 543312b59..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md +++ /dev/null @@ -1,41 +0,0 @@ - - -# SubFormFieldsPerDocumentHyperlink - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | | -| `content`*_required_ | ```String``` | Link Text. | | -| `contentUrl`*_required_ | ```String``` | Link URL. | | -| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | -| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | - - - -## Enum: FontFamilyEnum - -| Name | Value | ----- | ----- -| HELVETICA | "helvetica" | -| ARIAL | "arial" | -| COURIER | "courier" | -| CALIBRI | "calibri" | -| CAMBRIA | "cambria" | -| GEORGIA | "georgia" | -| TIMES | "times" | -| TREBUCHET | "trebuchet" | -| VERDANA | "verdana" | -| ROBOTO | "roboto" | -| ROBOTO_MONO | "robotoMono" | -| NOTO_SANS | "notoSans" | -| NOTO_SERIF | "notoSerif" | -| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | -| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | -| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md deleted file mode 100644 index c3537c2d1..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SubFormFieldsPerDocumentInitials - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md deleted file mode 100644 index c19487677..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubFormFieldsPerDocumentRadio - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | | -| `group`*_required_ | ```String``` | String referencing group defined in `form_field_groups` parameter. | | -| `isChecked`*_required_ | ```Boolean``` | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md deleted file mode 100644 index 187b14538..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SubFormFieldsPerDocumentSignature - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. | | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md deleted file mode 100644 index d431f5422..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md +++ /dev/null @@ -1,64 +0,0 @@ - - -# SubFormFieldsPerDocumentText - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A text input field. Use the `SubFormFieldsPerDocumentText` class. | | -| `placeholder` | ```String``` | Placeholder value for text field. | | -| `autoFillType` | ```String``` | Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. | | -| `linkId` | ```String``` | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | | -| `masked` | ```Boolean``` | Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. | | -| `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.

**NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. | | -| `validationCustomRegex` | ```String``` | | | -| `validationCustomRegexFormatLabel` | ```String``` | | | -| `content` | ```String``` | Content of a `me_now` text field | | -| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | -| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | - - - -## Enum: ValidationTypeEnum - -| Name | Value | ----- | ----- -| NUMBERS_ONLY | "numbers_only" | -| LETTERS_ONLY | "letters_only" | -| PHONE_NUMBER | "phone_number" | -| BANK_ROUTING_NUMBER | "bank_routing_number" | -| BANK_ACCOUNT_NUMBER | "bank_account_number" | -| EMAIL_ADDRESS | "email_address" | -| ZIP_CODE | "zip_code" | -| SOCIAL_SECURITY_NUMBER | "social_security_number" | -| EMPLOYER_IDENTIFICATION_NUMBER | "employer_identification_number" | -| CUSTOM_REGEX | "custom_regex" | - - - -## Enum: FontFamilyEnum - -| Name | Value | ----- | ----- -| HELVETICA | "helvetica" | -| ARIAL | "arial" | -| COURIER | "courier" | -| CALIBRI | "calibri" | -| CAMBRIA | "cambria" | -| GEORGIA | "georgia" | -| TIMES | "times" | -| TREBUCHET | "trebuchet" | -| VERDANA | "verdana" | -| ROBOTO | "roboto" | -| ROBOTO_MONO | "robotoMono" | -| NOTO_SANS | "notoSans" | -| NOTO_SERIF | "notoSerif" | -| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | -| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | -| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md deleted file mode 100644 index e1876cce1..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# SubFormFieldsPerDocumentTextMerge - -This class extends `SubFormFieldsPerDocumentBase`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | | -| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | -| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | - - - -## Enum: FontFamilyEnum - -| Name | Value | ----- | ----- -| HELVETICA | "helvetica" | -| ARIAL | "arial" | -| COURIER | "courier" | -| CALIBRI | "calibri" | -| CAMBRIA | "cambria" | -| GEORGIA | "georgia" | -| TIMES | "times" | -| TREBUCHET | "trebuchet" | -| VERDANA | "verdana" | -| ROBOTO | "roboto" | -| ROBOTO_MONO | "robotoMono" | -| NOTO_SANS | "notoSans" | -| NOTO_SERIF | "notoSerif" | -| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | -| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | -| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | - - - diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md deleted file mode 100644 index 20258832e..000000000 --- a/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# SubFormFieldsPerDocumentTypeEnum - -## Enum - - -* `CHECKBOX` (value: `"checkbox"`) - -* `CHECKBOX_MERGE` (value: `"checkbox-merge"`) - -* `DATE_SIGNED` (value: `"date_signed"`) - -* `DROPDOWN` (value: `"dropdown"`) - -* `HYPERLINK` (value: `"hyperlink"`) - -* `INITIALS` (value: `"initials"`) - -* `SIGNATURE` (value: `"signature"`) - -* `RADIO` (value: `"radio"`) - -* `TEXT` (value: `"text"`) - -* `TEXT_MERGE` (value: `"text-merge"`) - - - diff --git a/sdks/java-v1/docs/SubMergeField.md b/sdks/java-v1/docs/SubMergeField.md deleted file mode 100644 index 66582350e..000000000 --- a/sdks/java-v1/docs/SubMergeField.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# SubMergeField - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name`*_required_ | ```String``` | The name of the merge field. Must be unique. | | -| `type`*_required_ | [```TypeEnum```](#TypeEnum) | The type of merge field. | | - - - -## Enum: TypeEnum - -| Name | Value | ----- | ----- -| TEXT | "text" | -| CHECKBOX | "checkbox" | - - - diff --git a/sdks/java-v1/docs/SubOAuth.md b/sdks/java-v1/docs/SubOAuth.md deleted file mode 100644 index 527d0be78..000000000 --- a/sdks/java-v1/docs/SubOAuth.md +++ /dev/null @@ -1,30 +0,0 @@ - - -# SubOAuth - -OAuth related parameters. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `callbackUrl` | ```String``` | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | | -| `scopes` | [```List<ScopesEnum>```](#List<ScopesEnum>) | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | | - - - -## Enum: List<ScopesEnum> - -| Name | Value | ----- | ----- -| REQUEST_SIGNATURE | "request_signature" | -| BASIC_ACCOUNT_INFO | "basic_account_info" | -| ACCOUNT_ACCESS | "account_access" | -| SIGNATURE_REQUEST_ACCESS | "signature_request_access" | -| TEMPLATE_ACCESS | "template_access" | -| TEAM_ACCESS | "team_access" | -| API_APP_ACCESS | "api_app_access" | -| EMPTY | "" | - - - diff --git a/sdks/java-v1/docs/SubOptions.md b/sdks/java-v1/docs/SubOptions.md deleted file mode 100644 index c36523a02..000000000 --- a/sdks/java-v1/docs/SubOptions.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SubOptions - -Additional options supported by API App. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `canInsertEverywhere` | ```Boolean``` | Determines if signers can use "Insert Everywhere" when signing a document. | | - - - diff --git a/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md b/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md deleted file mode 100644 index 80ace3400..000000000 --- a/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubSignatureRequestGroupedSigners - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `group`*_required_ | ```String``` | The name of the group. | | -| `signers`*_required_ | [```List```](SubSignatureRequestSigner.md) | Signers belonging to this Group.

**NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. | | -| `order` | ```Integer``` | The order the group is required to sign in. Use this instead of Signer-level `order`. | | - - - diff --git a/sdks/java-v1/docs/SubSignatureRequestSigner.md b/sdks/java-v1/docs/SubSignatureRequestSigner.md deleted file mode 100644 index 109c422bc..000000000 --- a/sdks/java-v1/docs/SubSignatureRequestSigner.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# SubSignatureRequestSigner - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name`*_required_ | ```String``` | The name of the signer. | | -| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | -| `order` | ```Integer``` | The order the signer is required to sign in. | | -| `pin` | ```String``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `smsPhoneNumber` | ```String``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | | -| `smsPhoneNumberType` | [```SmsPhoneNumberTypeEnum```](#SmsPhoneNumberTypeEnum) | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | - - - -## Enum: SmsPhoneNumberTypeEnum - -| Name | Value | ----- | ----- -| AUTHENTICATION | "authentication" | -| DELIVERY | "delivery" | - - - diff --git a/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md b/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md deleted file mode 100644 index 866b37355..000000000 --- a/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# SubSignatureRequestTemplateSigner - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `role`*_required_ | ```String``` | Must match an existing role in chosen Template(s). It's case-sensitive. | | -| `name`*_required_ | ```String``` | The name of the signer. | | -| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | -| `pin` | ```String``` | The 4- to 12-character access code that will secure this signer's signature page. | | -| `smsPhoneNumber` | ```String``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | | -| `smsPhoneNumberType` | [```SmsPhoneNumberTypeEnum```](#SmsPhoneNumberTypeEnum) | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | - - - -## Enum: SmsPhoneNumberTypeEnum - -| Name | Value | ----- | ----- -| AUTHENTICATION | "authentication" | -| DELIVERY | "delivery" | - - - diff --git a/sdks/java-v1/docs/SubSigningOptions.md b/sdks/java-v1/docs/SubSigningOptions.md deleted file mode 100644 index bca116053..000000000 --- a/sdks/java-v1/docs/SubSigningOptions.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# SubSigningOptions - -This allows the requester to specify the types allowed for creating a signature. - -**NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `defaultType`*_required_ | [```DefaultTypeEnum```](#DefaultTypeEnum) | The default type shown (limited to the listed types) | | -| `draw` | ```Boolean``` | Allows drawing the signature | | -| `phone` | ```Boolean``` | Allows using a smartphone to email the signature | | -| `type` | ```Boolean``` | Allows typing the signature | | -| `upload` | ```Boolean``` | Allows uploading the signature | | - - - -## Enum: DefaultTypeEnum - -| Name | Value | ----- | ----- -| DRAW | "draw" | -| PHONE | "phone" | -| TYPE | "type" | -| UPLOAD | "upload" | - - - diff --git a/sdks/java-v1/docs/SubTeamResponse.md b/sdks/java-v1/docs/SubTeamResponse.md deleted file mode 100644 index df784d080..000000000 --- a/sdks/java-v1/docs/SubTeamResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubTeamResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `teamId` | ```String``` | The id of a team | | -| `name` | ```String``` | The name of a team | | - - - diff --git a/sdks/java-v1/docs/SubTemplateRole.md b/sdks/java-v1/docs/SubTemplateRole.md deleted file mode 100644 index a1ee8e0ea..000000000 --- a/sdks/java-v1/docs/SubTemplateRole.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SubTemplateRole - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The role name of the signer that will be displayed when the template is used to create a signature request. | | -| `order` | ```Integer``` | The order in which this signer role is required to sign. | | - - - diff --git a/sdks/java-v1/docs/SubUnclaimedDraftSigner.md b/sdks/java-v1/docs/SubUnclaimedDraftSigner.md deleted file mode 100644 index fec680ac2..000000000 --- a/sdks/java-v1/docs/SubUnclaimedDraftSigner.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubUnclaimedDraftSigner - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | -| `name`*_required_ | ```String``` | The name of the signer. | | -| `order` | ```Integer``` | The order the signer is required to sign in. | | - - - diff --git a/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md deleted file mode 100644 index 1c6547670..000000000 --- a/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# SubUnclaimedDraftTemplateSigner - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `role`*_required_ | ```String``` | Must match an existing role in chosen Template(s). | | -| `name`*_required_ | ```String``` | The name of the signer filling the role of `role`. | | -| `emailAddress`*_required_ | ```String``` | The email address of the signer filling the role of `role`. | | - - - diff --git a/sdks/java-v1/docs/SubWhiteLabelingOptions.md b/sdks/java-v1/docs/SubWhiteLabelingOptions.md deleted file mode 100644 index 0a5880da3..000000000 --- a/sdks/java-v1/docs/SubWhiteLabelingOptions.md +++ /dev/null @@ -1,39 +0,0 @@ - - -# SubWhiteLabelingOptions - -An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) - -Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `headerBackgroundColor` | ```String``` | | | -| `legalVersion` | [```LegalVersionEnum```](#LegalVersionEnum) | | | -| `linkColor` | ```String``` | | | -| `pageBackgroundColor` | ```String``` | | | -| `primaryButtonColor` | ```String``` | | | -| `primaryButtonColorHover` | ```String``` | | | -| `primaryButtonTextColor` | ```String``` | | | -| `primaryButtonTextColorHover` | ```String``` | | | -| `secondaryButtonColor` | ```String``` | | | -| `secondaryButtonColorHover` | ```String``` | | | -| `secondaryButtonTextColor` | ```String``` | | | -| `secondaryButtonTextColorHover` | ```String``` | | | -| `textColor1` | ```String``` | | | -| `textColor2` | ```String``` | | | -| `resetToDefault` | ```Boolean``` | Resets white labeling options to defaults. Only useful when updating an API App. | | - - - -## Enum: LegalVersionEnum - -| Name | Value | ----- | ----- -| TERMS1 | "terms1" | -| TERMS2 | "terms2" | - - - diff --git a/sdks/java-v1/docs/TeamAddMemberRequest.md b/sdks/java-v1/docs/TeamAddMemberRequest.md deleted file mode 100644 index 122e45b31..000000000 --- a/sdks/java-v1/docs/TeamAddMemberRequest.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# TeamAddMemberRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | `account_id` or `email_address` is required. If both are provided, the account id prevails.

Account id of the user to invite to your Team. | | -| `emailAddress` | ```String``` | `account_id` or `email_address` is required, If both are provided, the account id prevails.

Email address of the user to invite to your Team. | | -| `role` | [```RoleEnum```](#RoleEnum) | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | | - - - -## Enum: RoleEnum - -| Name | Value | ----- | ----- -| MEMBER | "Member" | -| DEVELOPER | "Developer" | -| TEAM_MANAGER | "Team Manager" | -| ADMIN | "Admin" | - - - diff --git a/sdks/java-v1/docs/TeamApi.md b/sdks/java-v1/docs/TeamApi.md deleted file mode 100644 index 3e57e0451..000000000 --- a/sdks/java-v1/docs/TeamApi.md +++ /dev/null @@ -1,837 +0,0 @@ -# TeamApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**teamAddMember**](TeamApi.md#teamAddMember) | **PUT** /team/add_member | Add User to Team -[**teamCreate**](TeamApi.md#teamCreate) | **POST** /team/create | Create Team -[**teamDelete**](TeamApi.md#teamDelete) | **DELETE** /team/destroy | Delete Team -[**teamGet**](TeamApi.md#teamGet) | **GET** /team | Get Team -[**teamInfo**](TeamApi.md#teamInfo) | **GET** /team/info | Get Team Info -[**teamInvites**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites -[**teamMembers**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members -[**teamRemoveMember**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team -[**teamSubTeams**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams -[**teamUpdate**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team - - - -## teamAddMember - -> TeamGetResponse teamAddMember(teamAddMemberRequest, teamId) - -Add User to Team - -Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamAddMemberExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var teamAddMemberRequest = new TeamAddMemberRequest(); - teamAddMemberRequest.emailAddress("george@example.com"); - - try - { - var response = new TeamApi(config).teamAddMember( - teamAddMemberRequest, - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamAddMember"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamAddMemberRequest** | [**TeamAddMemberRequest**](TeamAddMemberRequest.md)| | - **teamId** | **String**| The id of the team. | [optional] - -### Return type - -[**TeamGetResponse**](TeamGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamCreate - -> TeamGetResponse teamCreate(teamCreateRequest) - -Create Team - -Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var teamCreateRequest = new TeamCreateRequest(); - teamCreateRequest.name("New Team Name"); - - try - { - var response = new TeamApi(config).teamCreate( - teamCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamCreateRequest** | [**TeamCreateRequest**](TeamCreateRequest.md)| | - -### Return type - -[**TeamGetResponse**](TeamGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamDelete - -> teamDelete() - -Delete Team - -Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamDeleteExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - new TeamApi(config).teamDelete(); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamGet - -> TeamGetResponse teamGet() - -Get Team - -Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TeamApi(config).teamGet(); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**TeamGetResponse**](TeamGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamInfo - -> TeamGetInfoResponse teamInfo(teamId) - -Get Team Info - -Provides information about a team. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamInfoExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TeamApi(config).teamInfo( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamInfo"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamId** | **String**| The id of the team. | [optional] - -### Return type - -[**TeamGetInfoResponse**](TeamGetInfoResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamInvites - -> TeamInvitesResponse teamInvites(emailAddress) - -List Team Invites - -Provides a list of team invites (and their roles). - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamInvitesExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TeamApi(config).teamInvites(); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamInvites"); - 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 | -|------------- | ------------- | ------------- | -------------| - **emailAddress** | **String**| The email address for which to display the team invites. | [optional] - -### Return type - -[**TeamInvitesResponse**](TeamInvitesResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamMembers - -> TeamMembersResponse teamMembers(teamId, page, pageSize) - -List Team Members - -Provides a paginated list of members (and their roles) that belong to a given team. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamMembersExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TeamApi(config).teamMembers( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamMembers"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamId** | **String**| The id of the team that a member list is being requested from. | - **page** | **Integer**| Which page number of the team member list to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - -### Return type - -[**TeamMembersResponse**](TeamMembersResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamRemoveMember - -> TeamGetResponse teamRemoveMember(teamRemoveMemberRequest) - -Remove User from Team - -Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamRemoveMemberExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); - teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); - teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); - - try - { - var response = new TeamApi(config).teamRemoveMember( - teamRemoveMemberRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamRemoveMember"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamRemoveMemberRequest** | [**TeamRemoveMemberRequest**](TeamRemoveMemberRequest.md)| | - -### Return type - -[**TeamGetResponse**](TeamGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamSubTeams - -> TeamSubTeamsResponse teamSubTeams(teamId, page, pageSize) - -List Sub Teams - -Provides a paginated list of sub teams that belong to a given team. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamSubTeamsExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TeamApi(config).teamSubTeams( - "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId - 1, // page - 20 // pageSize - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamSubTeams"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamId** | **String**| The id of the parent Team. | - **page** | **Integer**| Which page number of the SubTeam List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - -### Return type - -[**TeamSubTeamsResponse**](TeamSubTeamsResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## teamUpdate - -> TeamGetResponse teamUpdate(teamUpdateRequest) - -Update Team - -Updates the name of your Team. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TeamUpdateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var teamUpdateRequest = new TeamUpdateRequest(); - teamUpdateRequest.name("New Team Name"); - - try - { - var response = new TeamApi(config).teamUpdate( - teamUpdateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TeamApi#teamUpdate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **teamUpdateRequest** | [**TeamUpdateRequest**](TeamUpdateRequest.md)| | - -### Return type - -[**TeamGetResponse**](TeamGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/TeamCreateRequest.md b/sdks/java-v1/docs/TeamCreateRequest.md deleted file mode 100644 index 1a4861618..000000000 --- a/sdks/java-v1/docs/TeamCreateRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TeamCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of your Team. | | - - - diff --git a/sdks/java-v1/docs/TeamGetInfoResponse.md b/sdks/java-v1/docs/TeamGetInfoResponse.md deleted file mode 100644 index 1d2bc62a7..000000000 --- a/sdks/java-v1/docs/TeamGetInfoResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TeamGetInfoResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `team`*_required_ | [```TeamInfoResponse```](TeamInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TeamGetResponse.md b/sdks/java-v1/docs/TeamGetResponse.md deleted file mode 100644 index 690796e1f..000000000 --- a/sdks/java-v1/docs/TeamGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TeamGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `team`*_required_ | [```TeamResponse```](TeamResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TeamInfoResponse.md b/sdks/java-v1/docs/TeamInfoResponse.md deleted file mode 100644 index a776d4e09..000000000 --- a/sdks/java-v1/docs/TeamInfoResponse.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# TeamInfoResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `teamId` | ```String``` | The id of a team | | -| `teamParent` | [```TeamParentResponse```](TeamParentResponse.md) | | | -| `name` | ```String``` | The name of a team | | -| `numMembers` | ```Integer``` | Number of members within a team | | -| `numSubTeams` | ```Integer``` | Number of sub teams within a team | | - - - diff --git a/sdks/java-v1/docs/TeamInviteResponse.md b/sdks/java-v1/docs/TeamInviteResponse.md deleted file mode 100644 index c23aa4ed7..000000000 --- a/sdks/java-v1/docs/TeamInviteResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TeamInviteResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `emailAddress` | ```String``` | Email address of the user invited to this team. | | -| `teamId` | ```String``` | Id of the team. | | -| `role` | ```String``` | Role of the user invited to this team. | | -| `sentAt` | ```Integer``` | Timestamp when the invitation was sent. | | -| `redeemedAt` | ```Integer``` | Timestamp when the invitation was redeemed. | | -| `expiresAt` | ```Integer``` | Timestamp when the invitation is expiring. | | - - - diff --git a/sdks/java-v1/docs/TeamInvitesResponse.md b/sdks/java-v1/docs/TeamInvitesResponse.md deleted file mode 100644 index bdb648bb3..000000000 --- a/sdks/java-v1/docs/TeamInvitesResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TeamInvitesResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `teamInvites`*_required_ | [```List```](TeamInviteResponse.md) | Contains a list of team invites and their roles. | | -| `warnings` | [```List```](WarningResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/TeamMemberResponse.md b/sdks/java-v1/docs/TeamMemberResponse.md deleted file mode 100644 index eb42aa095..000000000 --- a/sdks/java-v1/docs/TeamMemberResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# TeamMemberResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | Account id of the team member. | | -| `emailAddress` | ```String``` | Email address of the team member. | | -| `role` | ```String``` | The specific role a member has on the team. | | - - - diff --git a/sdks/java-v1/docs/TeamMembersResponse.md b/sdks/java-v1/docs/TeamMembersResponse.md deleted file mode 100644 index 785318277..000000000 --- a/sdks/java-v1/docs/TeamMembersResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# TeamMembersResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `teamMembers`*_required_ | [```List```](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/TeamParentResponse.md b/sdks/java-v1/docs/TeamParentResponse.md deleted file mode 100644 index c6ba18a98..000000000 --- a/sdks/java-v1/docs/TeamParentResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TeamParentResponse - -Information about the parent team if a team has one, set to `null` otherwise. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `teamId` | ```String``` | The id of a team | | -| `name` | ```String``` | The name of a team | | - - - diff --git a/sdks/java-v1/docs/TeamRemoveMemberRequest.md b/sdks/java-v1/docs/TeamRemoveMemberRequest.md deleted file mode 100644 index 46f48538a..000000000 --- a/sdks/java-v1/docs/TeamRemoveMemberRequest.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# TeamRemoveMemberRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | | -| `emailAddress` | ```String``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Email address of the Account to remove from your Team. | | -| `newOwnerEmailAddress` | ```String``` | The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account.

**NOTE:** Only available for Enterprise plans. | | -| `newTeamId` | ```String``` | Id of the new Team. | | -| `newRole` | [```NewRoleEnum```](#NewRoleEnum) | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | | - - - -## Enum: NewRoleEnum - -| Name | Value | ----- | ----- -| MEMBER | "Member" | -| DEVELOPER | "Developer" | -| TEAM_MANAGER | "Team Manager" | -| ADMIN | "Admin" | - - - diff --git a/sdks/java-v1/docs/TeamResponse.md b/sdks/java-v1/docs/TeamResponse.md deleted file mode 100644 index ca6344cfc..000000000 --- a/sdks/java-v1/docs/TeamResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# TeamResponse - -Contains information about your team and its members - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of your Team | | -| `accounts` | [```List```](AccountResponse.md) | | | -| `invitedAccounts` | [```List```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | -| `invitedEmails` | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | - - - diff --git a/sdks/java-v1/docs/TeamSubTeamsResponse.md b/sdks/java-v1/docs/TeamSubTeamsResponse.md deleted file mode 100644 index 636aa33eb..000000000 --- a/sdks/java-v1/docs/TeamSubTeamsResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# TeamSubTeamsResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `subTeams`*_required_ | [```List```](SubTeamResponse.md) | Contains a list with sub teams. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | | | - - - diff --git a/sdks/java-v1/docs/TeamUpdateRequest.md b/sdks/java-v1/docs/TeamUpdateRequest.md deleted file mode 100644 index 9df0fe1da..000000000 --- a/sdks/java-v1/docs/TeamUpdateRequest.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TeamUpdateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of your Team. | | - - - diff --git a/sdks/java-v1/docs/TemplateAddUserRequest.md b/sdks/java-v1/docs/TemplateAddUserRequest.md deleted file mode 100644 index 74966192b..000000000 --- a/sdks/java-v1/docs/TemplateAddUserRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# TemplateAddUserRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | | -| `emailAddress` | ```String``` | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | | -| `skipNotification` | ```Boolean``` | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | | - - - diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md deleted file mode 100644 index f9de1a96a..000000000 --- a/sdks/java-v1/docs/TemplateApi.md +++ /dev/null @@ -1,1077 +0,0 @@ -# TemplateApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**templateAddUser**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template -[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template -[**templateCreateEmbeddedDraft**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft -[**templateDelete**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template -[**templateFiles**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files -[**templateFilesAsDataUri**](TemplateApi.md#templateFilesAsDataUri) | **GET** /template/files_as_data_uri/{template_id} | Get Template Files as Data Uri -[**templateFilesAsFileUrl**](TemplateApi.md#templateFilesAsFileUrl) | **GET** /template/files_as_file_url/{template_id} | Get Template Files as File Url -[**templateGet**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template -[**templateList**](TemplateApi.md#templateList) | **GET** /template/list | List Templates -[**templateRemoveUser**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template -[**templateUpdateFiles**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files - - - -## templateAddUser - -> TemplateGetResponse templateAddUser(templateId, templateAddUserRequest) - -Add User to Template - -Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateAddUserExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var templateAddUserRequest = new TemplateAddUserRequest(); - templateAddUserRequest.emailAddress("george@dropboxsign.com"); - - try - { - var response = new TemplateApi(config).templateAddUser( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - templateAddUserRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateAddUser"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the Template to give the Account access to. | - **templateAddUserRequest** | [**TemplateAddUserRequest**](TemplateAddUserRequest.md)| | - -### Return type - -[**TemplateGetResponse**](TemplateGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateCreate - -> TemplateCreateResponse templateCreate(templateCreateRequest) - -Create Template - -Creates a template that can then be used. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var fieldOptions = new SubFieldOptions(); - fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var signerRoles1 = new SubTemplateRole(); - signerRoles1.name("Client"); - signerRoles1.order(0); - - var signerRoles2 = new SubTemplateRole(); - signerRoles2.name("Witness"); - signerRoles2.order(1); - - var signerRoles = new ArrayList(List.of ( - signerRoles1, - signerRoles2 - )); - - var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); - formFieldsPerDocument1.documentIndex(0); - formFieldsPerDocument1.apiId("uniqueIdHere_1"); - formFieldsPerDocument1.type("text"); - formFieldsPerDocument1.required(true); - formFieldsPerDocument1.signer("1"); - formFieldsPerDocument1.width(100); - formFieldsPerDocument1.height(16); - formFieldsPerDocument1.x(112); - formFieldsPerDocument1.y(328); - formFieldsPerDocument1.name(""); - formFieldsPerDocument1.page(1); - formFieldsPerDocument1.placeholder(""); - formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); - - var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); - formFieldsPerDocument2.documentIndex(0); - formFieldsPerDocument2.apiId("uniqueIdHere_2"); - formFieldsPerDocument2.type("signature"); - formFieldsPerDocument2.required(true); - formFieldsPerDocument2.signer("0"); - formFieldsPerDocument2.width(120); - formFieldsPerDocument2.height(30); - formFieldsPerDocument2.x(530); - formFieldsPerDocument2.y(415); - formFieldsPerDocument2.name(""); - formFieldsPerDocument2.page(1); - - var formFieldsPerDocument = new ArrayList(List.of ( - formFieldsPerDocument1, - formFieldsPerDocument2 - )); - - var mergeFields1 = new SubMergeField(); - mergeFields1.name("Full Name"); - mergeFields1.type(SubMergeField.TypeEnum.TEXT); - - var mergeFields2 = new SubMergeField(); - mergeFields2.name("Is Registered?"); - mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); - - var mergeFields = new ArrayList(List.of ( - mergeFields1, - mergeFields2 - )); - - var templateCreateRequest = new TemplateCreateRequest(); - templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); - templateCreateRequest.message("For your approval"); - templateCreateRequest.subject("Please sign this document"); - templateCreateRequest.testMode(true); - templateCreateRequest.title("Test Template"); - templateCreateRequest.ccRoles(List.of ( - "Manager" - )); - templateCreateRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - templateCreateRequest.fieldOptions(fieldOptions); - templateCreateRequest.signerRoles(signerRoles); - templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); - templateCreateRequest.mergeFields(mergeFields); - - try - { - var response = new TemplateApi(config).templateCreate( - templateCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateCreateRequest** | [**TemplateCreateRequest**](TemplateCreateRequest.md)| | - -### Return type - -[**TemplateCreateResponse**](TemplateCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateCreateEmbeddedDraft - -> TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest) - -Create Embedded Template Draft - -The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateCreateEmbeddedDraftExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var fieldOptions = new SubFieldOptions(); - fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); - - var mergeFields1 = new SubMergeField(); - mergeFields1.name("Full Name"); - mergeFields1.type(SubMergeField.TypeEnum.TEXT); - - var mergeFields2 = new SubMergeField(); - mergeFields2.name("Is Registered?"); - mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); - - var mergeFields = new ArrayList(List.of ( - mergeFields1, - mergeFields2 - )); - - var signerRoles1 = new SubTemplateRole(); - signerRoles1.name("Client"); - signerRoles1.order(0); - - var signerRoles2 = new SubTemplateRole(); - signerRoles2.name("Witness"); - signerRoles2.order(1); - - var signerRoles = new ArrayList(List.of ( - signerRoles1, - signerRoles2 - )); - - var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); - templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); - templateCreateEmbeddedDraftRequest.message("For your approval"); - templateCreateEmbeddedDraftRequest.subject("Please sign this document"); - templateCreateEmbeddedDraftRequest.testMode(true); - templateCreateEmbeddedDraftRequest.title("Test Template"); - templateCreateEmbeddedDraftRequest.ccRoles(List.of ( - "Manager" - )); - templateCreateEmbeddedDraftRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); - templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); - templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); - - try - { - var response = new TemplateApi(config).templateCreateEmbeddedDraft( - templateCreateEmbeddedDraftRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateCreateEmbeddedDraftRequest** | [**TemplateCreateEmbeddedDraftRequest**](TemplateCreateEmbeddedDraftRequest.md)| | - -### Return type - -[**TemplateCreateEmbeddedDraftResponse**](TemplateCreateEmbeddedDraftResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateDelete - -> templateDelete(templateId) - -Delete Template - -Completely deletes the template specified from the account. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateDeleteExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - new TemplateApi(config).templateDelete( - "f57db65d3f933b5316d398057a36176831451a35" // templateId - ); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateDelete"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the Template to delete. | - -### Return type - -null (empty response body) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateFiles - -> File templateFiles(templateId, fileType) - -Get Template Files - -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. - -If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateFilesExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TemplateApi(config).templateFiles( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - null // fileType - ); - response.renameTo(new File("./file_response")); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateFiles"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the template files to retrieve. | - **fileType** | **String**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [enum: pdf, zip] - -### Return type - -[**File**](File.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/pdf, application/zip, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateFilesAsDataUri - -> FileResponseDataUri templateFilesAsDataUri(templateId) - -Get Template Files as Data Uri - -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). - -If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateFilesAsDataUriExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TemplateApi(config).templateFilesAsDataUri( - "f57db65d3f933b5316d398057a36176831451a35" // templateId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the template files to retrieve. | - -### Return type - -[**FileResponseDataUri**](FileResponseDataUri.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateFilesAsFileUrl - -> FileResponse templateFilesAsFileUrl(templateId, forceDownload) - -Get Template Files as File Url - -Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - -If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateFilesAsFileUrlExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TemplateApi(config).templateFilesAsFileUrl( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - 1 // forceDownload - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the template files to retrieve. | - **forceDownload** | **Integer**| By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. | [optional] [default to 1] - -### Return type - -[**FileResponse**](FileResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateGet - -> TemplateGetResponse templateGet(templateId) - -Get Template - -Returns the Template specified by the `template_id` parameter. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateGetExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TemplateApi(config).templateGet( - "f57db65d3f933b5316d398057a36176831451a35" // templateId - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateGet"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the Template to retrieve. | - -### Return type - -[**TemplateGetResponse**](TemplateGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateList - -> TemplateListResponse templateList(accountId, page, pageSize, query) - -List Templates - -Returns a list of the Templates that are accessible by you. - -Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateListExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - try - { - var response = new TemplateApi(config).templateList( - null, // accountId - 1, // page - 20, // pageSize - null // query - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateList"); - 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**| Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] - **page** | **Integer**| Which page number of the Template List to return. Defaults to `1`. | [optional] [default to 1] - **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] - **query** | **String**| String that includes search terms and/or fields to be used to filter the Template objects. | [optional] - -### Return type - -[**TemplateListResponse**](TemplateListResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateRemoveUser - -> TemplateGetResponse templateRemoveUser(templateId, templateRemoveUserRequest) - -Remove User from Template - -Removes the specified Account's access to the specified Template. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateRemoveUserExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var templateRemoveUserRequest = new TemplateRemoveUserRequest(); - templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); - - try - { - var response = new TemplateApi(config).templateRemoveUser( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - templateRemoveUserRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateRemoveUser"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The id of the Template to remove the Account's access to. | - **templateRemoveUserRequest** | [**TemplateRemoveUserRequest**](TemplateRemoveUserRequest.md)| | - -### Return type - -[**TemplateGetResponse**](TemplateGetResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## templateUpdateFiles - -> TemplateUpdateFilesResponse templateUpdateFiles(templateId, templateUpdateFilesRequest) - -Update Template Files - -Overlays a new file with the overlay of an existing template. The new file(s) must: - -1. have the same or higher page count -2. the same orientation as the file(s) being replaced. - -This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. - -Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. - -It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. - -If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class TemplateUpdateFilesExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); - templateUpdateFilesRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - - try - { - var response = new TemplateApi(config).templateUpdateFiles( - "f57db65d3f933b5316d398057a36176831451a35", // templateId - templateUpdateFilesRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); - 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 | -|------------- | ------------- | ------------- | -------------| - **templateId** | **String**| The ID of the template whose files to update. | - **templateUpdateFilesRequest** | [**TemplateUpdateFilesRequest**](TemplateUpdateFilesRequest.md)| | - -### Return type - -[**TemplateUpdateFilesResponse**](TemplateUpdateFilesResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md deleted file mode 100644 index 05f2497fc..000000000 --- a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md +++ /dev/null @@ -1,38 +0,0 @@ - - -# TemplateCreateEmbeddedDraftRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request | | -| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | -| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `mergeFields` | [```List```](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | | -| `message` | ```String``` | The default template email message. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `signerRoles` | [```List```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | -| `subject` | ```String``` | The template title (alias). | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `usePreexistingFields` | ```Boolean``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | | - - - diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md deleted file mode 100644 index f25b48d33..000000000 --- a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateCreateEmbeddedDraftResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `template`*_required_ | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md deleted file mode 100644 index 770cce434..000000000 --- a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# TemplateCreateEmbeddedDraftResponseTemplate - -Template object with parameters: `template_id`, `edit_url`, `expires_at`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateId` | ```String``` | The id of the Template. | | -| `editUrl` | ```String``` | Link to edit the template. | | -| `expiresAt` | ```Integer``` | When the link expires. | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TemplateCreateRequest.md b/sdks/java-v1/docs/TemplateCreateRequest.md deleted file mode 100644 index 5f99510d9..000000000 --- a/sdks/java-v1/docs/TemplateCreateRequest.md +++ /dev/null @@ -1,31 +0,0 @@ - - -# TemplateCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `formFieldsPerDocument`*_required_ | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `signerRoles`*_required_ | [```List```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request | | -| `clientId` | ```String``` | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `mergeFields` | [```List```](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | | -| `message` | ```String``` | The default template email message. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `subject` | ```String``` | The template title (alias). | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `usePreexistingFields` | ```Boolean``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | | - - - diff --git a/sdks/java-v1/docs/TemplateCreateResponse.md b/sdks/java-v1/docs/TemplateCreateResponse.md deleted file mode 100644 index 3c7389668..000000000 --- a/sdks/java-v1/docs/TemplateCreateResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateCreateResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `template`*_required_ | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TemplateCreateResponseTemplate.md b/sdks/java-v1/docs/TemplateCreateResponseTemplate.md deleted file mode 100644 index 1dcd4bd79..000000000 --- a/sdks/java-v1/docs/TemplateCreateResponseTemplate.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateCreateResponseTemplate - -Template object with parameters: `template_id`. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateId` | ```String``` | The id of the Template. | | - - - diff --git a/sdks/java-v1/docs/TemplateEditResponse.md b/sdks/java-v1/docs/TemplateEditResponse.md deleted file mode 100644 index 88d225e68..000000000 --- a/sdks/java-v1/docs/TemplateEditResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateEditResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateId`*_required_ | ```String``` | The id of the Template. | | - - - diff --git a/sdks/java-v1/docs/TemplateGetResponse.md b/sdks/java-v1/docs/TemplateGetResponse.md deleted file mode 100644 index 2ee4867f0..000000000 --- a/sdks/java-v1/docs/TemplateGetResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateGetResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `template`*_required_ | [```TemplateResponse```](TemplateResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TemplateListResponse.md b/sdks/java-v1/docs/TemplateListResponse.md deleted file mode 100644 index 92b720c58..000000000 --- a/sdks/java-v1/docs/TemplateListResponse.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# TemplateListResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templates`*_required_ | [```List```](TemplateResponse.md) | List of templates that the API caller has access to. | | -| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/TemplateRemoveUserRequest.md b/sdks/java-v1/docs/TemplateRemoveUserRequest.md deleted file mode 100644 index 72a3a585a..000000000 --- a/sdks/java-v1/docs/TemplateRemoveUserRequest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateRemoveUserRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | -| `emailAddress` | ```String``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponse.md b/sdks/java-v1/docs/TemplateResponse.md deleted file mode 100644 index 40de0fdc8..000000000 --- a/sdks/java-v1/docs/TemplateResponse.md +++ /dev/null @@ -1,29 +0,0 @@ - - -# TemplateResponse - -Contains information about the templates you and your team have created. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateId` | ```String``` | The id of the Template. | | -| `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | -| `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | -| `updatedAt` | ```Integer``` | Time the template was last updated. | | -| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | -| `isCreator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | -| `canEdit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | -| `isLocked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | -| `metadata` | ```Map``` | The metadata attached to the template. | | -| `signerRoles` | [```List```](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | -| `ccRoles` | [```List```](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | | -| `documents` | [```List```](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | | -| `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | -| `namedFormFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | -| `accounts` | [```List```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | -| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseAccount.md b/sdks/java-v1/docs/TemplateResponseAccount.md deleted file mode 100644 index 10c996408..000000000 --- a/sdks/java-v1/docs/TemplateResponseAccount.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TemplateResponseAccount - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `accountId` | ```String``` | The id of the Account. | | -| `emailAddress` | ```String``` | The email address associated with the Account. | | -| `isLocked` | ```Boolean``` | Returns `true` if the user has been locked out of their account by a team admin. | | -| `isPaidHs` | ```Boolean``` | Returns `true` if the user has a paid Dropbox Sign account. | | -| `isPaidHf` | ```Boolean``` | Returns `true` if the user has a paid HelloFax account. | | -| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseAccountQuota.md b/sdks/java-v1/docs/TemplateResponseAccountQuota.md deleted file mode 100644 index ad94c2493..000000000 --- a/sdks/java-v1/docs/TemplateResponseAccountQuota.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# TemplateResponseAccountQuota - -An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templatesLeft` | ```Integer``` | API templates remaining. | | -| `apiSignatureRequestsLeft` | ```Integer``` | API signature requests remaining. | | -| `documentsLeft` | ```Integer``` | Signature requests remaining. | | -| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseCCRole.md b/sdks/java-v1/docs/TemplateResponseCCRole.md deleted file mode 100644 index 64069b826..000000000 --- a/sdks/java-v1/docs/TemplateResponseCCRole.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseCCRole - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of the Role. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocument.md b/sdks/java-v1/docs/TemplateResponseDocument.md deleted file mode 100644 index 65da85d42..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocument.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TemplateResponseDocument - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | Name of the associated file. | | -| `index` | ```Integer``` | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | | -| `fieldGroups` | [```List```](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | | -| `formFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | -| `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | -| `staticFields` | [```List```](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md deleted file mode 100644 index edd461727..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# TemplateResponseDocumentCustomFieldBase - -An array of Form Field objects containing the name and type of each named field. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | | | -| `apiId` | ```String``` | The unique ID for this field. | | -| `name` | ```String``` | The name of the Custom Field. | | -| `signer` | ```String``` | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | | -| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | | -| `y` | ```Integer``` | The vertical offset in pixels for this form field. | | -| `width` | ```Integer``` | The width in pixels of this form field. | | -| `height` | ```Integer``` | The height in pixels of this form field. | | -| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md deleted file mode 100644 index dbde79072..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentCustomFieldCheckbox - -This class extends `TemplateResponseDocumentCustomFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md deleted file mode 100644 index ccaf19394..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# TemplateResponseDocumentCustomFieldText - -This class extends `TemplateResponseDocumentCustomFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | | -| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | -| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | -| `fontFamily` | ```String``` | Font family used in this form field's text. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md deleted file mode 100644 index 03b5ffbb8..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFieldGroup - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of the form field group. | | -| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md deleted file mode 100644 index e0f4dcc8a..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFieldGroupRule - -The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping). - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `requirement` | ```String``` | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | | -| `groupLabel` | ```String``` | Name of the group | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md deleted file mode 100644 index 6ff896074..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# TemplateResponseDocumentFormFieldBase - -An array of Form Field objects containing the name and type of each named field. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | | | -| `apiId` | ```String``` | A unique id for the form field. | | -| `name` | ```String``` | The name of the form field. | | -| `signer` | ```String``` | The signer of the Form Field. | | -| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | | -| `y` | ```Integer``` | The vertical offset in pixels for this form field. | | -| `width` | ```Integer``` | The width in pixels of this form field. | | -| `height` | ```Integer``` | The height in pixels of this form field. | | -| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md deleted file mode 100644 index a7f2cadeb..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldCheckbox - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md deleted file mode 100644 index 09b45eec7..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldDateSigned - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md deleted file mode 100644 index 70e5da455..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldDropdown - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md deleted file mode 100644 index e8efcf2d7..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TemplateResponseDocumentFormFieldHyperlink - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | -| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | -| `fontFamily` | ```String``` | Font family used in this form field's text. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md deleted file mode 100644 index f1fe1f5b5..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldInitials - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md deleted file mode 100644 index 877b842a2..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldRadio - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group`*_required_ | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md deleted file mode 100644 index 366aaa9b4..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseDocumentFormFieldSignature - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md deleted file mode 100644 index 49cdfaad6..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# TemplateResponseDocumentFormFieldText - -This class extends `TemplateResponseDocumentFormFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | -| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | -| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | -| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | -| `fontFamily` | ```String``` | Font family used in this form field's text. | | -| `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | - - - -## Enum: ValidationTypeEnum - -| Name | Value | ----- | ----- -| NUMBERS_ONLY | "numbers_only" | -| LETTERS_ONLY | "letters_only" | -| PHONE_NUMBER | "phone_number" | -| BANK_ROUTING_NUMBER | "bank_routing_number" | -| BANK_ACCOUNT_NUMBER | "bank_account_number" | -| EMAIL_ADDRESS | "email_address" | -| ZIP_CODE | "zip_code" | -| SOCIAL_SECURITY_NUMBER | "social_security_number" | -| EMPLOYER_IDENTIFICATION_NUMBER | "employer_identification_number" | -| CUSTOM_REGEX | "custom_regex" | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md deleted file mode 100644 index 4be3cf070..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldBase - -An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | | | -| `apiId` | ```String``` | A unique id for the static field. | | -| `name` | ```String``` | The name of the static field. | | -| `signer` | ```String``` | The signer of the Static Field. | | -| `x` | ```Integer``` | The horizontal offset in pixels for this static field. | | -| `y` | ```Integer``` | The vertical offset in pixels for this static field. | | -| `width` | ```Integer``` | The width in pixels of this static field. | | -| `height` | ```Integer``` | The height in pixels of this static field. | | -| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | -| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md deleted file mode 100644 index 6cd94853c..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldCheckbox - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md deleted file mode 100644 index d5c530d8b..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldDateSigned - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md deleted file mode 100644 index 53505315e..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldDropdown - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md deleted file mode 100644 index 930658b69..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldHyperlink - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md deleted file mode 100644 index 67d755703..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldInitials - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md deleted file mode 100644 index ed32ccca6..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldRadio - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md deleted file mode 100644 index 61f8902f8..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldSignature - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md deleted file mode 100644 index 3dced017f..000000000 --- a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateResponseDocumentStaticFieldText - -This class extends `TemplateResponseDocumentStaticFieldBase` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md b/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md deleted file mode 100644 index bb66f3057..000000000 --- a/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseFieldAvgTextLength - -Average text length in this field. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `numLines` | ```Integer``` | Number of lines. | | -| `numCharsPerLine` | ```Integer``` | Number of characters per line. | | - - - diff --git a/sdks/java-v1/docs/TemplateResponseSignerRole.md b/sdks/java-v1/docs/TemplateResponseSignerRole.md deleted file mode 100644 index 15b48cf17..000000000 --- a/sdks/java-v1/docs/TemplateResponseSignerRole.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateResponseSignerRole - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `name` | ```String``` | The name of the Role. | | -| `order` | ```Integer``` | If signer order is assigned this is the 0-based index for this role. | | - - - diff --git a/sdks/java-v1/docs/TemplateUpdateFilesRequest.md b/sdks/java-v1/docs/TemplateUpdateFilesRequest.md deleted file mode 100644 index 8671b87f8..000000000 --- a/sdks/java-v1/docs/TemplateUpdateFilesRequest.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# TemplateUpdateFilesRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId` | ```String``` | Client id of the app you're using to update this template. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `message` | ```String``` | The new default template email message. | | -| `subject` | ```String``` | The new default template email subject. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | - - - diff --git a/sdks/java-v1/docs/TemplateUpdateFilesResponse.md b/sdks/java-v1/docs/TemplateUpdateFilesResponse.md deleted file mode 100644 index 70930e1c8..000000000 --- a/sdks/java-v1/docs/TemplateUpdateFilesResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# TemplateUpdateFilesResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `template`*_required_ | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | | | - - - diff --git a/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md deleted file mode 100644 index 6289a9953..000000000 --- a/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# TemplateUpdateFilesResponseTemplate - -Contains template id - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `templateId` | ```String``` | The id of the Template. | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftApi.md b/sdks/java-v1/docs/UnclaimedDraftApi.md deleted file mode 100644 index 59ad0d2fd..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftApi.md +++ /dev/null @@ -1,400 +0,0 @@ -# UnclaimedDraftApi - -All URIs are relative to *https://api.hellosign.com/v3* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -[**unclaimedDraftCreate**](UnclaimedDraftApi.md#unclaimedDraftCreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft -[**unclaimedDraftCreateEmbedded**](UnclaimedDraftApi.md#unclaimedDraftCreateEmbedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft -[**unclaimedDraftCreateEmbeddedWithTemplate**](UnclaimedDraftApi.md#unclaimedDraftCreateEmbeddedWithTemplate) | **POST** /unclaimed_draft/create_embedded_with_template | Create Embedded Unclaimed Draft with Template -[**unclaimedDraftEditAndResend**](UnclaimedDraftApi.md#unclaimedDraftEditAndResend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft - - - -## unclaimedDraftCreate - -> UnclaimedDraftCreateResponse unclaimedDraftCreate(unclaimedDraftCreateRequest) - -Create Unclaimed Draft - -Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class UnclaimedDraftCreateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var signers1 = new SubUnclaimedDraftSigner(); - signers1.name("Jack"); - signers1.emailAddress("jack@example.com"); - signers1.order(0); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); - unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); - unclaimedDraftCreateRequest.testMode(true); - unclaimedDraftCreateRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - unclaimedDraftCreateRequest.signers(signers); - - try - { - var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( - unclaimedDraftCreateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **unclaimedDraftCreateRequest** | [**UnclaimedDraftCreateRequest**](UnclaimedDraftCreateRequest.md)| | - -### Return type - -[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## unclaimedDraftCreateEmbedded - -> UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded(unclaimedDraftCreateEmbeddedRequest) - -Create Embedded Unclaimed Draft - -Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - -**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class UnclaimedDraftCreateEmbeddedExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); - unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); - unclaimedDraftCreateEmbeddedRequest.testMode(true); - unclaimedDraftCreateEmbeddedRequest.files(List.of ( - new File("./example_signature_request.pdf") - )); - - try - { - var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( - unclaimedDraftCreateEmbeddedRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); - 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 | -|------------- | ------------- | ------------- | -------------| - **unclaimedDraftCreateEmbeddedRequest** | [**UnclaimedDraftCreateEmbeddedRequest**](UnclaimedDraftCreateEmbeddedRequest.md)| | - -### Return type - -[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## unclaimedDraftCreateEmbeddedWithTemplate - -> UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate(unclaimedDraftCreateEmbeddedWithTemplateRequest) - -Create Embedded Unclaimed Draft with Template - -Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. - -**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class UnclaimedDraftCreateEmbeddedWithTemplateExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var ccs1 = new SubCC(); - ccs1.role("Accounting"); - ccs1.emailAddress("accounting@dropboxsign.com"); - - var ccs = new ArrayList(List.of ( - ccs1 - )); - - var signers1 = new SubUnclaimedDraftTemplateSigner(); - signers1.role("Client"); - signers1.name("George"); - signers1.emailAddress("george@example.com"); - - var signers = new ArrayList(List.of ( - signers1 - )); - - var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); - unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); - unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( - "61a832ff0d8423f91d503e76bfbcc750f7417c78" - )); - unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); - unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); - unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); - - try - { - var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( - unclaimedDraftCreateEmbeddedWithTemplateRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); - 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 | -|------------- | ------------- | ------------- | -------------| - **unclaimedDraftCreateEmbeddedWithTemplateRequest** | [**UnclaimedDraftCreateEmbeddedWithTemplateRequest**](UnclaimedDraftCreateEmbeddedWithTemplateRequest.md)| | - -### Return type - -[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json, multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - - -## unclaimedDraftEditAndResend - -> UnclaimedDraftCreateResponse unclaimedDraftEditAndResend(signatureRequestId, unclaimedDraftEditAndResendRequest) - -Edit and Resend Unclaimed Draft - -Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. - -**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. - -### Example - -```java -package com.dropbox.sign_sandbox; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.api.*; -import com.dropbox.sign.auth.*; -import com.dropbox.sign.JSON; -import com.dropbox.sign.model.*; - -import java.io.File; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class UnclaimedDraftEditAndResendExample -{ - public static void main(String[] args) - { - var config = Configuration.getDefaultApiClient(); - config.setUsername("YOUR_API_KEY"); - // config.setAccessToken("YOUR_ACCESS_TOKEN"); - - var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); - unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); - unclaimedDraftEditAndResendRequest.testMode(false); - - try - { - var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( - "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId - unclaimedDraftEditAndResendRequest - ); - - System.out.println(response); - } catch (ApiException e) { - System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); - 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 | -|------------- | ------------- | ------------- | -------------| - **signatureRequestId** | **String**| The ID of the signature request to edit and resend. | - **unclaimedDraftEditAndResendRequest** | [**UnclaimedDraftEditAndResendRequest**](UnclaimedDraftEditAndResendRequest.md)| | - -### Return type - -[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) - -### Authorization - -[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| -| **4XX** | failed_operation | - | - diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md deleted file mode 100644 index aab362d77..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md +++ /dev/null @@ -1,58 +0,0 @@ - - -# UnclaimedDraftCreateEmbeddedRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `requesterEmailAddress`*_required_ | ```String``` | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `forceSignerPage` | ```Boolean``` | Provide users the ability to review/edit the signers. | | -| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the subject and message. | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | | -| `holdRequest` | ```Boolean``` | The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | | -| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | -| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `signers` | [```List```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | -| `type` | [```TypeEnum```](#TypeEnum) | The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. | | -| `usePreexistingFields` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | -| `useTextTags` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | | - - - -## Enum: TypeEnum - -| Name | Value | ----- | ----- -| SEND_DOCUMENT | "send_document" | -| REQUEST_SIGNATURE | "request_signature" | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md deleted file mode 100644 index 03ad8b9e5..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# UnclaimedDraftCreateEmbeddedWithTemplateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `requesterEmailAddress`*_required_ | ```String``` | The email address of the user that should be designated as the requester of this draft. | | -| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | -| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | -| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | -| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `files` | ```List``` | Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | | -| `fileUrls` | ```List``` | Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | | -| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | -| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | -| `holdRequest` | ```Boolean``` | The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | | -| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `previewOnly` | ```Boolean``` | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

- `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience.

**NOTE:** This parameter overwrites `show_preview=1` (if set). | | -| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | -| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `signers` | [```List```](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | -| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | -| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | -| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md deleted file mode 100644 index f23c6f4ba..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# UnclaimedDraftCreateRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `type`*_required_ | [```TypeEnum```](#TypeEnum) | The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. | | -| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | -| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | -| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | -| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | -| `clientId` | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | -| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | -| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | -| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | -| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | -| `hideTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | | -| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | -| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `signers` | [```List```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | -| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | -| `usePreexistingFields` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | -| `useTextTags` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | -| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | | - - - -## Enum: TypeEnum - -| Name | Value | ----- | ----- -| SEND_DOCUMENT | "send_document" | -| REQUEST_SIGNATURE | "request_signature" | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md b/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md deleted file mode 100644 index d2d3a7c4a..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# UnclaimedDraftCreateResponse - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `unclaimedDraft`*_required_ | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | | | -| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md deleted file mode 100644 index 8eb306a31..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# UnclaimedDraftEditAndResendRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | -| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | -| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. | | -| `requesterEmailAddress` | ```String``` | The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. | | -| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | -| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | - - - diff --git a/sdks/java-v1/docs/UnclaimedDraftResponse.md b/sdks/java-v1/docs/UnclaimedDraftResponse.md deleted file mode 100644 index ab470a27d..000000000 --- a/sdks/java-v1/docs/UnclaimedDraftResponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# UnclaimedDraftResponse - -A group of documents that a user can take ownership of via the claim URL. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `signatureRequestId` | ```String``` | The ID of the signature request that is represented by this UnclaimedDraft. | | -| `claimUrl` | ```String``` | The URL to be used to claim this UnclaimedDraft. | | -| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | -| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). | | -| `expiresAt` | ```Integer``` | When the link expires. | | -| `testMode` | ```Boolean``` | Whether this is a test draft. Signature requests made from test drafts have no legal value. | | - - - diff --git a/sdks/java-v1/docs/WarningResponse.md b/sdks/java-v1/docs/WarningResponse.md deleted file mode 100644 index 50cad9b58..000000000 --- a/sdks/java-v1/docs/WarningResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# WarningResponse - -A list of warnings. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| `warningMsg`*_required_ | ```String``` | Warning message | | -| `warningName`*_required_ | ```String``` | Warning name | | - - - diff --git a/sdks/java-v1/gradle.properties b/sdks/java-v1/gradle.properties index a3f97a126..0619b8830 100644 --- a/sdks/java-v1/gradle.properties +++ b/sdks/java-v1/gradle.properties @@ -6,7 +6,7 @@ #target = android GROUP=com.dropbox.sign POM_ARTIFACT_ID=dropbox-sign -VERSION_NAME=1.8-dev +VERSION_NAME=1.8.1-dev POM_NAME=Dropbox Sign Java SDK POM_DESCRIPTION=Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v1/openapi-config.yaml b/sdks/java-v1/openapi-config.yaml index 398867abf..9365d0179 100644 --- a/sdks/java-v1/openapi-config.yaml +++ b/sdks/java-v1/openapi-config.yaml @@ -16,7 +16,7 @@ additionalProperties: groupId: com.dropbox.sign artifactId: dropbox-sign artifactName: Dropbox Sign Java SDK - artifactVersion: "1.8-dev" + artifactVersion: "1.8.1-dev" artifactUrl: https://github.com/hellosign/dropbox-sign-java artifactDescription: Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! scmConnection: scm:git:git://github.com/hellosign/dropbox-sign-java.git diff --git a/sdks/java-v1/run-build b/sdks/java-v1/run-build index ce4f11eff..6a103f861 100755 --- a/sdks/java-v1/run-build +++ b/sdks/java-v1/run-build @@ -18,7 +18,7 @@ rm -f "${DIR}/src/main/java/com/dropbox/sign/model/"*.java docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/java-v1/src/main/AndroidManifest.xml b/sdks/java-v1/src/main/AndroidManifest.xml deleted file mode 100644 index f709040ef..000000000 --- a/sdks/java-v1/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java deleted file mode 100644 index 9a82b95d3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ /dev/null @@ -1,1328 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import com.dropbox.sign.auth.ApiKeyAuth; -import com.dropbox.sign.auth.Authentication; -import com.dropbox.sign.auth.HttpBasicAuth; -import com.dropbox.sign.auth.HttpBearerAuth; -import com.dropbox.sign.model.ErrorResponse; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.logging.Logger; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.Entity; -import javax.ws.rs.client.Invocation; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.GenericType; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import org.glassfish.jersey.client.ClientConfig; -import org.glassfish.jersey.client.ClientProperties; -import org.glassfish.jersey.client.HttpUrlConnectorProvider; -import org.glassfish.jersey.jackson.JacksonFeature; -import org.glassfish.jersey.logging.LoggingFeature; -import org.glassfish.jersey.media.multipart.FormDataBodyPart; -import org.glassfish.jersey.media.multipart.FormDataContentDisposition; -import org.glassfish.jersey.media.multipart.MultiPart; -import org.glassfish.jersey.media.multipart.MultiPartFeature; - -/** ApiClient class. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ApiClient extends JavaTimeFormatter { - private static final Pattern JSON_MIME_PATTERN = - Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - - protected Map defaultHeaderMap = new HashMap<>(); - protected Map defaultCookieMap = new HashMap<>(); - protected String basePath = "https://api.hellosign.com/v3"; - protected String userAgent; - private static final Logger log = Logger.getLogger(ApiClient.class.getName()); - - protected List servers = - new ArrayList<>( - Arrays.asList( - new ServerConfiguration( - "https://api.hellosign.com/v3", - "No description provided", - new LinkedHashMap<>()))); - protected Integer serverIndex = 0; - protected Map serverVariables = null; - protected Map> operationServers; - - { - Map> operationServers = new HashMap<>(); - operationServers.put( - "OAuthApi.oauthTokenGenerate", - new ArrayList<>( - Arrays.asList( - new ServerConfiguration( - "https://app.hellosign.com", - "No description provided", - new LinkedHashMap<>())))); - operationServers.put( - "OAuthApi.oauthTokenRefresh", - new ArrayList<>( - Arrays.asList( - new ServerConfiguration( - "https://app.hellosign.com", - "No description provided", - new LinkedHashMap<>())))); - this.operationServers = operationServers; - } - - protected Map operationServerIndex = new HashMap<>(); - protected Map> operationServerVariables = new HashMap<>(); - protected boolean debugging = false; - protected ClientConfig clientConfig; - protected int connectionTimeout = 0; - private int readTimeout = 0; - - protected Client httpClient; - protected JSON json; - protected String tempFolderPath = null; - - protected Map authentications; - protected Map authenticationLookup; - - protected DateFormat dateFormat; - - /** Constructs a new ApiClient with default parameters. */ - public ApiClient() { - this(null); - } - - /** - * Constructs a new ApiClient with the specified authentication parameters. - * - * @param authMap A hash map containing authentication parameters. - */ - public ApiClient(Map authMap) { - json = new JSON(); - httpClient = buildHttpClient(); - - this.dateFormat = new RFC3339DateFormat(); - - // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.8-dev/java"); - - // Setup authentications (key: authentication name, value: authentication). - authentications = new HashMap<>(); - Authentication auth = null; - if (authMap != null) { - auth = authMap.get("api_key"); - } - if (auth instanceof HttpBasicAuth) { - authentications.put("api_key", auth); - } else { - authentications.put("api_key", new HttpBasicAuth()); - } - if (authMap != null) { - auth = authMap.get("oauth2"); - } - if (auth instanceof HttpBearerAuth) { - authentications.put("oauth2", auth); - } else { - authentications.put("oauth2", new HttpBearerAuth("bearer")); - } - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - - // Setup authentication lookup (key: authentication alias, value: authentication name) - authenticationLookup = new HashMap<>(); - } - - /** - * Gets the JSON instance to do JSON serialization and deserialization. - * - * @return JSON - */ - public JSON getJSON() { - return json; - } - - /** - * Getter for the field httpClient. - * - * @return a {@link javax.ws.rs.client.Client} object. - */ - public Client getHttpClient() { - return httpClient; - } - - /** - * Setter for the field httpClient. - * - * @param httpClient a {@link javax.ws.rs.client.Client} object. - * @return a {@link ApiClient} object. - */ - public ApiClient setHttpClient(Client httpClient) { - this.httpClient = httpClient; - return this; - } - - /** - * Returns the base URL to the location where the OpenAPI document is being served. - * - * @return The base URL to the target host. - */ - public String getBasePath() { - return basePath; - } - - /** - * Sets the base URL to the location where the OpenAPI document is being served. - * - * @param basePath The base URL to the target host. - * @return a {@link ApiClient} object. - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - return this; - } - - /** - * Getter for the field servers. - * - * @return a {@link java.util.List} of servers. - */ - public List getServers() { - return servers; - } - - /** - * Setter for the field servers. - * - * @param servers a {@link java.util.List} of servers. - * @return a {@link ApiClient} object. - */ - public ApiClient setServers(List servers) { - this.servers = servers; - updateBasePath(); - return this; - } - - /** - * Getter for the field serverIndex. - * - * @return a {@link java.lang.Integer} object. - */ - public Integer getServerIndex() { - return serverIndex; - } - - /** - * Setter for the field serverIndex. - * - * @param serverIndex the server index - * @return a {@link ApiClient} object. - */ - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - updateBasePath(); - return this; - } - - /** - * Getter for the field serverVariables. - * - * @return a {@link java.util.Map} of server variables. - */ - public Map getServerVariables() { - return serverVariables; - } - - /** - * Setter for the field serverVariables. - * - * @param serverVariables a {@link java.util.Map} of server variables. - * @return a {@link ApiClient} object. - */ - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; - updateBasePath(); - return this; - } - - private void updateBasePath() { - if (serverIndex != null) { - setBasePath(servers.get(serverIndex).URL(serverVariables)); - } - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication object - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - * @return a {@link ApiClient} object. - */ - public ApiClient setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return this; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - * @return a {@link ApiClient} object. - */ - public ApiClient setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return this; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - * @return a {@link ApiClient} object. - */ - public ApiClient setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(apiKey); - return this; - } else if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return this; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set bearer token for the first Bearer authentication. - * - * @param bearerToken Bearer token - * @return a {@link ApiClient} object. - */ - public ApiClient setBearerToken(String bearerToken) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBearerAuth) { - ((HttpBearerAuth) auth).setBearerToken(bearerToken); - return this; - } - } - throw new RuntimeException("No Bearer authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent Http user agent - * @return a {@link ApiClient} object. - */ - public ApiClient setUserAgent(String userAgent) { - this.userAgent = userAgent; - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Get the User-Agent header's value. - * - * @return User-Agent string - */ - public String getUserAgent() { - return userAgent; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return a {@link ApiClient} object. - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return a {@link ApiClient} object. - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - - /** - * Gets the client config. - * - * @return Client config - */ - public ClientConfig getClientConfig() { - return clientConfig; - } - - /** - * Set the client config. - * - * @param clientConfig Set the client config - * @return a {@link ApiClient} object. - */ - public ApiClient setClientConfig(ClientConfig clientConfig) { - this.clientConfig = clientConfig; - // Rebuild HTTP Client according to the new "clientConfig" value. - this.httpClient = buildHttpClient(); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is switched on - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return a {@link ApiClient} object. - */ - public ApiClient setDebugging(boolean debugging) { - this.debugging = debugging; - // Rebuild HTTP Client according to the new "debugging" value. - this.httpClient = buildHttpClient(); - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints with file - * response. The default value is null, i.e. using the system's default temporary - * folder. - * - * @return Temp folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set temp folder path - * - * @param tempFolderPath Temp folder path - * @return a {@link ApiClient} object. - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Connect timeout (in milliseconds). - * - * @return Connection timeout - */ - public int getConnectTimeout() { - return connectionTimeout; - } - - /** - * Set the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values - * must be between 1 and {@link Integer#MAX_VALUE}. - * - * @param connectionTimeout Connection timeout in milliseconds - * @return a {@link ApiClient} object. - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - this.connectionTimeout = connectionTimeout; - httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); - return this; - } - - /** - * read timeout (in milliseconds). - * - * @return Read timeout - */ - public int getReadTimeout() { - return readTimeout; - } - - /** - * Set the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must - * be between 1 and {@link Integer#MAX_VALUE}. - * - * @param readTimeout Read timeout in milliseconds - * @return a {@link ApiClient} object. - */ - public ApiClient setReadTimeout(int readTimeout) { - this.readTimeout = readTimeout; - httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout); - return this; - } - - /** - * Get the date format used to parse/format date parameters. - * - * @return Date format - */ - public DateFormat getDateFormat() { - return dateFormat; - } - - /** - * Set the date format used to parse/format date parameters. - * - * @param dateFormat Date format - * @return a {@link ApiClient} object. - */ - public ApiClient setDateFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - // also set the date format for model (de)serialization with Date properties - this.json.setDateFormat((DateFormat) dateFormat.clone()); - return this; - } - - /** - * Parse the given string into Date object. - * - * @param str String - * @return Date - */ - public Date parseDate(String str) { - try { - return dateFormat.parse(str); - } catch (java.text.ParseException e) { - throw new RuntimeException(e); - } - } - - /** - * Format the given Date object into string. - * - * @param date Date - * @return Date in string format - */ - public String formatDate(Date date) { - return dateFormat.format(date); - } - - /** - * Format the given parameter object into string. - * - * @param param Object - * @return Object in string format - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date) { - return formatDate((Date) param); - } else if (param instanceof OffsetDateTime) { - return formatOffsetDateTime((OffsetDateTime) param); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { - b.append(','); - } - b.append(String.valueOf(o)); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /* - * Format to {@code Pair} objects. - * - * @param collectionFormat Collection format - * @param name Name - * @param value Value - * @return List of pairs - */ - public List parameterToPairs(String collectionFormat, String name, Object value) { - List params = new ArrayList<>(); - - // preconditions - if (name == null || name.isEmpty() || value == null) return params; - - Collection valueCollection; - if (value instanceof Collection) { - valueCollection = (Collection) value; - } else { - params.add(new Pair(name, parameterToString(value))); - return params; - } - - if (valueCollection.isEmpty()) { - return params; - } - - // get the collection format (default: csv) - String format = - (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); - - // create the params based on the collection format - if ("multi".equals(format)) { - for (Object item : valueCollection) { - params.add(new Pair(name, parameterToString(item))); - } - - return params; - } - - String delimiter = ","; - - if ("csv".equals(format)) { - delimiter = ","; - } else if ("ssv".equals(format)) { - delimiter = " "; - } else if ("tsv".equals(format)) { - delimiter = "\t"; - } else if ("pipes".equals(format)) { - delimiter = "|"; - } - - StringBuilder sb = new StringBuilder(); - for (Object item : valueCollection) { - sb.append(delimiter); - sb.append(parameterToString(item)); - } - - params.add(new Pair(name, sb.substring(1))); - - return params; - } - - /** - * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json - * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "*{@literal /}*" - * is also considered JSON by this method. - * - * @param mime MIME - * @return True if the MIME type is JSON - */ - public boolean isJsonMime(String mime) { - return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches()); - } - - /** - * Select the Accept header's value from the given accepts array: if JSON exists in the given - * array, use it; otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, null will be returned (not to - * set the Accept header explicitly). - */ - public String selectHeaderAccept(String... accepts) { - if (accepts == null || accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: if JSON exists in the given - * array, use it; otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, JSON will be used. - */ - public String selectHeaderContentType(String... contentTypes) { - if (contentTypes == null || contentTypes.length == 0) { - return "application/json"; - } - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Serialize the given Java object into string entity according the given Content-Type (only - * JSON is supported for now). - * - * @param obj Object - * @param formParams Form parameters - * @param contentType Context type - * @return Entity - * @throws ApiException API exception - */ - public Entity serialize( - Object obj, Map formParams, String contentType, boolean isBodyNullable) - throws ApiException { - Entity entity; - if (contentType.startsWith("multipart/form-data")) { - MultiPart multiPart = new MultiPart(); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()) - .size(file.length()) - .build(); - - // Attempt to probe the content type for the file so that the form part is more - // correctly - // and precisely identified, but fall back to application/octet-stream if that - // fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); - } else { - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart( - new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); - } - } - entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); - } else if (contentType.startsWith("application/x-www-form-urlencoded")) { - Form form = new Form(); - for (Entry param : formParams.entrySet()) { - form.param(param.getKey(), parameterToString(param.getValue())); - } - entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); - } else { - // We let jersey handle the serialization - if (isBodyNullable) { // payload is nullable - if (obj instanceof String) { - entity = - Entity.entity( - obj == null - ? "null" - : "\"" - + ((String) obj) - .replaceAll( - "\"", - Matcher.quoteReplacement( - "\\\"")) - + "\"", - contentType); - } else { - entity = Entity.entity(obj == null ? "null" : obj, contentType); - } - } else { - if (obj instanceof String) { - entity = - Entity.entity( - obj == null - ? "" - : "\"" - + ((String) obj) - .replaceAll( - "\"", - Matcher.quoteReplacement( - "\\\"")) - + "\"", - contentType); - } else { - entity = Entity.entity(obj == null ? "" : obj, contentType); - } - } - } - return entity; - } - - /** - * Serialize the given Java object into string according the given Content-Type (only JSON, HTTP - * form is supported for now). - * - * @param obj Object - * @param formParams Form parameters - * @param contentType Context type - * @param isBodyNullable True if the body is nullable - * @return String - * @throws ApiException API exception - */ - public String serializeToString( - Object obj, Map formParams, String contentType, boolean isBodyNullable) - throws ApiException { - try { - if (contentType.startsWith("multipart/form-data")) { - throw new ApiException( - "multipart/form-data not yet supported for serializeToString (http" - + " signature authentication)"); - } else if (contentType.startsWith("application/x-www-form-urlencoded")) { - String formString = ""; - for (Entry param : formParams.entrySet()) { - formString = - param.getKey() - + "=" - + URLEncoder.encode( - parameterToString(param.getValue()), "UTF-8") - + "&"; - } - - if (formString.length() == 0) { // empty string - return formString; - } else { - return formString.substring(0, formString.length() - 1); - } - } else { - if (isBodyNullable) { - return obj == null ? "null" : json.getMapper().writeValueAsString(obj); - } else { - return obj == null ? "" : json.getMapper().writeValueAsString(obj); - } - } - } catch (Exception ex) { - throw new ApiException("Failed to perform serializeToString: " + ex.toString()); - } - } - - /** - * Deserialize response body to Java object according to the Content-Type. - * - * @param Type - * @param response Response - * @param returnType Return type - * @return Deserialize object - * @throws ApiException API exception - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, GenericType returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - return (T) response.readEntity(byte[].class); - } else if (returnType.getRawType() == File.class) { - // Handle file downloading. - T file = (T) downloadFileFromResponse(response); - return file; - } - - // read the entity stream multiple times - response.bufferEntity(); - - return response.readEntity(returnType); - } - - /** - * Download file from the given response. - * - * @param response Response - * @return File - * @throws ApiException If fail to read file content from response and write to disk - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - Files.copy( - response.readEntity(InputStream.class), - file.toPath(), - StandardCopyOption.REPLACE_EXISTING); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare the file for download from the response. - * - * @param response a {@link javax.ws.rs.core.Response} object. - * @return a {@link java.io.File} object. - * @throws java.io.IOException if any. - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) filename = matcher.group(1); - } - - String prefix; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf('.'); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) prefix = "download-"; - } - - if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); - else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * Invoke API by sending HTTP request with the given options. - * - * @param Type - * @param operation The qualified name of the operation - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE" - * @param queryParams The query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param accept The request's Accept header - * @param contentType The request's Content-Type header - * @param authNames The authentications to apply - * @param returnType The return type into which to deserialize the response - * @param isBodyNullable True if the body is nullable - * @return The response body in type of string - * @throws ApiException API exception - */ - public ApiResponse invokeAPI( - String operation, - String path, - String method, - List queryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String accept, - String contentType, - String[] authNames, - GenericType returnType, - boolean isBodyNullable) - throws ApiException { - - String targetURL; - List serverConfigurations; - if (serverIndex != null - && (serverConfigurations = operationServers.get(operation)) != null) { - int index = operationServerIndex.getOrDefault(operation, serverIndex).intValue(); - Map variables = - operationServerVariables.getOrDefault(operation, serverVariables); - if (index < 0 || index >= serverConfigurations.size()) { - throw new ArrayIndexOutOfBoundsException( - String.format( - "Invalid index %d when selecting the host settings. Must be less" - + " than %d", - index, serverConfigurations.size())); - } - targetURL = serverConfigurations.get(index).URL(variables) + path; - } else { - targetURL = this.basePath + path; - } - // Not using `.target(targetURL).path(path)` below, - // to support (constant) query string in `path`, e.g. "/posts?draft=1" - WebTarget target = httpClient.target(targetURL); - - if (queryParams != null) { - for (Pair queryParam : queryParams) { - if (queryParam.getValue() != null) { - target = - target.queryParam( - queryParam.getName(), escapeString(queryParam.getValue())); - } - } - } - - Invocation.Builder invocationBuilder = target.request(); - - if (accept != null) { - invocationBuilder = invocationBuilder.accept(accept); - } - - for (Entry entry : cookieParams.entrySet()) { - String value = entry.getValue(); - if (value != null) { - invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); - } - } - - for (Entry entry : defaultCookieMap.entrySet()) { - String value = entry.getValue(); - if (value != null) { - invocationBuilder = invocationBuilder.cookie(entry.getKey(), value); - } - } - - Entity entity = serialize(body, formParams, contentType, isBodyNullable); - - // put all headers in one place - Map allHeaderParams = new HashMap<>(defaultHeaderMap); - allHeaderParams.putAll(headerParams); - - if (authNames != null) { - // update different parameters (e.g. headers) for authentication - updateParamsForAuth( - authNames, - queryParams, - allHeaderParams, - cookieParams, - null, - method, - target.getUri()); - } - - for (Entry entry : allHeaderParams.entrySet()) { - String value = entry.getValue(); - if (value != null) { - invocationBuilder = invocationBuilder.header(entry.getKey(), value); - } - } - - Response response = null; - - try { - response = sendRequest(method, invocationBuilder, entity); - - final int statusCode = response.getStatusInfo().getStatusCode(); - - Map> responseHeaders = buildResponseHeaders(response); - - if (statusCode == Status.NO_CONTENT.getStatusCode()) { - return new ApiResponse(statusCode, responseHeaders); - } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { - if (returnType == null) { - return new ApiResponse(statusCode, responseHeaders); - } else { - return new ApiResponse( - statusCode, responseHeaders, deserialize(response, returnType)); - } - } else { - String message = "error"; - String respBody = null; - ErrorResponse errorResponse = null; - if (response.hasEntity()) { - try { - if (response.getStatusInfo().getFamily() == Status.Family.CLIENT_ERROR) { - errorResponse = response.readEntity(ErrorResponse.class); - respBody = errorResponse.toString(); - message = respBody; - } else { - respBody = String.valueOf(response.readEntity(String.class)); - message = respBody; - } - } catch (RuntimeException e) { - // e.printStackTrace(); - } - } - throw new ApiException( - response.getStatus(), - message, - buildResponseHeaders(response), - respBody, - errorResponse); - } - } finally { - try { - response.close(); - } catch (Exception e) { - // it's not critical, since the response object is local in method invokeAPI; that's - // fine, - // just continue - } - } - } - - private Response sendRequest( - String method, Invocation.Builder invocationBuilder, Entity entity) { - Response response; - if ("POST".equals(method)) { - response = invocationBuilder.post(entity); - } else if ("PUT".equals(method)) { - response = invocationBuilder.put(entity); - } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); - } else if ("PATCH".equals(method)) { - response = invocationBuilder.method("PATCH", entity); - } else { - response = invocationBuilder.method(method); - } - return response; - } - - /** - * @deprecated Add qualified name of the operation as a first parameter. - */ - @Deprecated - public ApiResponse invokeAPI( - String path, - String method, - List queryParams, - Object body, - Map headerParams, - Map cookieParams, - Map formParams, - String accept, - String contentType, - String[] authNames, - GenericType returnType, - boolean isBodyNullable) - throws ApiException { - return invokeAPI( - null, - path, - method, - queryParams, - body, - headerParams, - cookieParams, - formParams, - accept, - contentType, - authNames, - returnType, - isBodyNullable); - } - - /** - * Build the Client used to make HTTP requests. - * - * @return Client - */ - protected Client buildHttpClient() { - // recreate the client config to pickup changes - clientConfig = getDefaultClientConfig(); - - ClientBuilder clientBuilder = ClientBuilder.newBuilder(); - clientBuilder = clientBuilder.withConfig(clientConfig); - customizeClientBuilder(clientBuilder); - return clientBuilder.build(); - } - - /** - * Get the default client config. - * - * @return Client config - */ - public ClientConfig getDefaultClientConfig() { - ClientConfig clientConfig = new ClientConfig(); - clientConfig.register(MultiPartFeature.class); - clientConfig.register(json); - clientConfig.register(JacksonFeature.class); - clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); - // turn off compliance validation to be able to send payloads with DELETE calls - clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); - if (debugging) { - clientConfig.register( - new LoggingFeature( - java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), - java.util.logging.Level.INFO, - LoggingFeature.Verbosity.PAYLOAD_ANY, - 1024 * 50 /* Log payloads up to 50K */)); - clientConfig.property( - LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); - // Set logger to ALL - java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME) - .setLevel(java.util.logging.Level.ALL); - } else { - // suppress warnings for payloads with DELETE calls: - java.util.logging.Logger.getLogger("org.glassfish.jersey.client") - .setLevel(java.util.logging.Level.SEVERE); - } - - return clientConfig; - } - - /** - * Customize the client builder. - * - *

This method can be overridden to customize the API client. For example, this can be used - * to: 1. Set the hostname verifier to be used by the client to verify the endpoint's hostname - * against its identification information. 2. Set the client-side key store. 3. Set the SSL - * context that will be used when creating secured transport connections to server endpoints - * from web targets created by the client instance that is using this SSL context. 4. Set the - * client-side trust store. - * - *

To completely disable certificate validation (at your own risk), you can override this - * method and invoke disableCertificateValidation(clientBuilder). - * - * @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object. - */ - protected void customizeClientBuilder(ClientBuilder clientBuilder) { - // No-op extension point - } - - /** - * Disable X.509 certificate validation in TLS connections. - * - *

Please note that trusting all certificates is extremely risky. This may be useful in a - * development environment with self-signed certificates. - * - * @param clientBuilder a {@link javax.ws.rs.client.ClientBuilder} object. - * @throws java.security.KeyManagementException if any. - * @throws java.security.NoSuchAlgorithmException if any. - */ - protected void disableCertificateValidation(ClientBuilder clientBuilder) - throws KeyManagementException, NoSuchAlgorithmException { - TrustManager[] trustAllCerts = - new X509TrustManager[] { - new X509TrustManager() { - @Override - public X509Certificate[] getAcceptedIssuers() { - return null; - } - - @Override - public void checkClientTrusted(X509Certificate[] certs, String authType) {} - - @Override - public void checkServerTrusted(X509Certificate[] certs, String authType) {} - } - }; - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(null, trustAllCerts, new SecureRandom()); - clientBuilder.sslContext(sslContext); - } - - /** - * Build the response headers. - * - * @param response a {@link javax.ws.rs.core.Response} object. - * @return a {@link java.util.Map} of response headers. - */ - protected Map> buildResponseHeaders(Response response) { - Map> responseHeaders = new HashMap<>(); - for (Entry> entry : response.getHeaders().entrySet()) { - List values = entry.getValue(); - List headers = new ArrayList<>(); - for (Object o : values) { - headers.add(String.valueOf(o)); - } - responseHeaders.put(entry.getKey(), headers); - } - return responseHeaders; - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param method HTTP method (e.g. POST) - * @param uri HTTP URI - */ - protected void updateParamsForAuth( - String[] authNames, - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - continue; - } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); - } - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java deleted file mode 100644 index 28ae24fc6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import com.dropbox.sign.model.ErrorResponse; -import java.util.List; -import java.util.Map; - -/** API Exception */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ApiException extends Exception { - private static final long serialVersionUID = 1L; - - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - private ErrorResponse errorResponse; - - public ApiException() {} - - public ApiException(Throwable throwable) { - super(throwable); - } - - public ApiException(String message) { - super(message); - } - - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders, - String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - public ApiException( - String message, - int code, - Map> responseHeaders, - String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - public ApiException( - String message, - Throwable throwable, - int code, - Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); - } - - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - public ApiException( - int code, - String message, - Map> responseHeaders, - String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - public ApiException( - int code, - String message, - Map> responseHeaders, - String responseBody, - ErrorResponse errorResponse) { - this(code, message, responseHeaders, responseBody); - this.errorResponse = errorResponse; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - public ErrorResponse getErrorResponse() { - return errorResponse; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java deleted file mode 100644 index 7f5f3703f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - * - * @param The type of data that is deserialized from response body - */ -public class ApiResponse { - private final int statusCode; - private final Map> headers; - private final T data; - - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - * Get the status code - * - * @return status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - * Get the headers - * - * @return map of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - * Get the data - * - * @return data - */ - public T getData() { - return data; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java deleted file mode 100644 index e2ebcc458..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class Configuration { - public static final String VERSION = "1.8-dev"; - - 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; - } - - /** - * Set the default API client, which would be used when creating API instances without providing - * an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java deleted file mode 100644 index aa9ef43a8..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import com.dropbox.sign.model.EventCallbackRequest; -import com.dropbox.sign.model.EventCallbackRequestEventMetadata; -import org.apache.commons.codec.digest.HmacAlgorithms; -import org.apache.commons.codec.digest.HmacUtils; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class EventCallbackHelper { - public static final String EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; - - public static final String EVENT_TYPE_APP_CALLBACK = "app_callback"; - - private EventCallbackHelper() {} - - /** - * Verify that a callback came from HelloSign.com - * - * @param apiKey - * @param eventCallback - * @return a boolean value indicating whether the callback event is valid - */ - public static boolean isValid(String apiKey, EventCallbackRequest eventCallback) { - return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, apiKey) - .hmacHex( - eventCallback.getEvent().getEventTime() - + eventCallback.getEvent().getEventType()) - .equals(eventCallback.getEvent().getEventHash()); - } - - /** - * Identifies the callback type, one of "account_callback" or "app_callback". - * - *

"app_callback" will always include a value for "reported_for_app_id" - * - * @param eventCallback - */ - public static String getCallbackType(EventCallbackRequest eventCallback) { - EventCallbackRequestEventMetadata metadata = eventCallback.getEvent().getEventMetadata(); - - if (metadata == null - || metadata.getReportedForAppId() == null - || metadata.getReportedForAppId().isEmpty()) { - return EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; - } - - return EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java deleted file mode 100644 index 5bcb4733e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import com.dropbox.sign.model.*; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.*; -import com.fasterxml.jackson.databind.json.JsonMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import java.text.DateFormat; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import javax.ws.rs.core.GenericType; -import javax.ws.rs.ext.ContextResolver; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class JSON implements ContextResolver { - private ObjectMapper mapper; - - public JSON() { - mapper = - JsonMapper.builder() - .serializationInclusion(JsonInclude.Include.NON_NULL) - .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) - .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) - .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) - .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) - .defaultDateFormat(new RFC3339DateFormat()) - .addModule(new JavaTimeModule()) - .build(); - } - - /** - * Set the date format for JSON (de)serialization with Date properties. - * - * @param dateFormat Date format - */ - public void setDateFormat(DateFormat dateFormat) { - mapper.setDateFormat(dateFormat); - } - - @Override - public ObjectMapper getContext(Class type) { - return mapper; - } - - /** - * Get the object mapper - * - * @return object mapper - */ - public ObjectMapper getMapper() { - return mapper; - } - - /** - * Returns the target model class that should be used to deserialize the input data. The - * discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param modelClass The class that contains the discriminator mappings. - */ - public static Class getClassForElement(JsonNode node, Class modelClass) { - ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); - if (cdm != null) { - return cdm.getClassForElement(node, new HashSet<>()); - } - return null; - } - - /** Helper class to register the discriminator mappings. */ - private static class ClassDiscriminatorMapping { - // The model class name. - Class modelClass; - // The name of the discriminator property. - String discriminatorName; - // The discriminator mappings for a model class. - Map> discriminatorMappings; - - // Constructs a new class discriminator. - ClassDiscriminatorMapping( - Class cls, String propertyName, Map> mappings) { - modelClass = cls; - discriminatorName = propertyName; - discriminatorMappings = new HashMap<>(); - if (mappings != null) { - discriminatorMappings.putAll(mappings); - } - } - - // Return the name of the discriminator property for this model class. - String getDiscriminatorPropertyName() { - return discriminatorName; - } - - // Return the discriminator value or null if the discriminator is not - // present in the payload. - String getDiscriminatorValue(JsonNode node) { - // Determine the value of the discriminator property in the input data. - if (discriminatorName != null) { - // Get the value of the discriminator property, if present in the input payload. - node = node.get(discriminatorName); - if (node != null && node.isValueNode()) { - String discrValue = node.asText(); - if (discrValue != null) { - return discrValue; - } - } - } - return null; - } - - /** - * Returns the target model class that should be used to deserialize the input data. This - * function can be invoked for anyOf/oneOf composed models with discriminator mappings. The - * discriminator mappings are used to determine the target model class. - * - * @param node The input data. - * @param visitedClasses The set of classes that have already been visited. - */ - Class getClassForElement(JsonNode node, Set> visitedClasses) { - if (visitedClasses.contains(modelClass)) { - // Class has already been visited. - return null; - } - // Determine the value of the discriminator property in the input data. - String discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - return null; - } - Class cls = discriminatorMappings.get(discrValue); - // It may not be sufficient to return this cls directly because that target class - // may itself be a composed schema, possibly with its own discriminator. - visitedClasses.add(modelClass); - for (Class childClass : discriminatorMappings.values()) { - ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); - if (childCdm == null) { - continue; - } - if (!discriminatorName.equals(childCdm.discriminatorName)) { - discrValue = getDiscriminatorValue(node); - if (discrValue == null) { - continue; - } - } - if (childCdm != null) { - // Recursively traverse the discriminator mappings. - Class childDiscr = childCdm.getClassForElement(node, visitedClasses); - if (childDiscr != null) { - return childDiscr; - } - } - } - return cls; - } - } - - /** - * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. - * - *

The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, - * so it's not possible to use the instanceof keyword. - * - * @param modelClass A OpenAPI model class. - * @param inst The instance object. - */ - public static boolean isInstanceOf( - Class modelClass, Object inst, Set> visitedClasses) { - if (modelClass.isInstance(inst)) { - return true; - } - if (visitedClasses.contains(modelClass)) { - // This is to prevent infinite recursion when the composed schemas have - // a circular dependency. - return false; - } - visitedClasses.add(modelClass); - - // Traverse the oneOf/anyOf composed schemas. - Map> descendants = modelDescendants.get(modelClass); - if (descendants != null) { - for (GenericType childType : descendants.values()) { - if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { - return true; - } - } - } - return false; - } - - /** A map of discriminators for all model classes. */ - private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); - - /** A map of oneOf/anyOf descendants for each model class. */ - private static Map, Map>> modelDescendants = new HashMap<>(); - - /** - * Register a model class discriminator. - * - * @param modelClass the model class - * @param discriminatorPropertyName the name of the discriminator property - * @param mappings a map with the discriminator mappings. - */ - public static void registerDiscriminator( - Class modelClass, String discriminatorPropertyName, Map> mappings) { - ClassDiscriminatorMapping m = - new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); - modelDiscriminators.put(modelClass, m); - } - - /** - * Register the oneOf/anyOf descendants of the modelClass. - * - * @param modelClass the model class - * @param descendants a map of oneOf/anyOf descendants. - */ - public static void registerDescendants( - Class modelClass, Map> descendants) { - modelDescendants.put(modelClass, descendants); - } - - private static JSON json; - - static { - json = new JSON(); - } - - /** - * Get the default JSON instance. - * - * @return the default JSON instance - */ - public static JSON getDefault() { - return json; - } - - /** - * Set the default JSON instance. - * - * @param json JSON instance to be used - */ - public static void setDefault(JSON json) { - JSON.json = json; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java deleted file mode 100644 index caf886acd..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; - -/** - * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. It's - * generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code - * java8}. - */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class JavaTimeFormatter { - - private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - - /** - * Get the date format used to parse/format {@code OffsetDateTime} parameters. - * - * @return DateTimeFormatter - */ - public DateTimeFormatter getOffsetDateTimeFormatter() { - return offsetDateTimeFormatter; - } - - /** - * Set the date format used to parse/format {@code OffsetDateTime} parameters. - * - * @param offsetDateTimeFormatter {@code DateTimeFormatter} - */ - public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { - this.offsetDateTimeFormatter = offsetDateTimeFormatter; - } - - /** - * Parse the given string into {@code OffsetDateTime} object. - * - * @param str String - * @return {@code OffsetDateTime} - */ - public OffsetDateTime parseOffsetDateTime(String str) { - try { - return OffsetDateTime.parse(str, offsetDateTimeFormatter); - } catch (DateTimeParseException e) { - throw new RuntimeException(e); - } - } - - /** - * Format the given {@code OffsetDateTime} object into string. - * - * @param offsetDateTime {@code OffsetDateTime} - * @return {@code OffsetDateTime} in string format - */ - public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { - return offsetDateTimeFormatter.format(offsetDateTime); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java deleted file mode 100644 index d653856fe..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class Pair { - private String name = ""; - private String value = ""; - - public Pair(String name, String value) { - setName(name); - setValue(value); - } - - private void setName(String name) { - if (!isValidString(name)) { - return; - } - - this.name = name; - } - - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java deleted file mode 100644 index ae19756ea..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import com.fasterxml.jackson.databind.util.StdDateFormat; -import java.text.DateFormat; -import java.text.DecimalFormat; -import java.text.FieldPosition; -import java.text.ParsePosition; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class RFC3339DateFormat extends DateFormat { - private static final long serialVersionUID = 1L; - private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); - - private final StdDateFormat fmt = - new StdDateFormat().withTimeZone(TIMEZONE_Z).withColonInTimeZone(true); - - public RFC3339DateFormat() { - this.calendar = new GregorianCalendar(); - this.numberFormat = new DecimalFormat(); - } - - @Override - public Date parse(String source) { - return parse(source, new ParsePosition(0)); - } - - @Override - public Date parse(String source, ParsePosition pos) { - return fmt.parse(source, pos); - } - - @Override - public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { - return fmt.format(date, toAppendTo, fieldPosition); - } - - @Override - public Object clone() { - return super.clone(); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java deleted file mode 100644 index dca021db6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import java.util.Map; - -/** Representing a Server configuration. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for - * substitution in the server's URL template. - */ - public ServerConfiguration( - String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable : this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 - && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException( - "The variable " - + name - + " in the server URL has invalid value " - + value - + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java deleted file mode 100644 index 4a32ae659..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import java.util.HashSet; - -/** Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are - * from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java deleted file mode 100644 index 00a83e83e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - * - *

Note: This might be replaced by utility method from commons-lang or guava someday if one - * of those libraries is added as dependency. - * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java deleted file mode 100644 index f460b4737..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ /dev/null @@ -1,372 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.AccountCreateRequest; -import com.dropbox.sign.model.AccountCreateResponse; -import com.dropbox.sign.model.AccountGetResponse; -import com.dropbox.sign.model.AccountUpdateRequest; -import com.dropbox.sign.model.AccountVerifyRequest; -import com.dropbox.sign.model.AccountVerifyResponse; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class AccountApi { - private ApiClient apiClient; - - public AccountApi() { - this(Configuration.getDefaultApiClient()); - } - - public AccountApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified - * `email_address`. - * - * @param accountCreateRequest (required) - * @return AccountCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateRequest) - throws ApiException { - return accountCreateWithHttpInfo(accountCreateRequest).getData(); - } - - /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified - * `email_address`. - * - * @param accountCreateRequest (required) - * @return ApiResponse<AccountCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse accountCreateWithHttpInfo( - AccountCreateRequest accountCreateRequest) throws ApiException { - - // Check required parameters - if (accountCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountCreateRequest' when calling" - + " accountCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = accountCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "AccountApi.accountCreate", - "/account/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : accountCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Account. Returns the properties and settings of your Account. - * - * @param accountId `account_id` or `email_address` is required. If both are - * provided, the account id prevails. The ID of the Account. (optional) - * @param emailAddress `account_id` or `email_address` is required, If both - * are provided, the account id prevails. The email address of the Account. (optional) - * @return AccountGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public AccountGetResponse accountGet(String accountId, String emailAddress) - throws ApiException { - return accountGetWithHttpInfo(accountId, emailAddress).getData(); - } - - /** - * @see AccountApi#accountGet(String, String) - */ - public AccountGetResponse accountGet() throws ApiException { - String accountId = null; - String emailAddress = null; - - return accountGetWithHttpInfo(accountId, emailAddress).getData(); - } - - /** - * @see AccountApi#accountGetWithHttpInfo(String, String) - */ - public ApiResponse accountGetWithHttpInfo() throws ApiException { - String accountId = null; - String emailAddress = null; - - return accountGetWithHttpInfo(accountId, emailAddress); - } - - /** - * @see AccountApi#accountGet(String, String) - */ - public AccountGetResponse accountGet(String accountId) throws ApiException { - String emailAddress = null; - - return accountGetWithHttpInfo(accountId, emailAddress).getData(); - } - - /** - * @see AccountApi#accountGetWithHttpInfo(String, String) - */ - public ApiResponse accountGetWithHttpInfo(String accountId) - throws ApiException { - String emailAddress = null; - - return accountGetWithHttpInfo(accountId, emailAddress); - } - - /** - * Get Account. Returns the properties and settings of your Account. - * - * @param accountId `account_id` or `email_address` is required. If both are - * provided, the account id prevails. The ID of the Account. (optional) - * @param emailAddress `account_id` or `email_address` is required, If both - * are provided, the account id prevails. The email address of the Account. (optional) - * @return ApiResponse<AccountGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse accountGetWithHttpInfo( - String accountId, String emailAddress) throws ApiException { - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "email_address", emailAddress)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "AccountApi.accountGet", - "/account", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. - * - * @param accountUpdateRequest (required) - * @return AccountGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateRequest) - throws ApiException { - return accountUpdateWithHttpInfo(accountUpdateRequest).getData(); - } - - /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. - * - * @param accountUpdateRequest (required) - * @return ApiResponse<AccountGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse accountUpdateWithHttpInfo( - AccountUpdateRequest accountUpdateRequest) throws ApiException { - - // Check required parameters - if (accountUpdateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountUpdateRequest' when calling" - + " accountUpdate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = accountUpdateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "AccountApi.accountUpdate", - "/account", - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : accountUpdateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. - * - * @param accountVerifyRequest (required) - * @return AccountVerifyResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyRequest) - throws ApiException { - return accountVerifyWithHttpInfo(accountVerifyRequest).getData(); - } - - /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. - * - * @param accountVerifyRequest (required) - * @return ApiResponse<AccountVerifyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse accountVerifyWithHttpInfo( - AccountVerifyRequest accountVerifyRequest) throws ApiException { - - // Check required parameters - if (accountVerifyRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'accountVerifyRequest' when calling" - + " accountVerify"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = accountVerifyRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "AccountApi.accountVerify", - "/account/verify", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : accountVerifyRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java deleted file mode 100644 index 2c5ed4492..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ /dev/null @@ -1,452 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.ApiAppCreateRequest; -import com.dropbox.sign.model.ApiAppGetResponse; -import com.dropbox.sign.model.ApiAppListResponse; -import com.dropbox.sign.model.ApiAppUpdateRequest; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ApiAppApi { - private ApiClient apiClient; - - public ApiAppApi() { - this(Configuration.getDefaultApiClient()); - } - - public ApiAppApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create API App. Creates a new API App. - * - * @param apiAppCreateRequest (required) - * @return ApiAppGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) - throws ApiException { - return apiAppCreateWithHttpInfo(apiAppCreateRequest).getData(); - } - - /** - * Create API App. Creates a new API App. - * - * @param apiAppCreateRequest (required) - * @return ApiResponse<ApiAppGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse apiAppCreateWithHttpInfo( - ApiAppCreateRequest apiAppCreateRequest) throws ApiException { - - // Check required parameters - if (apiAppCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'apiAppCreateRequest' when calling" - + " apiAppCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = apiAppCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "ApiAppApi.apiAppCreate", - "/api_app", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : apiAppCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. - * - * @param clientId The client id of the API App to delete. (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void apiAppDelete(String clientId) throws ApiException { - apiAppDeleteWithHttpInfo(clientId); - } - - /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. - * - * @param clientId The client id of the API App to delete. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiException { - - // Check required parameters - if (clientId == null) { - throw new ApiException( - 400, "Missing the required parameter 'clientId' when calling apiAppDelete"); - } - - // Path parameters - String localVarPath = - "/api_app/{client_id}" - .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - return apiClient.invokeAPI( - "ApiAppApi.apiAppDelete", - localVarPath, - "DELETE", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Get API App. Returns an object with information about an API App. - * - * @param clientId The client id of the API App to retrieve. (required) - * @return ApiAppGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { - return apiAppGetWithHttpInfo(clientId).getData(); - } - - /** - * Get API App. Returns an object with information about an API App. - * - * @param clientId The client id of the API App to retrieve. (required) - * @return ApiResponse<ApiAppGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse apiAppGetWithHttpInfo(String clientId) - throws ApiException { - - // Check required parameters - if (clientId == null) { - throw new ApiException( - 400, "Missing the required parameter 'clientId' when calling apiAppGet"); - } - - // Path parameters - String localVarPath = - "/api_app/{client_id}" - .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "ApiAppApi.apiAppGet", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team - * with an Admin or Developer role, this list will include apps owned by teammates. - * - * @param page Which page number of the API App List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return ApiAppListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiAppListResponse apiAppList(Integer page, Integer pageSize) throws ApiException { - return apiAppListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see ApiAppApi#apiAppList(Integer, Integer) - */ - public ApiAppListResponse apiAppList() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return apiAppListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see ApiAppApi#apiAppListWithHttpInfo(Integer, Integer) - */ - public ApiResponse apiAppListWithHttpInfo() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return apiAppListWithHttpInfo(page, pageSize); - } - - /** - * @see ApiAppApi#apiAppList(Integer, Integer) - */ - public ApiAppListResponse apiAppList(Integer page) throws ApiException { - Integer pageSize = 20; - - return apiAppListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see ApiAppApi#apiAppListWithHttpInfo(Integer, Integer) - */ - public ApiResponse apiAppListWithHttpInfo(Integer page) - throws ApiException { - Integer pageSize = 20; - - return apiAppListWithHttpInfo(page, pageSize); - } - - /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team - * with an Admin or Developer role, this list will include apps owned by teammates. - * - * @param page Which page number of the API App List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return ApiResponse<ApiAppListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse apiAppListWithHttpInfo(Integer page, Integer pageSize) - throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "ApiAppApi.apiAppList", - "/api_app/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the - * fields you provide will be updated. If you wish to clear an existing optional field, provide - * an empty string. - * - * @param clientId The client id of the API App to update. (required) - * @param apiAppUpdateRequest (required) - * @return ApiAppGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAppUpdateRequest) - throws ApiException { - return apiAppUpdateWithHttpInfo(clientId, apiAppUpdateRequest).getData(); - } - - /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the - * fields you provide will be updated. If you wish to clear an existing optional field, provide - * an empty string. - * - * @param clientId The client id of the API App to update. (required) - * @param apiAppUpdateRequest (required) - * @return ApiResponse<ApiAppGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse apiAppUpdateWithHttpInfo( - String clientId, ApiAppUpdateRequest apiAppUpdateRequest) throws ApiException { - - // Check required parameters - if (clientId == null) { - throw new ApiException( - 400, "Missing the required parameter 'clientId' when calling apiAppUpdate"); - } - if (apiAppUpdateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'apiAppUpdateRequest' when calling" - + " apiAppUpdate"); - } - - // Path parameters - String localVarPath = - "/api_app/{client_id}" - .replaceAll("\\{client_id}", apiClient.escapeString(clientId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = apiAppUpdateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "ApiAppApi.apiAppUpdate", - localVarPath, - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : apiAppUpdateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java deleted file mode 100644 index 07cbd6af3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ /dev/null @@ -1,298 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.BulkSendJobGetResponse; -import com.dropbox.sign.model.BulkSendJobListResponse; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class BulkSendJobApi { - private ApiClient apiClient; - - public BulkSendJobApi() { - this(Configuration.getDefaultApiClient()); - } - - public BulkSendJobApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified - * by the `bulk_send_job_id` parameter. - * - * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) - * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is 20. (optional, default to 20) - * @return BulkSendJobGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public BulkSendJobGetResponse bulkSendJobGet( - String bulkSendJobId, Integer page, Integer pageSize) throws ApiException { - return bulkSendJobGetWithHttpInfo(bulkSendJobId, page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobGet(String, Integer, Integer) - */ - public BulkSendJobGetResponse bulkSendJobGet(String bulkSendJobId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return bulkSendJobGetWithHttpInfo(bulkSendJobId, page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobGetWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse bulkSendJobGetWithHttpInfo(String bulkSendJobId) - throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return bulkSendJobGetWithHttpInfo(bulkSendJobId, page, pageSize); - } - - /** - * @see BulkSendJobApi#bulkSendJobGet(String, Integer, Integer) - */ - public BulkSendJobGetResponse bulkSendJobGet(String bulkSendJobId, Integer page) - throws ApiException { - Integer pageSize = 20; - - return bulkSendJobGetWithHttpInfo(bulkSendJobId, page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobGetWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse bulkSendJobGetWithHttpInfo( - String bulkSendJobId, Integer page) throws ApiException { - Integer pageSize = 20; - - return bulkSendJobGetWithHttpInfo(bulkSendJobId, page, pageSize); - } - - /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified - * by the `bulk_send_job_id` parameter. - * - * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) - * @param page Which page number of the BulkSendJob list to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is 20. (optional, default to 20) - * @return ApiResponse<BulkSendJobGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse bulkSendJobGetWithHttpInfo( - String bulkSendJobId, Integer page, Integer pageSize) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Check required parameters - if (bulkSendJobId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'bulkSendJobId' when calling bulkSendJobGet"); - } - - // Path parameters - String localVarPath = - "/bulk_send_job/{bulk_send_job_id}" - .replaceAll( - "\\{bulk_send_job_id}", - apiClient.escapeString(bulkSendJobId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "BulkSendJobApi.bulkSendJobGet", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. - * - * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is 20. (optional, default to 20) - * @return BulkSendJobListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public BulkSendJobListResponse bulkSendJobList(Integer page, Integer pageSize) - throws ApiException { - return bulkSendJobListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobList(Integer, Integer) - */ - public BulkSendJobListResponse bulkSendJobList() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return bulkSendJobListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobListWithHttpInfo(Integer, Integer) - */ - public ApiResponse bulkSendJobListWithHttpInfo() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return bulkSendJobListWithHttpInfo(page, pageSize); - } - - /** - * @see BulkSendJobApi#bulkSendJobList(Integer, Integer) - */ - public BulkSendJobListResponse bulkSendJobList(Integer page) throws ApiException { - Integer pageSize = 20; - - return bulkSendJobListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see BulkSendJobApi#bulkSendJobListWithHttpInfo(Integer, Integer) - */ - public ApiResponse bulkSendJobListWithHttpInfo(Integer page) - throws ApiException { - Integer pageSize = 20; - - return bulkSendJobListWithHttpInfo(page, pageSize); - } - - /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. - * - * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is 20. (optional, default to 20) - * @return ApiResponse<BulkSendJobListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse bulkSendJobListWithHttpInfo( - Integer page, Integer pageSize) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "BulkSendJobApi.bulkSendJobList", - "/bulk_send_job/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java deleted file mode 100644 index fd04f5b2b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ /dev/null @@ -1,208 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.model.EmbeddedEditUrlRequest; -import com.dropbox.sign.model.EmbeddedEditUrlResponse; -import com.dropbox.sign.model.EmbeddedSignUrlResponse; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class EmbeddedApi { - private ApiClient apiClient; - - public EmbeddedApi() { - this(Configuration.getDefaultApiClient()); - } - - public EmbeddedApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that - * can be opened in an iFrame. Note that only templates created via the embedded template - * process are available to be edited with this endpoint. - * - * @param templateId The id of the template to edit. (required) - * @param embeddedEditUrlRequest (required) - * @return EmbeddedEditUrlResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public EmbeddedEditUrlResponse embeddedEditUrl( - String templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest) throws ApiException { - return embeddedEditUrlWithHttpInfo(templateId, embeddedEditUrlRequest).getData(); - } - - /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that - * can be opened in an iFrame. Note that only templates created via the embedded template - * process are available to be edited with this endpoint. - * - * @param templateId The id of the template to edit. (required) - * @param embeddedEditUrlRequest (required) - * @return ApiResponse<EmbeddedEditUrlResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse embeddedEditUrlWithHttpInfo( - String templateId, EmbeddedEditUrlRequest embeddedEditUrlRequest) throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling embeddedEditUrl"); - } - if (embeddedEditUrlRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'embeddedEditUrlRequest' when calling" - + " embeddedEditUrl"); - } - - // Path parameters - String localVarPath = - "/embedded/edit_url/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = embeddedEditUrlRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "EmbeddedApi.embeddedEditUrl", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : embeddedEditUrlRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be - * opened in an iFrame. Note that templates created via the embedded template process will only - * be accessible through the API. - * - * @param signatureId The id of the signature to get a signature url for. (required) - * @return EmbeddedSignUrlResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiException { - return embeddedSignUrlWithHttpInfo(signatureId).getData(); - } - - /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be - * opened in an iFrame. Note that templates created via the embedded template process will only - * be accessible through the API. - * - * @param signatureId The id of the signature to get a signature url for. (required) - * @return ApiResponse<EmbeddedSignUrlResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse embeddedSignUrlWithHttpInfo(String signatureId) - throws ApiException { - - // Check required parameters - if (signatureId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureId' when calling embeddedSignUrl"); - } - - // Path parameters - String localVarPath = - "/embedded/sign_url/{signature_id}" - .replaceAll( - "\\{signature_id}", apiClient.escapeString(signatureId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "EmbeddedApi.embeddedSignUrl", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java deleted file mode 100644 index 9e0041637..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java +++ /dev/null @@ -1,425 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.FaxGetResponse; -import com.dropbox.sign.model.FaxListResponse; -import com.dropbox.sign.model.FaxSendRequest; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class FaxApi { - private ApiClient apiClient; - - public FaxApi() { - this(Configuration.getDefaultApiClient()); - } - - public FaxApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Delete Fax. Deletes the specified Fax from the system - * - * @param faxId Fax ID (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void faxDelete(String faxId) throws ApiException { - faxDeleteWithHttpInfo(faxId); - } - - /** - * Delete Fax. Deletes the specified Fax from the system - * - * @param faxId Fax ID (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException { - - // Check required parameters - if (faxId == null) { - throw new ApiException( - 400, "Missing the required parameter 'faxId' when calling faxDelete"); - } - - // Path parameters - String localVarPath = - "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - return apiClient.invokeAPI( - "FaxApi.faxDelete", - localVarPath, - "DELETE", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Download Fax Files. Downloads files associated with a Fax - * - * @param faxId Fax ID (required) - * @return File - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public File faxFiles(String faxId) throws ApiException { - return faxFilesWithHttpInfo(faxId).getData(); - } - - /** - * Download Fax Files. Downloads files associated with a Fax - * - * @param faxId Fax ID (required) - * @return ApiResponse<File> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException { - - // Check required parameters - if (faxId == null) { - throw new ApiException( - 400, "Missing the required parameter 'faxId' when calling faxFiles"); - } - - // Path parameters - String localVarPath = - "/fax/files/{fax_id}" - .replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/pdf", "application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxApi.faxFiles", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Fax. Returns information about a Fax - * - * @param faxId Fax ID (required) - * @return FaxGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxGetResponse faxGet(String faxId) throws ApiException { - return faxGetWithHttpInfo(faxId).getData(); - } - - /** - * Get Fax. Returns information about a Fax - * - * @param faxId Fax ID (required) - * @return ApiResponse<FaxGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiException { - - // Check required parameters - if (faxId == null) { - throw new ApiException( - 400, "Missing the required parameter 'faxId' when calling faxGet"); - } - - // Path parameters - String localVarPath = - "/fax/{fax_id}".replaceAll("\\{fax_id}", apiClient.escapeString(faxId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxApi.faxGet", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Lists Faxes. Returns properties of multiple Faxes - * - * @param page Which page number of the Fax List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return FaxListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxListResponse faxList(Integer page, Integer pageSize) throws ApiException { - return faxListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see FaxApi#faxList(Integer, Integer) - */ - public FaxListResponse faxList() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return faxListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see FaxApi#faxListWithHttpInfo(Integer, Integer) - */ - public ApiResponse faxListWithHttpInfo() throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return faxListWithHttpInfo(page, pageSize); - } - - /** - * @see FaxApi#faxList(Integer, Integer) - */ - public FaxListResponse faxList(Integer page) throws ApiException { - Integer pageSize = 20; - - return faxListWithHttpInfo(page, pageSize).getData(); - } - - /** - * @see FaxApi#faxListWithHttpInfo(Integer, Integer) - */ - public ApiResponse faxListWithHttpInfo(Integer page) throws ApiException { - Integer pageSize = 20; - - return faxListWithHttpInfo(page, pageSize); - } - - /** - * Lists Faxes. Returns properties of multiple Faxes - * - * @param page Which page number of the Fax List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return ApiResponse<FaxListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxListWithHttpInfo(Integer page, Integer pageSize) - throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxApi.faxList", - "/fax/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Send Fax. Creates and sends a new Fax with the submitted file(s) - * - * @param faxSendRequest (required) - * @return FaxGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException { - return faxSendWithHttpInfo(faxSendRequest).getData(); - } - - /** - * Send Fax. Creates and sends a new Fax with the submitted file(s) - * - * @param faxSendRequest (required) - * @return ApiResponse<FaxGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxSendWithHttpInfo(FaxSendRequest faxSendRequest) - throws ApiException { - - // Check required parameters - if (faxSendRequest == null) { - throw new ApiException( - 400, "Missing the required parameter 'faxSendRequest' when calling faxSend"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = faxSendRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxApi.faxSend", - "/fax/send", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : faxSendRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java deleted file mode 100644 index e8736ad65..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ /dev/null @@ -1,707 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.FaxLineAddUserRequest; -import com.dropbox.sign.model.FaxLineAreaCodeGetResponse; -import com.dropbox.sign.model.FaxLineCreateRequest; -import com.dropbox.sign.model.FaxLineDeleteRequest; -import com.dropbox.sign.model.FaxLineListResponse; -import com.dropbox.sign.model.FaxLineRemoveUserRequest; -import com.dropbox.sign.model.FaxLineResponse; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class FaxLineApi { - private ApiClient apiClient; - - public FaxLineApi() { - this(Configuration.getDefaultApiClient()); - } - - public FaxLineApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Add Fax Line User. Grants a user access to the specified Fax Line. - * - * @param faxLineAddUserRequest (required) - * @return FaxLineResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserRequest) - throws ApiException { - return faxLineAddUserWithHttpInfo(faxLineAddUserRequest).getData(); - } - - /** - * Add Fax Line User. Grants a user access to the specified Fax Line. - * - * @param faxLineAddUserRequest (required) - * @return ApiResponse<FaxLineResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineAddUserWithHttpInfo( - FaxLineAddUserRequest faxLineAddUserRequest) throws ApiException { - - // Check required parameters - if (faxLineAddUserRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'faxLineAddUserRequest' when calling" - + " faxLineAddUser"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = faxLineAddUserRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineAddUser", - "/fax_line/add_user", - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : faxLineAddUserRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Available Fax Line Area Codes. Returns a list of available area codes for a given - * state/province and city - * - * @param country Filter area codes by country (required) - * @param state Filter area codes by state (optional) - * @param province Filter area codes by province (optional) - * @param city Filter area codes by city (optional) - * @return FaxLineAreaCodeGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineAreaCodeGetResponse faxLineAreaCodeGet( - String country, String state, String province, String city) throws ApiException { - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) - */ - public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country) throws ApiException { - String state = null; - String province = null; - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) - */ - public ApiResponse faxLineAreaCodeGetWithHttpInfo(String country) - throws ApiException { - String state = null; - String province = null; - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) - */ - public FaxLineAreaCodeGetResponse faxLineAreaCodeGet(String country, String state) - throws ApiException { - String province = null; - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) - */ - public ApiResponse faxLineAreaCodeGetWithHttpInfo( - String country, String state) throws ApiException { - String province = null; - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGet(String, String, String, String) - */ - public FaxLineAreaCodeGetResponse faxLineAreaCodeGet( - String country, String state, String province) throws ApiException { - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city).getData(); - } - - /** - * @see FaxLineApi#faxLineAreaCodeGetWithHttpInfo(String, String, String, String) - */ - public ApiResponse faxLineAreaCodeGetWithHttpInfo( - String country, String state, String province) throws ApiException { - String city = null; - - return faxLineAreaCodeGetWithHttpInfo(country, state, province, city); - } - - /** - * Get Available Fax Line Area Codes. Returns a list of available area codes for a given - * state/province and city - * - * @param country Filter area codes by country (required) - * @param state Filter area codes by state (optional) - * @param province Filter area codes by province (optional) - * @param city Filter area codes by city (optional) - * @return ApiResponse<FaxLineAreaCodeGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineAreaCodeGetWithHttpInfo( - String country, String state, String province, String city) throws ApiException { - - // Check required parameters - if (country == null) { - throw new ApiException( - 400, - "Missing the required parameter 'country' when calling faxLineAreaCodeGet"); - } - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "country", country)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "state", state)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "province", province)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "city", city)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineAreaCodeGet", - "/fax_line/area_codes", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Purchase Fax Line. Purchases a new Fax Line - * - * @param faxLineCreateRequest (required) - * @return FaxLineResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) - throws ApiException { - return faxLineCreateWithHttpInfo(faxLineCreateRequest).getData(); - } - - /** - * Purchase Fax Line. Purchases a new Fax Line - * - * @param faxLineCreateRequest (required) - * @return ApiResponse<FaxLineResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineCreateWithHttpInfo( - FaxLineCreateRequest faxLineCreateRequest) throws ApiException { - - // Check required parameters - if (faxLineCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'faxLineCreateRequest' when calling" - + " faxLineCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = faxLineCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineCreate", - "/fax_line/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : faxLineCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. - * - * @param faxLineDeleteRequest (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiException { - faxLineDeleteWithHttpInfo(faxLineDeleteRequest); - } - - /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. - * - * @param faxLineDeleteRequest (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineDeleteRequest) - throws ApiException { - - // Check required parameters - if (faxLineDeleteRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'faxLineDeleteRequest' when calling" - + " faxLineDelete"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = faxLineDeleteRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key"}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineDelete", - "/fax_line", - "DELETE", - new ArrayList<>(), - isFileTypeFound ? null : faxLineDeleteRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Get Fax Line. Returns the properties and settings of a Fax Line. - * - * @param number The Fax Line number (required) - * @return FaxLineResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineResponse faxLineGet(String number) throws ApiException { - return faxLineGetWithHttpInfo(number).getData(); - } - - /** - * Get Fax Line. Returns the properties and settings of a Fax Line. - * - * @param number The Fax Line number (required) - * @return ApiResponse<FaxLineResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineGetWithHttpInfo(String number) throws ApiException { - - // Check required parameters - if (number == null) { - throw new ApiException( - 400, "Missing the required parameter 'number' when calling faxLineGet"); - } - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "number", number)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineGet", - "/fax_line", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. - * - * @param accountId Account ID (optional) - * @param page Which page number of the Fax Line List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) - * @return FaxLineListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineListResponse faxLineList( - String accountId, Integer page, Integer pageSize, Boolean showTeamLines) - throws ApiException { - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); - } - - /** - * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) - */ - public FaxLineListResponse faxLineList() throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); - } - - /** - * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) - */ - public ApiResponse faxLineListWithHttpInfo() throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); - } - - /** - * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) - */ - public FaxLineListResponse faxLineList(String accountId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); - } - - /** - * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) - */ - public ApiResponse faxLineListWithHttpInfo(String accountId) - throws ApiException { - Integer page = 1; - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); - } - - /** - * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) - */ - public FaxLineListResponse faxLineList(String accountId, Integer page) throws ApiException { - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); - } - - /** - * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) - */ - public ApiResponse faxLineListWithHttpInfo(String accountId, Integer page) - throws ApiException { - Integer pageSize = 20; - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); - } - - /** - * @see FaxLineApi#faxLineList(String, Integer, Integer, Boolean) - */ - public FaxLineListResponse faxLineList(String accountId, Integer page, Integer pageSize) - throws ApiException { - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines).getData(); - } - - /** - * @see FaxLineApi#faxLineListWithHttpInfo(String, Integer, Integer, Boolean) - */ - public ApiResponse faxLineListWithHttpInfo( - String accountId, Integer page, Integer pageSize) throws ApiException { - Boolean showTeamLines = null; - - return faxLineListWithHttpInfo(accountId, page, pageSize, showTeamLines); - } - - /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. - * - * @param accountId Account ID (optional) - * @param page Which page number of the Fax Line List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param showTeamLines Include Fax Lines belonging to team members in the list (optional) - * @return ApiResponse<FaxLineListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineListWithHttpInfo( - String accountId, Integer page, Integer pageSize, Boolean showTeamLines) - throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "show_team_lines", showTeamLines)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineList", - "/fax_line/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line - * - * @param faxLineRemoveUserRequest (required) - * @return FaxLineResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveUserRequest) - throws ApiException { - return faxLineRemoveUserWithHttpInfo(faxLineRemoveUserRequest).getData(); - } - - /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line - * - * @param faxLineRemoveUserRequest (required) - * @return ApiResponse<FaxLineResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse faxLineRemoveUserWithHttpInfo( - FaxLineRemoveUserRequest faxLineRemoveUserRequest) throws ApiException { - - // Check required parameters - if (faxLineRemoveUserRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'faxLineRemoveUserRequest' when calling" - + " faxLineRemoveUser"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = faxLineRemoveUserRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "FaxLineApi.faxLineRemoveUser", - "/fax_line/remove_user", - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : faxLineRemoveUserRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java deleted file mode 100644 index db4fbb10c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.model.OAuthTokenGenerateRequest; -import com.dropbox.sign.model.OAuthTokenRefreshRequest; -import com.dropbox.sign.model.OAuthTokenResponse; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class OAuthApi { - private ApiClient apiClient; - - public OAuthApi() { - this(Configuration.getDefaultApiClient()); - } - - public OAuthApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need - * to exchange it for an access token via a backend call. - * - * @param oauthTokenGenerateRequest (required) - * @return OAuthTokenResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public OAuthTokenResponse oauthTokenGenerate( - OAuthTokenGenerateRequest oauthTokenGenerateRequest) throws ApiException { - return oauthTokenGenerateWithHttpInfo(oauthTokenGenerateRequest).getData(); - } - - /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need - * to exchange it for an access token via a backend call. - * - * @param oauthTokenGenerateRequest (required) - * @return ApiResponse<OAuthTokenResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse oauthTokenGenerateWithHttpInfo( - OAuthTokenGenerateRequest oauthTokenGenerateRequest) throws ApiException { - - // Check required parameters - if (oauthTokenGenerateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'oauthTokenGenerateRequest' when calling" - + " oauthTokenGenerate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = oauthTokenGenerateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "OAuthApi.oauthTokenGenerate", - "/oauth/token", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : oauthTokenGenerateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - null, - localVarReturnType, - false); - } - - /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one - * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see - * `expires_in`), along with a refresh token that can be used to acquire a new access - * token after the current one has expired. - * - * @param oauthTokenRefreshRequest (required) - * @return OAuthTokenResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenRefreshRequest) - throws ApiException { - return oauthTokenRefreshWithHttpInfo(oauthTokenRefreshRequest).getData(); - } - - /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one - * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see - * `expires_in`), along with a refresh token that can be used to acquire a new access - * token after the current one has expired. - * - * @param oauthTokenRefreshRequest (required) - * @return ApiResponse<OAuthTokenResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse oauthTokenRefreshWithHttpInfo( - OAuthTokenRefreshRequest oauthTokenRefreshRequest) throws ApiException { - - // Check required parameters - if (oauthTokenRefreshRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'oauthTokenRefreshRequest' when calling" - + " oauthTokenRefresh"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = oauthTokenRefreshRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "OAuthApi.oauthTokenRefresh", - "/oauth/token?refresh", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : oauthTokenRefreshRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - null, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java deleted file mode 100644 index 5fa6c0f95..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.model.ReportCreateRequest; -import com.dropbox.sign.model.ReportCreateResponse; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ReportApi { - private ApiClient apiClient; - - public ReportApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReportApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been - * generated, you will receive an email (one per requested report type) containing a link to - * download the report as a CSV file. The requested date range may be up to 12 months in - * duration, and `start_date` must not be more than 10 years in the past. - * - * @param reportCreateRequest (required) - * @return ReportCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest) - throws ApiException { - return reportCreateWithHttpInfo(reportCreateRequest).getData(); - } - - /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been - * generated, you will receive an email (one per requested report type) containing a link to - * download the report as a CSV file. The requested date range may be up to 12 months in - * duration, and `start_date` must not be more than 10 years in the past. - * - * @param reportCreateRequest (required) - * @return ApiResponse<ReportCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse reportCreateWithHttpInfo( - ReportCreateRequest reportCreateRequest) throws ApiException { - - // Check required parameters - if (reportCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'reportCreateRequest' when calling" - + " reportCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = reportCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "ReportApi.reportCreate", - "/report/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : reportCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java deleted file mode 100644 index 6996e6c02..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ /dev/null @@ -1,1950 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.BulkSendJobSendResponse; -import com.dropbox.sign.model.FileResponse; -import com.dropbox.sign.model.FileResponseDataUri; -import com.dropbox.sign.model.SignatureRequestBulkCreateEmbeddedWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestBulkSendWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestCreateEmbeddedRequest; -import com.dropbox.sign.model.SignatureRequestCreateEmbeddedWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestEditEmbeddedRequest; -import com.dropbox.sign.model.SignatureRequestEditEmbeddedWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestEditRequest; -import com.dropbox.sign.model.SignatureRequestEditWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestGetResponse; -import com.dropbox.sign.model.SignatureRequestListResponse; -import com.dropbox.sign.model.SignatureRequestRemindRequest; -import com.dropbox.sign.model.SignatureRequestSendRequest; -import com.dropbox.sign.model.SignatureRequestSendWithTemplateRequest; -import com.dropbox.sign.model.SignatureRequestUpdateRequest; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class SignatureRequestApi { - private ApiClient apiClient; - - public SignatureRequestApi() { - this(Configuration.getDefaultApiClient()); - } - - public SignatureRequestApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests - * in bulk based off of the provided Template(s) specified with the `template_ids` - * parameter to be signed in an embedded iFrame. These embedded signature requests can only be - * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox - * Sign. **NOTE:** Only available for Standard plan and higher. - * - * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest (required) - * @return BulkSendJobSendResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( - SignatureRequestBulkCreateEmbeddedWithTemplateRequest - signatureRequestBulkCreateEmbeddedWithTemplateRequest) - throws ApiException { - return signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo( - signatureRequestBulkCreateEmbeddedWithTemplateRequest) - .getData(); - } - - /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests - * in bulk based off of the provided Template(s) specified with the `template_ids` - * parameter to be signed in an embedded iFrame. These embedded signature requests can only be - * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox - * Sign. **NOTE:** Only available for Standard plan and higher. - * - * @param signatureRequestBulkCreateEmbeddedWithTemplateRequest (required) - * @return ApiResponse<BulkSendJobSendResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse - signatureRequestBulkCreateEmbeddedWithTemplateWithHttpInfo( - SignatureRequestBulkCreateEmbeddedWithTemplateRequest - signatureRequestBulkCreateEmbeddedWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestBulkCreateEmbeddedWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter" - + " 'signatureRequestBulkCreateEmbeddedWithTemplateRequest' when calling" - + " signatureRequestBulkCreateEmbeddedWithTemplate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestBulkCreateEmbeddedWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestBulkCreateEmbeddedWithTemplate", - "/signature_request/bulk_create_embedded_with_template", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestBulkCreateEmbeddedWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk - * based off of the provided Template(s) specified with the `template_ids` parameter. - * **NOTE:** Only available for Standard plan and higher. - * - * @param signatureRequestBulkSendWithTemplateRequest (required) - * @return BulkSendJobSendResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate( - SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest) - throws ApiException { - return signatureRequestBulkSendWithTemplateWithHttpInfo( - signatureRequestBulkSendWithTemplateRequest) - .getData(); - } - - /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk - * based off of the provided Template(s) specified with the `template_ids` parameter. - * **NOTE:** Only available for Standard plan and higher. - * - * @param signatureRequestBulkSendWithTemplateRequest (required) - * @return ApiResponse<BulkSendJobSendResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestBulkSendWithTemplateWithHttpInfo( - SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestBulkSendWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestBulkSendWithTemplateRequest'" - + " when calling signatureRequestBulkSendWithTemplate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestBulkSendWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestBulkSendWithTemplate", - "/signature_request/bulk_send_with_template", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestBulkSendWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is - * **not reversible**. The request will be canceled and signers will no longer be able to sign. - * If they try to access the signature request they will receive a HTTP 410 status code - * indicating that the resource has been deleted. Cancelation is asynchronous and a successful - * call to this endpoint will return an empty 200 OK response if the signature request is - * eligible to be canceled and has been successfully queued. This 200 OK response does not - * indicate a successful cancelation of the signature request itself. The cancelation is - * confirmed via the `signature_request_canceled` event. It is recommended that a - * [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the - * `signature_request_canceled` event. This callback will be sent only when the - * cancelation has completed successfully. If a callback handler has been configured and the - * event has not been received within 60 minutes of making the call, check the status of the - * request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the - * cancelation if necessary. To be eligible for cancelation, a signature request must have been - * sent successfully, must not yet have been signed by all signers, and you must either be the - * sender or own the API app under which it was sent. A partially signed signature request can - * be canceled. **NOTE:** To remove your access to a completed signature request, use the - * endpoint: `POST /signature_request/remove/[:signature_request_id]`. - * - * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void signatureRequestCancel(String signatureRequestId) throws ApiException { - signatureRequestCancelWithHttpInfo(signatureRequestId); - } - - /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is - * **not reversible**. The request will be canceled and signers will no longer be able to sign. - * If they try to access the signature request they will receive a HTTP 410 status code - * indicating that the resource has been deleted. Cancelation is asynchronous and a successful - * call to this endpoint will return an empty 200 OK response if the signature request is - * eligible to be canceled and has been successfully queued. This 200 OK response does not - * indicate a successful cancelation of the signature request itself. The cancelation is - * confirmed via the `signature_request_canceled` event. It is recommended that a - * [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the - * `signature_request_canceled` event. This callback will be sent only when the - * cancelation has completed successfully. If a callback handler has been configured and the - * event has not been received within 60 minutes of making the call, check the status of the - * request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the - * cancelation if necessary. To be eligible for cancelation, a signature request must have been - * sent successfully, must not yet have been signed by all signers, and you must either be the - * sender or own the API app under which it was sent. A partially signed signature request can - * be canceled. **NOTE:** To remove your access to a completed signature request, use the - * endpoint: `POST /signature_request/remove/[:signature_request_id]`. - * - * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestCancelWithHttpInfo(String signatureRequestId) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestCancel"); - } - - // Path parameters - String localVarPath = - "/signature_request/cancel/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestCancel", - localVarPath, - "POST", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. - * - * @param signatureRequestCreateEmbeddedRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestCreateEmbedded( - SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest) - throws ApiException { - return signatureRequestCreateEmbeddedWithHttpInfo(signatureRequestCreateEmbeddedRequest) - .getData(); - } - - /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. - * - * @param signatureRequestCreateEmbeddedRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestCreateEmbeddedWithHttpInfo( - SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestCreateEmbeddedRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestCreateEmbeddedRequest' when" - + " calling signatureRequestCreateEmbedded"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestCreateEmbeddedRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestCreateEmbedded", - "/signature_request/create_embedded", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestCreateEmbeddedRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the - * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. - * - * @param signatureRequestCreateEmbeddedWithTemplateRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( - SignatureRequestCreateEmbeddedWithTemplateRequest - signatureRequestCreateEmbeddedWithTemplateRequest) - throws ApiException { - return signatureRequestCreateEmbeddedWithTemplateWithHttpInfo( - signatureRequestCreateEmbeddedWithTemplateRequest) - .getData(); - } - - /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the - * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. - * - * @param signatureRequestCreateEmbeddedWithTemplateRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse - signatureRequestCreateEmbeddedWithTemplateWithHttpInfo( - SignatureRequestCreateEmbeddedWithTemplateRequest - signatureRequestCreateEmbeddedWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestCreateEmbeddedWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter" - + " 'signatureRequestCreateEmbeddedWithTemplateRequest' when calling" - + " signatureRequestCreateEmbeddedWithTemplate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestCreateEmbeddedWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestCreateEmbeddedWithTemplate", - "/signature_request/create_embedded_with_template", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestCreateEmbeddedWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Edit Signature Request. Edits and sends a SignatureRequest with the submitted documents. If - * `form_fields_per_document` is not specified, a signature page will be affixed where - * all signers will be required to add their signature, signifying their agreement to all - * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestEdit( - String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) - throws ApiException { - return signatureRequestEditWithHttpInfo(signatureRequestId, signatureRequestEditRequest) - .getData(); - } - - /** - * Edit Signature Request. Edits and sends a SignatureRequest with the submitted documents. If - * `form_fields_per_document` is not specified, a signature page will be affixed where - * all signers will be required to add their signature, signifying their agreement to all - * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestEditWithHttpInfo( - String signatureRequestId, SignatureRequestEditRequest signatureRequestEditRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestEdit"); - } - if (signatureRequestEditRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestEditRequest' when calling" - + " signatureRequestEdit"); - } - - // Path parameters - String localVarPath = - "/signature_request/edit/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestEditRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestEdit", - localVarPath, - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestEditRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Edit Embedded Signature Request. Edits a SignatureRequest with the submitted documents to be - * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page - * will be affixed where all signers will be required to add their signature, signifying their - * agreement to all contained documents. Note that embedded signature requests can only be - * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox - * Sign. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditEmbeddedRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestEditEmbedded( - String signatureRequestId, - SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) - throws ApiException { - return signatureRequestEditEmbeddedWithHttpInfo( - signatureRequestId, signatureRequestEditEmbeddedRequest) - .getData(); - } - - /** - * Edit Embedded Signature Request. Edits a SignatureRequest with the submitted documents to be - * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page - * will be affixed where all signers will be required to add their signature, signifying their - * agreement to all contained documents. Note that embedded signature requests can only be - * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox - * Sign. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditEmbeddedRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestEditEmbeddedWithHttpInfo( - String signatureRequestId, - SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestEditEmbedded"); - } - if (signatureRequestEditEmbeddedRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestEditEmbeddedRequest' when" - + " calling signatureRequestEditEmbedded"); - } - - // Path parameters - String localVarPath = - "/signature_request/edit_embedded/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestEditEmbeddedRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestEditEmbedded", - localVarPath, - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestEditEmbeddedRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Edit Embedded Signature Request with Template. Edits a SignatureRequest based on the given - * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can - * only be signed in embedded iFrames whereas normal signature requests can only be signed on - * Dropbox Sign. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditEmbeddedWithTemplateRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( - String signatureRequestId, - SignatureRequestEditEmbeddedWithTemplateRequest - signatureRequestEditEmbeddedWithTemplateRequest) - throws ApiException { - return signatureRequestEditEmbeddedWithTemplateWithHttpInfo( - signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) - .getData(); - } - - /** - * Edit Embedded Signature Request with Template. Edits a SignatureRequest based on the given - * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can - * only be signed in embedded iFrames whereas normal signature requests can only be signed on - * Dropbox Sign. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditEmbeddedWithTemplateRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse - signatureRequestEditEmbeddedWithTemplateWithHttpInfo( - String signatureRequestId, - SignatureRequestEditEmbeddedWithTemplateRequest - signatureRequestEditEmbeddedWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestEditEmbeddedWithTemplate"); - } - if (signatureRequestEditEmbeddedWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter" - + " 'signatureRequestEditEmbeddedWithTemplateRequest' when calling" - + " signatureRequestEditEmbeddedWithTemplate"); - } - - // Path parameters - String localVarPath = - "/signature_request/edit_embedded_with_template/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestEditEmbeddedWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestEditEmbeddedWithTemplate", - localVarPath, - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestEditEmbeddedWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Edit Signature Request With Template. Edits and sends a SignatureRequest based off of the - * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not - * deduct your signature request quota. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditWithTemplateRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestEditWithTemplate( - String signatureRequestId, - SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) - throws ApiException { - return signatureRequestEditWithTemplateWithHttpInfo( - signatureRequestId, signatureRequestEditWithTemplateRequest) - .getData(); - } - - /** - * Edit Signature Request With Template. Edits and sends a SignatureRequest based off of the - * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not - * deduct your signature request quota. - * - * @param signatureRequestId The id of the SignatureRequest to edit. (required) - * @param signatureRequestEditWithTemplateRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestEditWithTemplateWithHttpInfo( - String signatureRequestId, - SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestEditWithTemplate"); - } - if (signatureRequestEditWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestEditWithTemplateRequest' when" - + " calling signatureRequestEditWithTemplate"); - } - - // Path parameters - String localVarPath = - "/signature_request/edit_with_template/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestEditWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestEditWithTemplate", - localVarPath, - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestEditWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Download Files. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are - * currently being prepared, a status code of `409` will be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @param fileType Set to `pdf` for a single merged document or `zip` for a - * collection of individual documents. (optional, default to pdf) - * @return File - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public File signatureRequestFiles(String signatureRequestId, String fileType) - throws ApiException { - return signatureRequestFilesWithHttpInfo(signatureRequestId, fileType).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestFiles(String, String) - */ - public File signatureRequestFiles(String signatureRequestId) throws ApiException { - String fileType = "pdf"; - - return signatureRequestFilesWithHttpInfo(signatureRequestId, fileType).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestFilesWithHttpInfo(String, String) - */ - public ApiResponse signatureRequestFilesWithHttpInfo(String signatureRequestId) - throws ApiException { - String fileType = "pdf"; - - return signatureRequestFilesWithHttpInfo(signatureRequestId, fileType); - } - - /** - * Download Files. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are - * currently being prepared, a status code of `409` will be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @param fileType Set to `pdf` for a single merged document or `zip` for a - * collection of individual documents. (optional, default to pdf) - * @return ApiResponse<File> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestFilesWithHttpInfo( - String signatureRequestId, String fileType) throws ApiException { - - if (fileType == null) { - fileType = "pdf"; - } - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestFiles"); - } - - // Path parameters - String localVarPath = - "/signature_request/files/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "file_type", fileType)); - - String localVarAccept = - apiClient.selectHeaderAccept( - "application/pdf", "application/zip", "application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestFiles", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a JSON object with a `data_uri` - * representing the base64 encoded file (PDFs only). If the files are currently being prepared, - * a status code of `409` will be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @return FileResponseDataUri - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureRequestId) - throws ApiException { - return signatureRequestFilesAsDataUriWithHttpInfo(signatureRequestId).getData(); - } - - /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a JSON object with a `data_uri` - * representing the base64 encoded file (PDFs only). If the files are currently being prepared, - * a status code of `409` will be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @return ApiResponse<FileResponseDataUri> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestFilesAsDataUriWithHttpInfo( - String signatureRequestId) throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestFilesAsDataUri"); - } - - // Path parameters - String localVarPath = - "/signature_request/files_as_data_uri/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestFilesAsDataUri", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Download Files as File Url. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a JSON object with a url to the file - * (PDFs only). If the files are currently being prepared, a status code of `409` will - * be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @param forceDownload By default when opening the `file_url` a browser will download - * the PDF and save it locally. When set to `0` the PDF file will be displayed in - * the browser. (optional, default to 1) - * @return FileResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FileResponse signatureRequestFilesAsFileUrl( - String signatureRequestId, Integer forceDownload) throws ApiException { - return signatureRequestFilesAsFileUrlWithHttpInfo(signatureRequestId, forceDownload) - .getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestFilesAsFileUrl(String, Integer) - */ - public FileResponse signatureRequestFilesAsFileUrl(String signatureRequestId) - throws ApiException { - Integer forceDownload = 1; - - return signatureRequestFilesAsFileUrlWithHttpInfo(signatureRequestId, forceDownload) - .getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestFilesAsFileUrlWithHttpInfo(String, Integer) - */ - public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( - String signatureRequestId) throws ApiException { - Integer forceDownload = 1; - - return signatureRequestFilesAsFileUrlWithHttpInfo(signatureRequestId, forceDownload); - } - - /** - * Download Files as File Url. Obtain a copy of the current documents specified by the - * `signature_request_id` parameter. Returns a JSON object with a url to the file - * (PDFs only). If the files are currently being prepared, a status code of `409` will - * be returned instead. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @param forceDownload By default when opening the `file_url` a browser will download - * the PDF and save it locally. When set to `0` the PDF file will be displayed in - * the browser. (optional, default to 1) - * @return ApiResponse<FileResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( - String signatureRequestId, Integer forceDownload) throws ApiException { - - if (forceDownload == null) { - forceDownload = 1; - } - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestFilesAsFileUrl"); - } - - // Path parameters - String localVarPath = - "/signature_request/files_as_file_url/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "force_download", forceDownload)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestFilesAsFileUrl", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the - * `signature_request_id` parameter. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestGet(String signatureRequestId) - throws ApiException { - return signatureRequestGetWithHttpInfo(signatureRequestId).getData(); - } - - /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the - * `signature_request_id` parameter. - * - * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestGetWithHttpInfo( - String signatureRequestId) throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestGet"); - } - - // Path parameters - String localVarPath = - "/signature_request/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestGet", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This - * includes SignatureRequests you have sent as well as received, but not ones that you have been - * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about - * querying signature requests. - * - * @param accountId Which account to return SignatureRequests for. Must be a team member. Use - * `all` to indicate all team members. Defaults to your account. (optional) - * @param page Which page number of the SignatureRequest List to return. Defaults to - * `1`. (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param query String that includes search terms and/or fields to be used to filter the - * SignatureRequest objects. (optional) - * @return SignatureRequestListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestListResponse signatureRequestList( - String accountId, Integer page, Integer pageSize, String query) throws ApiException { - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestList(String, Integer, Integer, String) - */ - public SignatureRequestListResponse signatureRequestList() throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse signatureRequestListWithHttpInfo() - throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see SignatureRequestApi#signatureRequestList(String, Integer, Integer, String) - */ - public SignatureRequestListResponse signatureRequestList(String accountId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse signatureRequestListWithHttpInfo( - String accountId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see SignatureRequestApi#signatureRequestList(String, Integer, Integer, String) - */ - public SignatureRequestListResponse signatureRequestList(String accountId, Integer page) - throws ApiException { - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse signatureRequestListWithHttpInfo( - String accountId, Integer page) throws ApiException { - Integer pageSize = 20; - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see SignatureRequestApi#signatureRequestList(String, Integer, Integer, String) - */ - public SignatureRequestListResponse signatureRequestList( - String accountId, Integer page, Integer pageSize) throws ApiException { - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see SignatureRequestApi#signatureRequestListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse signatureRequestListWithHttpInfo( - String accountId, Integer page, Integer pageSize) throws ApiException { - String query = null; - - return signatureRequestListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This - * includes SignatureRequests you have sent as well as received, but not ones that you have been - * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about - * querying signature requests. - * - * @param accountId Which account to return SignatureRequests for. Must be a team member. Use - * `all` to indicate all team members. Defaults to your account. (optional) - * @param page Which page number of the SignatureRequest List to return. Defaults to - * `1`. (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param query String that includes search terms and/or fields to be used to filter the - * SignatureRequest objects. (optional) - * @return ApiResponse<SignatureRequestListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestListWithHttpInfo( - String accountId, Integer page, Integer pageSize, String query) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestList", - "/signature_request/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and - * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft - * must indicate at Draft creation that the SignatureRequest created from the Draft should be - * held. Releasing the SignatureRequest will send requests to all signers. - * - * @param signatureRequestId The id of the SignatureRequest to release. (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureRequestId) - throws ApiException { - return signatureRequestReleaseHoldWithHttpInfo(signatureRequestId).getData(); - } - - /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and - * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft - * must indicate at Draft creation that the SignatureRequest created from the Draft should be - * held. Releasing the SignatureRequest will send requests to all signers. - * - * @param signatureRequestId The id of the SignatureRequest to release. (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestReleaseHoldWithHttpInfo( - String signatureRequestId) throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestReleaseHold"); - } - - // Path parameters - String localVarPath = - "/signature_request/release_hold/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestReleaseHold", - localVarPath, - "POST", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature - * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This - * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with - * embedded signature requests. - * - * @param signatureRequestId The id of the SignatureRequest to send a reminder for. (required) - * @param signatureRequestRemindRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestRemind( - String signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest) - throws ApiException { - return signatureRequestRemindWithHttpInfo(signatureRequestId, signatureRequestRemindRequest) - .getData(); - } - - /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature - * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This - * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with - * embedded signature requests. - * - * @param signatureRequestId The id of the SignatureRequest to send a reminder for. (required) - * @param signatureRequestRemindRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestRemindWithHttpInfo( - String signatureRequestId, SignatureRequestRemindRequest signatureRequestRemindRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestRemind"); - } - if (signatureRequestRemindRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestRemindRequest' when calling" - + " signatureRequestRemind"); - } - - // Path parameters - String localVarPath = - "/signature_request/remind/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestRemindRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestRemind", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestRemindRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Remove Signature Request Access. Removes your access to a completed signature request. This - * action is **not reversible**. The signature request must be fully executed by all parties - * (signed or declined to sign). Other parties will continue to maintain access to the completed - * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous - * and your access will be immediately removed. Upon successful removal, this endpoint will - * return a 200 OK response. - * - * @param signatureRequestId The id of the SignatureRequest to remove. (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void signatureRequestRemove(String signatureRequestId) throws ApiException { - signatureRequestRemoveWithHttpInfo(signatureRequestId); - } - - /** - * Remove Signature Request Access. Removes your access to a completed signature request. This - * action is **not reversible**. The signature request must be fully executed by all parties - * (signed or declined to sign). Other parties will continue to maintain access to the completed - * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous - * and your access will be immediately removed. Upon successful removal, this endpoint will - * return a 200 OK response. - * - * @param signatureRequestId The id of the SignatureRequest to remove. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestRemoveWithHttpInfo(String signatureRequestId) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestRemove"); - } - - // Path parameters - String localVarPath = - "/signature_request/remove/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key"}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestRemove", - localVarPath, - "POST", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. - * - * @param signatureRequestSendRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestSend( - SignatureRequestSendRequest signatureRequestSendRequest) throws ApiException { - return signatureRequestSendWithHttpInfo(signatureRequestSendRequest).getData(); - } - - /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. - * - * @param signatureRequestSendRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestSendWithHttpInfo( - SignatureRequestSendRequest signatureRequestSendRequest) throws ApiException { - - // Check required parameters - if (signatureRequestSendRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestSendRequest' when calling" - + " signatureRequestSend"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestSendRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestSend", - "/signature_request/send", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestSendRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) - * specified with the `template_ids` parameter. - * - * @param signatureRequestSendWithTemplateRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestSendWithTemplate( - SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest) - throws ApiException { - return signatureRequestSendWithTemplateWithHttpInfo(signatureRequestSendWithTemplateRequest) - .getData(); - } - - /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) - * specified with the `template_ids` parameter. - * - * @param signatureRequestSendWithTemplateRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestSendWithTemplateWithHttpInfo( - SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestSendWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestSendWithTemplateRequest' when" - + " calling signatureRequestSendWithTemplate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestSendWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestSendWithTemplate", - "/signature_request/send_with_template", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestSendWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a - * signature request. You can listen for the `signature_request_email_bounce` event on - * your app or account to detect bounced emails, and respond with this method. Updating the - * email address of a signer will generate a new `signature_id` value. **NOTE:** This - * action cannot be performed on a signature request with an appended signature page. - * - * @param signatureRequestId The id of the SignatureRequest to update. (required) - * @param signatureRequestUpdateRequest (required) - * @return SignatureRequestGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public SignatureRequestGetResponse signatureRequestUpdate( - String signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest) - throws ApiException { - return signatureRequestUpdateWithHttpInfo(signatureRequestId, signatureRequestUpdateRequest) - .getData(); - } - - /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a - * signature request. You can listen for the `signature_request_email_bounce` event on - * your app or account to detect bounced emails, and respond with this method. Updating the - * email address of a signer will generate a new `signature_id` value. **NOTE:** This - * action cannot be performed on a signature request with an appended signature page. - * - * @param signatureRequestId The id of the SignatureRequest to update. (required) - * @param signatureRequestUpdateRequest (required) - * @return ApiResponse<SignatureRequestGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse signatureRequestUpdateWithHttpInfo( - String signatureRequestId, SignatureRequestUpdateRequest signatureRequestUpdateRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " signatureRequestUpdate"); - } - if (signatureRequestUpdateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestUpdateRequest' when calling" - + " signatureRequestUpdate"); - } - - // Path parameters - String localVarPath = - "/signature_request/update/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = signatureRequestUpdateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "SignatureRequestApi.signatureRequestUpdate", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : signatureRequestUpdateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java deleted file mode 100644 index cf3167ab9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ /dev/null @@ -1,897 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.TeamAddMemberRequest; -import com.dropbox.sign.model.TeamCreateRequest; -import com.dropbox.sign.model.TeamGetInfoResponse; -import com.dropbox.sign.model.TeamGetResponse; -import com.dropbox.sign.model.TeamInvitesResponse; -import com.dropbox.sign.model.TeamMembersResponse; -import com.dropbox.sign.model.TeamRemoveMemberRequest; -import com.dropbox.sign.model.TeamSubTeamsResponse; -import com.dropbox.sign.model.TeamUpdateRequest; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class TeamApi { - private ApiClient apiClient; - - public TeamApi() { - this(Configuration.getDefaultApiClient()); - } - - public TeamApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to - * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be - * created for them. If a user is already a part of another Team, a - * `team_invite_failed` error will be returned. - * - * @param teamAddMemberRequest (required) - * @param teamId The id of the team. (optional) - * @return TeamGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetResponse teamAddMember(TeamAddMemberRequest teamAddMemberRequest, String teamId) - throws ApiException { - return teamAddMemberWithHttpInfo(teamAddMemberRequest, teamId).getData(); - } - - /** - * @see TeamApi#teamAddMember(TeamAddMemberRequest, String) - */ - public TeamGetResponse teamAddMember(TeamAddMemberRequest teamAddMemberRequest) - throws ApiException { - String teamId = null; - - return teamAddMemberWithHttpInfo(teamAddMemberRequest, teamId).getData(); - } - - /** - * @see TeamApi#teamAddMemberWithHttpInfo(TeamAddMemberRequest, String) - */ - public ApiResponse teamAddMemberWithHttpInfo( - TeamAddMemberRequest teamAddMemberRequest) throws ApiException { - String teamId = null; - - return teamAddMemberWithHttpInfo(teamAddMemberRequest, teamId); - } - - /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to - * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be - * created for them. If a user is already a part of another Team, a - * `team_invite_failed` error will be returned. - * - * @param teamAddMemberRequest (required) - * @param teamId The id of the team. (optional) - * @return ApiResponse<TeamGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamAddMemberWithHttpInfo( - TeamAddMemberRequest teamAddMemberRequest, String teamId) throws ApiException { - - // Check required parameters - if (teamAddMemberRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'teamAddMemberRequest' when calling" - + " teamAddMember"); - } - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "team_id", teamId)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = teamAddMemberRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamAddMember", - "/team/add_member", - "PUT", - localVarQueryParams, - isFileTypeFound ? null : teamAddMemberRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a - * Team to invoke. - * - * @param teamCreateRequest (required) - * @return TeamGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws ApiException { - return teamCreateWithHttpInfo(teamCreateRequest).getData(); - } - - /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a - * Team to invoke. - * - * @param teamCreateRequest (required) - * @return ApiResponse<TeamGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest teamCreateRequest) - throws ApiException { - - // Check required parameters - if (teamCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'teamCreateRequest' when calling teamCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = teamCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamCreate", - "/team/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : teamCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member - * (yourself). - * - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void teamDelete() throws ApiException { - teamDeleteWithHttpInfo(); - } - - /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member - * (yourself). - * - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamDeleteWithHttpInfo() throws ApiException { - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - return apiClient.invokeAPI( - "TeamApi.teamDelete", - "/team/destroy", - "DELETE", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not - * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. - * - * @return TeamGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetResponse teamGet() throws ApiException { - return teamGetWithHttpInfo().getData(); - } - - /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not - * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. - * - * @return ApiResponse<TeamGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamGetWithHttpInfo() throws ApiException { - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamGet", - "/team", - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Team Info. Provides information about a team. - * - * @param teamId The id of the team. (optional) - * @return TeamGetInfoResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetInfoResponse teamInfo(String teamId) throws ApiException { - return teamInfoWithHttpInfo(teamId).getData(); - } - - /** - * @see TeamApi#teamInfo(String) - */ - public TeamGetInfoResponse teamInfo() throws ApiException { - String teamId = null; - - return teamInfoWithHttpInfo(teamId).getData(); - } - - /** - * @see TeamApi#teamInfoWithHttpInfo(String) - */ - public ApiResponse teamInfoWithHttpInfo() throws ApiException { - String teamId = null; - - return teamInfoWithHttpInfo(teamId); - } - - /** - * Get Team Info. Provides information about a team. - * - * @param teamId The id of the team. (optional) - * @return ApiResponse<TeamGetInfoResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamInfoWithHttpInfo(String teamId) - throws ApiException { - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "team_id", teamId)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamInfo", - "/team/info", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Team Invites. Provides a list of team invites (and their roles). - * - * @param emailAddress The email address for which to display the team invites. (optional) - * @return TeamInvitesResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamInvitesResponse teamInvites(String emailAddress) throws ApiException { - return teamInvitesWithHttpInfo(emailAddress).getData(); - } - - /** - * @see TeamApi#teamInvites(String) - */ - public TeamInvitesResponse teamInvites() throws ApiException { - String emailAddress = null; - - return teamInvitesWithHttpInfo(emailAddress).getData(); - } - - /** - * @see TeamApi#teamInvitesWithHttpInfo(String) - */ - public ApiResponse teamInvitesWithHttpInfo() throws ApiException { - String emailAddress = null; - - return teamInvitesWithHttpInfo(emailAddress); - } - - /** - * List Team Invites. Provides a list of team invites (and their roles). - * - * @param emailAddress The email address for which to display the team invites. (optional) - * @return ApiResponse<TeamInvitesResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamInvitesWithHttpInfo(String emailAddress) - throws ApiException { - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "email_address", emailAddress)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamInvites", - "/team/invites", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a - * given team. - * - * @param teamId The id of the team that a member list is being requested from. (required) - * @param page Which page number of the team member list to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return TeamMembersResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamMembersResponse teamMembers(String teamId, Integer page, Integer pageSize) - throws ApiException { - return teamMembersWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamMembers(String, Integer, Integer) - */ - public TeamMembersResponse teamMembers(String teamId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return teamMembersWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamMembersWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse teamMembersWithHttpInfo(String teamId) - throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return teamMembersWithHttpInfo(teamId, page, pageSize); - } - - /** - * @see TeamApi#teamMembers(String, Integer, Integer) - */ - public TeamMembersResponse teamMembers(String teamId, Integer page) throws ApiException { - Integer pageSize = 20; - - return teamMembersWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamMembersWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse teamMembersWithHttpInfo(String teamId, Integer page) - throws ApiException { - Integer pageSize = 20; - - return teamMembersWithHttpInfo(teamId, page, pageSize); - } - - /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a - * given team. - * - * @param teamId The id of the team that a member list is being requested from. (required) - * @param page Which page number of the team member list to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return ApiResponse<TeamMembersResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamMembersWithHttpInfo( - String teamId, Integer page, Integer pageSize) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Check required parameters - if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling teamMembers"); - } - - // Path parameters - String localVarPath = - "/team/members/{team_id}" - .replaceAll("\\{team_id}", apiClient.escapeString(teamId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamMembers", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to - * transfer documents from the removed Account to an Account provided in the - * `new_owner_email_address` parameter (available only for Enterprise plans), the - * response status code will be 201, which indicates that your request has been queued but not - * fully executed. - * - * @param teamRemoveMemberRequest (required) - * @return TeamGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMemberRequest) - throws ApiException { - return teamRemoveMemberWithHttpInfo(teamRemoveMemberRequest).getData(); - } - - /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to - * transfer documents from the removed Account to an Account provided in the - * `new_owner_email_address` parameter (available only for Enterprise plans), the - * response status code will be 201, which indicates that your request has been queued but not - * fully executed. - * - * @param teamRemoveMemberRequest (required) - * @return ApiResponse<TeamGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamRemoveMemberWithHttpInfo( - TeamRemoveMemberRequest teamRemoveMemberRequest) throws ApiException { - - // Check required parameters - if (teamRemoveMemberRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'teamRemoveMemberRequest' when calling" - + " teamRemoveMember"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = teamRemoveMemberRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamRemoveMember", - "/team/remove_member", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : teamRemoveMemberRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. - * - * @param teamId The id of the parent Team. (required) - * @param page Which page number of the SubTeam List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return TeamSubTeamsResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamSubTeamsResponse teamSubTeams(String teamId, Integer page, Integer pageSize) - throws ApiException { - return teamSubTeamsWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamSubTeams(String, Integer, Integer) - */ - public TeamSubTeamsResponse teamSubTeams(String teamId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return teamSubTeamsWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamSubTeamsWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse teamSubTeamsWithHttpInfo(String teamId) - throws ApiException { - Integer page = 1; - Integer pageSize = 20; - - return teamSubTeamsWithHttpInfo(teamId, page, pageSize); - } - - /** - * @see TeamApi#teamSubTeams(String, Integer, Integer) - */ - public TeamSubTeamsResponse teamSubTeams(String teamId, Integer page) throws ApiException { - Integer pageSize = 20; - - return teamSubTeamsWithHttpInfo(teamId, page, pageSize).getData(); - } - - /** - * @see TeamApi#teamSubTeamsWithHttpInfo(String, Integer, Integer) - */ - public ApiResponse teamSubTeamsWithHttpInfo(String teamId, Integer page) - throws ApiException { - Integer pageSize = 20; - - return teamSubTeamsWithHttpInfo(teamId, page, pageSize); - } - - /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. - * - * @param teamId The id of the parent Team. (required) - * @param page Which page number of the SubTeam List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @return ApiResponse<TeamSubTeamsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamSubTeamsWithHttpInfo( - String teamId, Integer page, Integer pageSize) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Check required parameters - if (teamId == null) { - throw new ApiException( - 400, "Missing the required parameter 'teamId' when calling teamSubTeams"); - } - - // Path parameters - String localVarPath = - "/team/sub_teams/{team_id}" - .replaceAll("\\{team_id}", apiClient.escapeString(teamId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamSubTeams", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Update Team. Updates the name of your Team. - * - * @param teamUpdateRequest (required) - * @return TeamGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws ApiException { - return teamUpdateWithHttpInfo(teamUpdateRequest).getData(); - } - - /** - * Update Team. Updates the name of your Team. - * - * @param teamUpdateRequest (required) - * @return ApiResponse<TeamGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse teamUpdateWithHttpInfo(TeamUpdateRequest teamUpdateRequest) - throws ApiException { - - // Check required parameters - if (teamUpdateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'teamUpdateRequest' when calling teamUpdate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = teamUpdateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TeamApi.teamUpdate", - "/team", - "PUT", - new ArrayList<>(), - isFileTypeFound ? null : teamUpdateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java deleted file mode 100644 index bee010c28..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ /dev/null @@ -1,1090 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.Pair; -import com.dropbox.sign.model.FileResponse; -import com.dropbox.sign.model.FileResponseDataUri; -import com.dropbox.sign.model.TemplateAddUserRequest; -import com.dropbox.sign.model.TemplateCreateEmbeddedDraftRequest; -import com.dropbox.sign.model.TemplateCreateEmbeddedDraftResponse; -import com.dropbox.sign.model.TemplateCreateRequest; -import com.dropbox.sign.model.TemplateCreateResponse; -import com.dropbox.sign.model.TemplateGetResponse; -import com.dropbox.sign.model.TemplateListResponse; -import com.dropbox.sign.model.TemplateRemoveUserRequest; -import com.dropbox.sign.model.TemplateUpdateFilesRequest; -import com.dropbox.sign.model.TemplateUpdateFilesResponse; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class TemplateApi { - private ApiClient apiClient; - - public TemplateApi() { - this(Configuration.getDefaultApiClient()); - } - - public TemplateApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Add User to Template. Gives the specified Account access to the specified Template. The - * specified Account must be a part of your Team. - * - * @param templateId The id of the Template to give the Account access to. (required) - * @param templateAddUserRequest (required) - * @return TemplateGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateGetResponse templateAddUser( - String templateId, TemplateAddUserRequest templateAddUserRequest) throws ApiException { - return templateAddUserWithHttpInfo(templateId, templateAddUserRequest).getData(); - } - - /** - * Add User to Template. Gives the specified Account access to the specified Template. The - * specified Account must be a part of your Team. - * - * @param templateId The id of the Template to give the Account access to. (required) - * @param templateAddUserRequest (required) - * @return ApiResponse<TemplateGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateAddUserWithHttpInfo( - String templateId, TemplateAddUserRequest templateAddUserRequest) throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling templateAddUser"); - } - if (templateAddUserRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateAddUserRequest' when calling" - + " templateAddUser"); - } - - // Path parameters - String localVarPath = - "/template/add_user/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = templateAddUserRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateAddUser", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : templateAddUserRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Template. Creates a template that can then be used. - * - * @param templateCreateRequest (required) - * @return TemplateCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreateRequest) - throws ApiException { - return templateCreateWithHttpInfo(templateCreateRequest).getData(); - } - - /** - * Create Template. Creates a template that can then be used. - * - * @param templateCreateRequest (required) - * @return ApiResponse<TemplateCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateCreateWithHttpInfo( - TemplateCreateRequest templateCreateRequest) throws ApiException { - - // Check required parameters - if (templateCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateCreateRequest' when calling" - + " templateCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = templateCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateCreate", - "/template/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : templateCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a - * draft template that can then be further set up in the template 'edit' stage. - * - * @param templateCreateEmbeddedDraftRequest (required) - * @return TemplateCreateEmbeddedDraftResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft( - TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest) - throws ApiException { - return templateCreateEmbeddedDraftWithHttpInfo(templateCreateEmbeddedDraftRequest) - .getData(); - } - - /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a - * draft template that can then be further set up in the template 'edit' stage. - * - * @param templateCreateEmbeddedDraftRequest (required) - * @return ApiResponse<TemplateCreateEmbeddedDraftResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateCreateEmbeddedDraftWithHttpInfo( - TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest) - throws ApiException { - - // Check required parameters - if (templateCreateEmbeddedDraftRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateCreateEmbeddedDraftRequest' when" - + " calling templateCreateEmbeddedDraft"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = templateCreateEmbeddedDraftRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateCreateEmbeddedDraft", - "/template/create_embedded_draft", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : templateCreateEmbeddedDraftRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Delete Template. Completely deletes the template specified from the account. - * - * @param templateId The id of the Template to delete. (required) - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public void templateDelete(String templateId) throws ApiException { - templateDeleteWithHttpInfo(templateId); - } - - /** - * Delete Template. Completely deletes the template specified from the account. - * - * @param templateId The id of the Template to delete. (required) - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateDeleteWithHttpInfo(String templateId) throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, "Missing the required parameter 'templateId' when calling templateDelete"); - } - - // Path parameters - String localVarPath = - "/template/delete/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - return apiClient.invokeAPI( - "TemplateApi.templateDelete", - localVarPath, - "POST", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - null, - false); - } - - /** - * Get Template Files. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently - * being prepared, a status code of `409` will be returned instead. In this case - * please wait for the `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @param fileType Set to `pdf` for a single merged document or `zip` for a - * collection of individual documents. (optional) - * @return File - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public File templateFiles(String templateId, String fileType) throws ApiException { - return templateFilesWithHttpInfo(templateId, fileType).getData(); - } - - /** - * @see TemplateApi#templateFiles(String, String) - */ - public File templateFiles(String templateId) throws ApiException { - String fileType = null; - - return templateFilesWithHttpInfo(templateId, fileType).getData(); - } - - /** - * @see TemplateApi#templateFilesWithHttpInfo(String, String) - */ - public ApiResponse templateFilesWithHttpInfo(String templateId) throws ApiException { - String fileType = null; - - return templateFilesWithHttpInfo(templateId, fileType); - } - - /** - * Get Template Files. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently - * being prepared, a status code of `409` will be returned instead. In this case - * please wait for the `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @param fileType Set to `pdf` for a single merged document or `zip` for a - * collection of individual documents. (optional) - * @return ApiResponse<File> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateFilesWithHttpInfo(String templateId, String fileType) - throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, "Missing the required parameter 'templateId' when calling templateFiles"); - } - - // Path parameters - String localVarPath = - "/template/files/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "file_type", fileType)); - - String localVarAccept = - apiClient.selectHeaderAccept( - "application/pdf", "application/zip", "application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateFiles", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a JSON object with a `data_uri` - * representing the base64 encoded file (PDFs only). If the files are currently being prepared, - * a status code of `409` will be returned instead. In this case please wait for the - * `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @return FileResponseDataUri - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiException { - return templateFilesAsDataUriWithHttpInfo(templateId).getData(); - } - - /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a JSON object with a `data_uri` - * representing the base64 encoded file (PDFs only). If the files are currently being prepared, - * a status code of `409` will be returned instead. In this case please wait for the - * `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @return ApiResponse<FileResponseDataUri> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateFilesAsDataUriWithHttpInfo(String templateId) - throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling" - + " templateFilesAsDataUri"); - } - - // Path parameters - String localVarPath = - "/template/files_as_data_uri/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateFilesAsDataUri", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - * If the files are currently being prepared, a status code of `409` will be returned - * instead. In this case please wait for the `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @param forceDownload By default when opening the `file_url` a browser will download - * the PDF and save it locally. When set to `0` the PDF file will be displayed in - * the browser. (optional, default to 1) - * @return FileResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public FileResponse templateFilesAsFileUrl(String templateId, Integer forceDownload) - throws ApiException { - return templateFilesAsFileUrlWithHttpInfo(templateId, forceDownload).getData(); - } - - /** - * @see TemplateApi#templateFilesAsFileUrl(String, Integer) - */ - public FileResponse templateFilesAsFileUrl(String templateId) throws ApiException { - Integer forceDownload = 1; - - return templateFilesAsFileUrlWithHttpInfo(templateId, forceDownload).getData(); - } - - /** - * @see TemplateApi#templateFilesAsFileUrlWithHttpInfo(String, Integer) - */ - public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templateId) - throws ApiException { - Integer forceDownload = 1; - - return templateFilesAsFileUrlWithHttpInfo(templateId, forceDownload); - } - - /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the - * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). - * If the files are currently being prepared, a status code of `409` will be returned - * instead. In this case please wait for the `template_created` callback event. - * - * @param templateId The id of the template files to retrieve. (required) - * @param forceDownload By default when opening the `file_url` a browser will download - * the PDF and save it locally. When set to `0` the PDF file will be displayed in - * the browser. (optional, default to 1) - * @return ApiResponse<FileResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateFilesAsFileUrlWithHttpInfo( - String templateId, Integer forceDownload) throws ApiException { - - if (forceDownload == null) { - forceDownload = 1; - } - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling" - + " templateFilesAsFileUrl"); - } - - // Path parameters - String localVarPath = - "/template/files_as_file_url/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "force_download", forceDownload)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateFilesAsFileUrl", - localVarPath, - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Get Template. Returns the Template specified by the `template_id` parameter. - * - * @param templateId The id of the Template to retrieve. (required) - * @return TemplateGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateGetResponse templateGet(String templateId) throws ApiException { - return templateGetWithHttpInfo(templateId).getData(); - } - - /** - * Get Template. Returns the Template specified by the `template_id` parameter. - * - * @param templateId The id of the Template to retrieve. (required) - * @return ApiResponse<TemplateGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateGetWithHttpInfo(String templateId) - throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, "Missing the required parameter 'templateId' when calling templateGet"); - } - - // Path parameters - String localVarPath = - "/template/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateGet", - localVarPath, - "GET", - new ArrayList<>(), - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. - * - * @param accountId Which account to return Templates for. Must be a team member. Use - * `all` to indicate all team members. Defaults to your account. (optional) - * @param page Which page number of the Template List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param query String that includes search terms and/or fields to be used to filter the - * Template objects. (optional) - * @return TemplateListResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateListResponse templateList( - String accountId, Integer page, Integer pageSize, String query) throws ApiException { - return templateListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see TemplateApi#templateList(String, Integer, Integer, String) - */ - public TemplateListResponse templateList() throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see TemplateApi#templateListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse templateListWithHttpInfo() throws ApiException { - String accountId = null; - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see TemplateApi#templateList(String, Integer, Integer, String) - */ - public TemplateListResponse templateList(String accountId) throws ApiException { - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see TemplateApi#templateListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse templateListWithHttpInfo(String accountId) - throws ApiException { - Integer page = 1; - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see TemplateApi#templateList(String, Integer, Integer, String) - */ - public TemplateListResponse templateList(String accountId, Integer page) throws ApiException { - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see TemplateApi#templateListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse templateListWithHttpInfo( - String accountId, Integer page) throws ApiException { - Integer pageSize = 20; - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * @see TemplateApi#templateList(String, Integer, Integer, String) - */ - public TemplateListResponse templateList(String accountId, Integer page, Integer pageSize) - throws ApiException { - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query).getData(); - } - - /** - * @see TemplateApi#templateListWithHttpInfo(String, Integer, Integer, String) - */ - public ApiResponse templateListWithHttpInfo( - String accountId, Integer page, Integer pageSize) throws ApiException { - String query = null; - - return templateListWithHttpInfo(accountId, page, pageSize, query); - } - - /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. - * - * @param accountId Which account to return Templates for. Must be a team member. Use - * `all` to indicate all team members. Defaults to your account. (optional) - * @param page Which page number of the Template List to return. Defaults to `1`. - * (optional, default to 1) - * @param pageSize Number of objects to be returned per page. Must be between `1` and - * `100`. Default is `20`. (optional, default to 20) - * @param query String that includes search terms and/or fields to be used to filter the - * Template objects. (optional) - * @return ApiResponse<TemplateListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateListWithHttpInfo( - String accountId, Integer page, Integer pageSize, String query) throws ApiException { - - if (page == null) { - page = 1; - } - if (pageSize == null) { - pageSize = 20; - } - // Query parameters - List localVarQueryParams = - new ArrayList<>(apiClient.parameterToPairs("", "account_id", accountId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = new HashMap(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound ? "multipart/form-data" : apiClient.selectHeaderContentType(); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateList", - "/template/list", - "GET", - localVarQueryParams, - null, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Remove User from Template. Removes the specified Account's access to the specified - * Template. - * - * @param templateId The id of the Template to remove the Account's access to. (required) - * @param templateRemoveUserRequest (required) - * @return TemplateGetResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateGetResponse templateRemoveUser( - String templateId, TemplateRemoveUserRequest templateRemoveUserRequest) - throws ApiException { - return templateRemoveUserWithHttpInfo(templateId, templateRemoveUserRequest).getData(); - } - - /** - * Remove User from Template. Removes the specified Account's access to the specified - * Template. - * - * @param templateId The id of the Template to remove the Account's access to. (required) - * @param templateRemoveUserRequest (required) - * @return ApiResponse<TemplateGetResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateRemoveUserWithHttpInfo( - String templateId, TemplateRemoveUserRequest templateRemoveUserRequest) - throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling templateRemoveUser"); - } - if (templateRemoveUserRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateRemoveUserRequest' when calling" - + " templateRemoveUser"); - } - - // Path parameters - String localVarPath = - "/template/remove_user/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = templateRemoveUserRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateRemoveUser", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : templateRemoveUserRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new - * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) - * being replaced. This will not overwrite or in any way affect the existing template. Both the - * existing template and new template will be available for use after executing this endpoint. - * Also note that this will decrement your template quota. Overlaying new files is asynchronous - * and a successful call to this endpoint will return 200 OK response if the request passes - * initial validation checks. It is recommended that a callback be implemented to listen for the - * callback event. A `template_created` event will be sent when the files are updated - * or a `template_error` event will be sent if there was a problem while updating the - * files. If a callback handler has been configured and the event has not been received within - * 60 minutes of making the call, check the status of the request in the API dashboard and retry - * the request if necessary. If the page orientation or page count is different from the - * original template document, we will notify you with a `template_error` [callback - * event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - * - * @param templateId The ID of the template whose files to update. (required) - * @param templateUpdateFilesRequest (required) - * @return TemplateUpdateFilesResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public TemplateUpdateFilesResponse templateUpdateFiles( - String templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest) - throws ApiException { - return templateUpdateFilesWithHttpInfo(templateId, templateUpdateFilesRequest).getData(); - } - - /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new - * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) - * being replaced. This will not overwrite or in any way affect the existing template. Both the - * existing template and new template will be available for use after executing this endpoint. - * Also note that this will decrement your template quota. Overlaying new files is asynchronous - * and a successful call to this endpoint will return 200 OK response if the request passes - * initial validation checks. It is recommended that a callback be implemented to listen for the - * callback event. A `template_created` event will be sent when the files are updated - * or a `template_error` event will be sent if there was a problem while updating the - * files. If a callback handler has been configured and the event has not been received within - * 60 minutes of making the call, check the status of the request in the API dashboard and retry - * the request if necessary. If the page orientation or page count is different from the - * original template document, we will notify you with a `template_error` [callback - * event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). - * - * @param templateId The ID of the template whose files to update. (required) - * @param templateUpdateFilesRequest (required) - * @return ApiResponse<TemplateUpdateFilesResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse templateUpdateFilesWithHttpInfo( - String templateId, TemplateUpdateFilesRequest templateUpdateFilesRequest) - throws ApiException { - - // Check required parameters - if (templateId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateId' when calling templateUpdateFiles"); - } - if (templateUpdateFilesRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'templateUpdateFilesRequest' when calling" - + " templateUpdateFiles"); - } - - // Path parameters - String localVarPath = - "/template/update_files/{template_id}" - .replaceAll( - "\\{template_id}", apiClient.escapeString(templateId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = templateUpdateFilesRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "TemplateApi.templateUpdateFiles", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : templateUpdateFilesRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java deleted file mode 100644 index 6219c4a13..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ /dev/null @@ -1,399 +0,0 @@ -package com.dropbox.sign.api; - -import com.dropbox.sign.ApiClient; -import com.dropbox.sign.ApiException; -import com.dropbox.sign.ApiResponse; -import com.dropbox.sign.Configuration; -import com.dropbox.sign.model.UnclaimedDraftCreateEmbeddedRequest; -import com.dropbox.sign.model.UnclaimedDraftCreateEmbeddedWithTemplateRequest; -import com.dropbox.sign.model.UnclaimedDraftCreateRequest; -import com.dropbox.sign.model.UnclaimedDraftCreateResponse; -import com.dropbox.sign.model.UnclaimedDraftEditAndResendRequest; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class UnclaimedDraftApi { - private ApiClient apiClient; - - public UnclaimedDraftApi() { - this(Configuration.getDefaultApiClient()); - } - - public UnclaimedDraftApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the - * \"Sign and send\" or the \"Request signature\" page with the Draft - * loaded. Subsequent access to the claim URL will result in a 404. - * - * @param unclaimedDraftCreateRequest (required) - * @return UnclaimedDraftCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public UnclaimedDraftCreateResponse unclaimedDraftCreate( - UnclaimedDraftCreateRequest unclaimedDraftCreateRequest) throws ApiException { - return unclaimedDraftCreateWithHttpInfo(unclaimedDraftCreateRequest).getData(); - } - - /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the - * \"Sign and send\" or the \"Request signature\" page with the Draft - * loaded. Subsequent access to the claim URL will result in a 404. - * - * @param unclaimedDraftCreateRequest (required) - * @return ApiResponse<UnclaimedDraftCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse unclaimedDraftCreateWithHttpInfo( - UnclaimedDraftCreateRequest unclaimedDraftCreateRequest) throws ApiException { - - // Check required parameters - if (unclaimedDraftCreateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'unclaimedDraftCreateRequest' when calling" - + " unclaimedDraftCreate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = unclaimedDraftCreateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "UnclaimedDraftApi.unclaimedDraftCreate", - "/unclaimed_draft/create", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : unclaimedDraftCreateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an - * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will - * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to - * the claim URL will result in a `404`. For this embedded endpoint the - * `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed - * drafts can only be accessed in embedded iFrames whereas normal drafts can be used and - * accessed on Dropbox Sign. - * - * @param unclaimedDraftCreateEmbeddedRequest (required) - * @return UnclaimedDraftCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded( - UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest) - throws ApiException { - return unclaimedDraftCreateEmbeddedWithHttpInfo(unclaimedDraftCreateEmbeddedRequest) - .getData(); - } - - /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an - * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will - * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to - * the claim URL will result in a `404`. For this embedded endpoint the - * `requester_email_address` parameter is required. **NOTE:** Embedded unclaimed - * drafts can only be accessed in embedded iFrames whereas normal drafts can be used and - * accessed on Dropbox Sign. - * - * @param unclaimedDraftCreateEmbeddedRequest (required) - * @return ApiResponse<UnclaimedDraftCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse unclaimedDraftCreateEmbeddedWithHttpInfo( - UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest) - throws ApiException { - - // Check required parameters - if (unclaimedDraftCreateEmbeddedRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'unclaimedDraftCreateEmbeddedRequest' when" - + " calling unclaimedDraftCreateEmbedded"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = unclaimedDraftCreateEmbeddedRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "UnclaimedDraftApi.unclaimedDraftCreateEmbedded", - "/unclaimed_draft/create_embedded", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : unclaimedDraftCreateEmbeddedRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved - * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user - * to access the URL will claim the Draft and will be shown the \"Request signature\" - * page with the Draft loaded. Subsequent access to the claim URL will result in a - * `404`. For this embedded endpoint the `requester_email_address` parameter - * is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames - * whereas normal drafts can be used and accessed on Dropbox Sign. - * - * @param unclaimedDraftCreateEmbeddedWithTemplateRequest (required) - * @return UnclaimedDraftCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( - UnclaimedDraftCreateEmbeddedWithTemplateRequest - unclaimedDraftCreateEmbeddedWithTemplateRequest) - throws ApiException { - return unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo( - unclaimedDraftCreateEmbeddedWithTemplateRequest) - .getData(); - } - - /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved - * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user - * to access the URL will claim the Draft and will be shown the \"Request signature\" - * page with the Draft loaded. Subsequent access to the claim URL will result in a - * `404`. For this embedded endpoint the `requester_email_address` parameter - * is required. **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames - * whereas normal drafts can be used and accessed on Dropbox Sign. - * - * @param unclaimedDraftCreateEmbeddedWithTemplateRequest (required) - * @return ApiResponse<UnclaimedDraftCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse - unclaimedDraftCreateEmbeddedWithTemplateWithHttpInfo( - UnclaimedDraftCreateEmbeddedWithTemplateRequest - unclaimedDraftCreateEmbeddedWithTemplateRequest) - throws ApiException { - - // Check required parameters - if (unclaimedDraftCreateEmbeddedWithTemplateRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter" - + " 'unclaimedDraftCreateEmbeddedWithTemplateRequest' when calling" - + " unclaimedDraftCreateEmbeddedWithTemplate"); - } - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = unclaimedDraftCreateEmbeddedWithTemplateRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType( - "application/json", "multipart/form-data"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "UnclaimedDraftApi.unclaimedDraftCreateEmbeddedWithTemplate", - "/unclaimed_draft/create_embedded_with_template", - "POST", - new ArrayList<>(), - isFileTypeFound ? null : unclaimedDraftCreateEmbeddedWithTemplateRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } - - /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email - * address will remain unchanged if `requester_email_address` parameter is not set. - * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal - * drafts can be used and accessed on Dropbox Sign. - * - * @param signatureRequestId The ID of the signature request to edit and resend. (required) - * @param unclaimedDraftEditAndResendRequest (required) - * @return UnclaimedDraftCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend( - String signatureRequestId, - UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest) - throws ApiException { - return unclaimedDraftEditAndResendWithHttpInfo( - signatureRequestId, unclaimedDraftEditAndResendRequest) - .getData(); - } - - /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email - * address will remain unchanged if `requester_email_address` parameter is not set. - * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal - * drafts can be used and accessed on Dropbox Sign. - * - * @param signatureRequestId The ID of the signature request to edit and resend. (required) - * @param unclaimedDraftEditAndResendRequest (required) - * @return ApiResponse<UnclaimedDraftCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - *
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
- */ - public ApiResponse unclaimedDraftEditAndResendWithHttpInfo( - String signatureRequestId, - UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest) - throws ApiException { - - // Check required parameters - if (signatureRequestId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'signatureRequestId' when calling" - + " unclaimedDraftEditAndResend"); - } - if (unclaimedDraftEditAndResendRequest == null) { - throw new ApiException( - 400, - "Missing the required parameter 'unclaimedDraftEditAndResendRequest' when" - + " calling unclaimedDraftEditAndResend"); - } - - // Path parameters - String localVarPath = - "/unclaimed_draft/edit_and_resend/{signature_request_id}" - .replaceAll( - "\\{signature_request_id}", - apiClient.escapeString(signatureRequestId.toString())); - - String localVarAccept = apiClient.selectHeaderAccept("application/json"); - Map localVarFormParams = new LinkedHashMap<>(); - localVarFormParams = unclaimedDraftEditAndResendRequest.createFormData(); - boolean isFileTypeFound = !localVarFormParams.isEmpty(); - String localVarContentType = - isFileTypeFound - ? "multipart/form-data" - : apiClient.selectHeaderContentType("application/json"); - String[] localVarAuthNames = new String[] {"api_key", "oauth2"}; - GenericType localVarReturnType = - new GenericType() {}; - return apiClient.invokeAPI( - "UnclaimedDraftApi.unclaimedDraftEditAndResend", - localVarPath, - "POST", - new ArrayList<>(), - isFileTypeFound ? null : unclaimedDraftEditAndResendRequest, - new LinkedHashMap<>(), - new LinkedHashMap<>(), - localVarFormParams, - localVarAccept, - localVarContentType, - localVarAuthNames, - localVarReturnType, - false); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java deleted file mode 100644 index b066e1383..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.auth; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java deleted file mode 100644 index 9d183342d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.auth; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - */ - void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException; -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java deleted file mode 100644 index d8c229c88..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.auth; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Pair; -import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.util.Base64; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (username == null && password == null) { - return; - } - String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); - headerParams.put( - "Authorization", - "Basic " - + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java deleted file mode 100644 index 22500f2d5..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.auth; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.Pair; -import java.net.URI; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the - * Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams( - List queryParams, - Map headerParams, - Map cookieParams, - String payload, - String method, - URI uri) - throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put( - "Authorization", - (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java deleted file mode 100644 index 0081f2ada..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Map; -import java.util.Objects; -import javax.ws.rs.core.GenericType; - -/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map> getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - @JsonValue - public Object getActualInstance() { - return instance; - } - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) { - this.instance = instance; - } - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf - * schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).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 boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) - && Objects.equals(this.isNullable, a.isNullable) - && Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java deleted file mode 100644 index fc3c3081d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** AccountCreateRequest */ -@JsonPropertyOrder({ - AccountCreateRequest.JSON_PROPERTY_EMAIL_ADDRESS, - AccountCreateRequest.JSON_PROPERTY_CLIENT_ID, - AccountCreateRequest.JSON_PROPERTY_CLIENT_SECRET, - AccountCreateRequest.JSON_PROPERTY_LOCALE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountCreateRequest { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; - - public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; - - public AccountCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountCreateRequest.class); - } - - public static AccountCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountCreateRequest.class); - } - - public AccountCreateRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address which will be associated with the new Account. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public AccountCreateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Used when creating a new account with OAuth authorization. See [OAuth 2.0 - * Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public AccountCreateRequest clientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Used when creating a new account with OAuth authorization. See [OAuth 2.0 - * Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) - * - * @return clientSecret - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - } - - public AccountCreateRequest locale(String locale) { - this.locale = locale; - return this; - } - - /** - * The locale used in this Account. Check out the list of [supported - * locales](/api/reference/constants/#supported-locales) to learn more about the possible - * values. - * - * @return locale - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocale() { - return locale; - } - - @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { - this.locale = locale; - } - - /** Return true if this AccountCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountCreateRequest accountCreateRequest = (AccountCreateRequest) o; - return Objects.equals(this.emailAddress, accountCreateRequest.emailAddress) - && Objects.equals(this.clientId, accountCreateRequest.clientId) - && Objects.equals(this.clientSecret, accountCreateRequest.clientSecret) - && Objects.equals(this.locale, accountCreateRequest.locale); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress, clientId, clientSecret, locale); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountCreateRequest {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); - sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (clientSecret != null) { - if (isFileTypeOrListOfFiles(clientSecret)) { - fileTypeFound = true; - } - - if (clientSecret.getClass().equals(java.io.File.class) - || clientSecret.getClass().equals(Integer.class) - || clientSecret.getClass().equals(String.class) - || clientSecret.getClass().isEnum()) { - map.put("client_secret", clientSecret); - } else if (isListOfFile(clientSecret)) { - for (int i = 0; i < getListSize(clientSecret); i++) { - map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); - } - } else { - map.put( - "client_secret", - JSON.getDefault().getMapper().writeValueAsString(clientSecret)); - } - } - if (locale != null) { - if (isFileTypeOrListOfFiles(locale)) { - fileTypeFound = true; - } - - if (locale.getClass().equals(java.io.File.class) - || locale.getClass().equals(Integer.class) - || locale.getClass().equals(String.class) - || locale.getClass().isEnum()) { - map.put("locale", locale); - } else if (isListOfFile(locale)) { - for (int i = 0; i < getListSize(locale); i++) { - map.put("locale[" + i + "]", getFromList(locale, i)); - } - } else { - map.put("locale", JSON.getDefault().getMapper().writeValueAsString(locale)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java deleted file mode 100644 index be4f9500b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** AccountCreateResponse */ -@JsonPropertyOrder({ - AccountCreateResponse.JSON_PROPERTY_ACCOUNT, - AccountCreateResponse.JSON_PROPERTY_OAUTH_DATA, - AccountCreateResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountCreateResponse { - public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; - - public static final String JSON_PROPERTY_OAUTH_DATA = "oauth_data"; - private OAuthTokenResponse oauthData; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public AccountCreateResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountCreateResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountCreateResponse.class); - } - - public static AccountCreateResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), AccountCreateResponse.class); - } - - public AccountCreateResponse account(AccountResponse account) { - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccountResponse getAccount() { - return account; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { - this.account = account; - } - - public AccountCreateResponse oauthData(OAuthTokenResponse oauthData) { - this.oauthData = oauthData; - return this; - } - - /** - * Get oauthData - * - * @return oauthData - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OAUTH_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OAuthTokenResponse getOauthData() { - return oauthData; - } - - @JsonProperty(JSON_PROPERTY_OAUTH_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthData(OAuthTokenResponse oauthData) { - this.oauthData = oauthData; - } - - public AccountCreateResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public AccountCreateResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this AccountCreateResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountCreateResponse accountCreateResponse = (AccountCreateResponse) o; - return Objects.equals(this.account, accountCreateResponse.account) - && Objects.equals(this.oauthData, accountCreateResponse.oauthData) - && Objects.equals(this.warnings, accountCreateResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(account, oauthData, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountCreateResponse {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" oauthData: ").append(toIndentedString(oauthData)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (account != null) { - if (isFileTypeOrListOfFiles(account)) { - fileTypeFound = true; - } - - if (account.getClass().equals(java.io.File.class) - || account.getClass().equals(Integer.class) - || account.getClass().equals(String.class) - || account.getClass().isEnum()) { - map.put("account", account); - } else if (isListOfFile(account)) { - for (int i = 0; i < getListSize(account); i++) { - map.put("account[" + i + "]", getFromList(account, i)); - } - } else { - map.put("account", JSON.getDefault().getMapper().writeValueAsString(account)); - } - } - if (oauthData != null) { - if (isFileTypeOrListOfFiles(oauthData)) { - fileTypeFound = true; - } - - if (oauthData.getClass().equals(java.io.File.class) - || oauthData.getClass().equals(Integer.class) - || oauthData.getClass().equals(String.class) - || oauthData.getClass().isEnum()) { - map.put("oauth_data", oauthData); - } else if (isListOfFile(oauthData)) { - for (int i = 0; i < getListSize(oauthData); i++) { - map.put("oauth_data[" + i + "]", getFromList(oauthData, i)); - } - } else { - map.put( - "oauth_data", - JSON.getDefault().getMapper().writeValueAsString(oauthData)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java deleted file mode 100644 index 36473bf74..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** AccountGetResponse */ -@JsonPropertyOrder({ - AccountGetResponse.JSON_PROPERTY_ACCOUNT, - AccountGetResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountGetResponse { - public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public AccountGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountGetResponse.class); - } - - public static AccountGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountGetResponse.class); - } - - public AccountGetResponse account(AccountResponse account) { - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AccountResponse getAccount() { - return account; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { - this.account = account; - } - - public AccountGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public AccountGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this AccountGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountGetResponse accountGetResponse = (AccountGetResponse) o; - return Objects.equals(this.account, accountGetResponse.account) - && Objects.equals(this.warnings, accountGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(account, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountGetResponse {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (account != null) { - if (isFileTypeOrListOfFiles(account)) { - fileTypeFound = true; - } - - if (account.getClass().equals(java.io.File.class) - || account.getClass().equals(Integer.class) - || account.getClass().equals(String.class) - || account.getClass().isEnum()) { - map.put("account", account); - } else if (isListOfFile(account)) { - for (int i = 0; i < getListSize(account); i++) { - map.put("account[" + i + "]", getFromList(account, i)); - } - } else { - map.put("account", JSON.getDefault().getMapper().writeValueAsString(account)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java deleted file mode 100644 index 541c7f61d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** AccountResponse */ -@JsonPropertyOrder({ - AccountResponse.JSON_PROPERTY_ACCOUNT_ID, - AccountResponse.JSON_PROPERTY_EMAIL_ADDRESS, - AccountResponse.JSON_PROPERTY_IS_LOCKED, - AccountResponse.JSON_PROPERTY_IS_PAID_HS, - AccountResponse.JSON_PROPERTY_IS_PAID_HF, - AccountResponse.JSON_PROPERTY_QUOTAS, - AccountResponse.JSON_PROPERTY_CALLBACK_URL, - AccountResponse.JSON_PROPERTY_ROLE_CODE, - AccountResponse.JSON_PROPERTY_TEAM_ID, - AccountResponse.JSON_PROPERTY_LOCALE, - AccountResponse.JSON_PROPERTY_USAGE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountResponse { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; - - public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; - - public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; - - public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private AccountResponseQuotas quotas; - - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_ROLE_CODE = "role_code"; - private String roleCode; - - public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; - - public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; - - public static final String JSON_PROPERTY_USAGE = "usage"; - private AccountResponseUsage usage; - - public AccountResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountResponse.class); - } - - public static AccountResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountResponse.class); - } - - public AccountResponse accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The ID of the Account - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public AccountResponse emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address associated with the Account. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public AccountResponse isLocked(Boolean isLocked) { - this.isLocked = isLocked; - return this; - } - - /** - * Returns `true` if the user has been locked out of their account by a team admin. - * - * @return isLocked - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsLocked() { - return isLocked; - } - - @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { - this.isLocked = isLocked; - } - - public AccountResponse isPaidHs(Boolean isPaidHs) { - this.isPaidHs = isPaidHs; - return this; - } - - /** - * Returns `true` if the user has a paid Dropbox Sign account. - * - * @return isPaidHs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_PAID_HS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPaidHs() { - return isPaidHs; - } - - @JsonProperty(JSON_PROPERTY_IS_PAID_HS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { - this.isPaidHs = isPaidHs; - } - - public AccountResponse isPaidHf(Boolean isPaidHf) { - this.isPaidHf = isPaidHf; - return this; - } - - /** - * Returns `true` if the user has a paid HelloFax account. - * - * @return isPaidHf - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_PAID_HF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPaidHf() { - return isPaidHf; - } - - @JsonProperty(JSON_PROPERTY_IS_PAID_HF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { - this.isPaidHf = isPaidHf; - } - - public AccountResponse quotas(AccountResponseQuotas quotas) { - this.quotas = quotas; - return this; - } - - /** - * Get quotas - * - * @return quotas - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_QUOTAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccountResponseQuotas getQuotas() { - return quotas; - } - - @JsonProperty(JSON_PROPERTY_QUOTAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(AccountResponseQuotas quotas) { - this.quotas = quotas; - } - - public AccountResponse callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The URL that Dropbox Sign events will `POST` to. - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public AccountResponse roleCode(String roleCode) { - this.roleCode = roleCode; - return this; - } - - /** - * The membership role for the team. - * - * @return roleCode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROLE_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRoleCode() { - return roleCode; - } - - @JsonProperty(JSON_PROPERTY_ROLE_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoleCode(String roleCode) { - this.roleCode = roleCode; - } - - public AccountResponse teamId(String teamId) { - this.teamId = teamId; - return this; - } - - /** - * The id of the team account belongs to. - * - * @return teamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeamId() { - return teamId; - } - - @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - public AccountResponse locale(String locale) { - this.locale = locale; - return this; - } - - /** - * The locale used in this Account. Check out the list of [supported - * locales](/api/reference/constants/#supported-locales) to learn more about the possible - * values. - * - * @return locale - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocale() { - return locale; - } - - @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { - this.locale = locale; - } - - public AccountResponse usage(AccountResponseUsage usage) { - this.usage = usage; - return this; - } - - /** - * Get usage - * - * @return usage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccountResponseUsage getUsage() { - return usage; - } - - @JsonProperty(JSON_PROPERTY_USAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsage(AccountResponseUsage usage) { - this.usage = usage; - } - - /** Return true if this AccountResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountResponse accountResponse = (AccountResponse) o; - return Objects.equals(this.accountId, accountResponse.accountId) - && Objects.equals(this.emailAddress, accountResponse.emailAddress) - && Objects.equals(this.isLocked, accountResponse.isLocked) - && Objects.equals(this.isPaidHs, accountResponse.isPaidHs) - && Objects.equals(this.isPaidHf, accountResponse.isPaidHf) - && Objects.equals(this.quotas, accountResponse.quotas) - && Objects.equals(this.callbackUrl, accountResponse.callbackUrl) - && Objects.equals(this.roleCode, accountResponse.roleCode) - && Objects.equals(this.teamId, accountResponse.teamId) - && Objects.equals(this.locale, accountResponse.locale) - && Objects.equals(this.usage, accountResponse.usage); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, - emailAddress, - isLocked, - isPaidHs, - isPaidHf, - quotas, - callbackUrl, - roleCode, - teamId, - locale, - usage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountResponse {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" isPaidHs: ").append(toIndentedString(isPaidHs)).append("\n"); - sb.append(" isPaidHf: ").append(toIndentedString(isPaidHf)).append("\n"); - sb.append(" quotas: ").append(toIndentedString(quotas)).append("\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" roleCode: ").append(toIndentedString(roleCode)).append("\n"); - sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); - sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); - sb.append(" usage: ").append(toIndentedString(usage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (isLocked != null) { - if (isFileTypeOrListOfFiles(isLocked)) { - fileTypeFound = true; - } - - if (isLocked.getClass().equals(java.io.File.class) - || isLocked.getClass().equals(Integer.class) - || isLocked.getClass().equals(String.class) - || isLocked.getClass().isEnum()) { - map.put("is_locked", isLocked); - } else if (isListOfFile(isLocked)) { - for (int i = 0; i < getListSize(isLocked); i++) { - map.put("is_locked[" + i + "]", getFromList(isLocked, i)); - } - } else { - map.put( - "is_locked", - JSON.getDefault().getMapper().writeValueAsString(isLocked)); - } - } - if (isPaidHs != null) { - if (isFileTypeOrListOfFiles(isPaidHs)) { - fileTypeFound = true; - } - - if (isPaidHs.getClass().equals(java.io.File.class) - || isPaidHs.getClass().equals(Integer.class) - || isPaidHs.getClass().equals(String.class) - || isPaidHs.getClass().isEnum()) { - map.put("is_paid_hs", isPaidHs); - } else if (isListOfFile(isPaidHs)) { - for (int i = 0; i < getListSize(isPaidHs); i++) { - map.put("is_paid_hs[" + i + "]", getFromList(isPaidHs, i)); - } - } else { - map.put( - "is_paid_hs", - JSON.getDefault().getMapper().writeValueAsString(isPaidHs)); - } - } - if (isPaidHf != null) { - if (isFileTypeOrListOfFiles(isPaidHf)) { - fileTypeFound = true; - } - - if (isPaidHf.getClass().equals(java.io.File.class) - || isPaidHf.getClass().equals(Integer.class) - || isPaidHf.getClass().equals(String.class) - || isPaidHf.getClass().isEnum()) { - map.put("is_paid_hf", isPaidHf); - } else if (isListOfFile(isPaidHf)) { - for (int i = 0; i < getListSize(isPaidHf); i++) { - map.put("is_paid_hf[" + i + "]", getFromList(isPaidHf, i)); - } - } else { - map.put( - "is_paid_hf", - JSON.getDefault().getMapper().writeValueAsString(isPaidHf)); - } - } - if (quotas != null) { - if (isFileTypeOrListOfFiles(quotas)) { - fileTypeFound = true; - } - - if (quotas.getClass().equals(java.io.File.class) - || quotas.getClass().equals(Integer.class) - || quotas.getClass().equals(String.class) - || quotas.getClass().isEnum()) { - map.put("quotas", quotas); - } else if (isListOfFile(quotas)) { - for (int i = 0; i < getListSize(quotas); i++) { - map.put("quotas[" + i + "]", getFromList(quotas, i)); - } - } else { - map.put("quotas", JSON.getDefault().getMapper().writeValueAsString(quotas)); - } - } - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (roleCode != null) { - if (isFileTypeOrListOfFiles(roleCode)) { - fileTypeFound = true; - } - - if (roleCode.getClass().equals(java.io.File.class) - || roleCode.getClass().equals(Integer.class) - || roleCode.getClass().equals(String.class) - || roleCode.getClass().isEnum()) { - map.put("role_code", roleCode); - } else if (isListOfFile(roleCode)) { - for (int i = 0; i < getListSize(roleCode); i++) { - map.put("role_code[" + i + "]", getFromList(roleCode, i)); - } - } else { - map.put( - "role_code", - JSON.getDefault().getMapper().writeValueAsString(roleCode)); - } - } - if (teamId != null) { - if (isFileTypeOrListOfFiles(teamId)) { - fileTypeFound = true; - } - - if (teamId.getClass().equals(java.io.File.class) - || teamId.getClass().equals(Integer.class) - || teamId.getClass().equals(String.class) - || teamId.getClass().isEnum()) { - map.put("team_id", teamId); - } else if (isListOfFile(teamId)) { - for (int i = 0; i < getListSize(teamId); i++) { - map.put("team_id[" + i + "]", getFromList(teamId, i)); - } - } else { - map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); - } - } - if (locale != null) { - if (isFileTypeOrListOfFiles(locale)) { - fileTypeFound = true; - } - - if (locale.getClass().equals(java.io.File.class) - || locale.getClass().equals(Integer.class) - || locale.getClass().equals(String.class) - || locale.getClass().isEnum()) { - map.put("locale", locale); - } else if (isListOfFile(locale)) { - for (int i = 0; i < getListSize(locale); i++) { - map.put("locale[" + i + "]", getFromList(locale, i)); - } - } else { - map.put("locale", JSON.getDefault().getMapper().writeValueAsString(locale)); - } - } - if (usage != null) { - if (isFileTypeOrListOfFiles(usage)) { - fileTypeFound = true; - } - - if (usage.getClass().equals(java.io.File.class) - || usage.getClass().equals(Integer.class) - || usage.getClass().equals(String.class) - || usage.getClass().isEnum()) { - map.put("usage", usage); - } else if (isListOfFile(usage)) { - for (int i = 0; i < getListSize(usage); i++) { - map.put("usage[" + i + "]", getFromList(usage, i)); - } - } else { - map.put("usage", JSON.getDefault().getMapper().writeValueAsString(usage)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java deleted file mode 100644 index 584917ff9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Details concerning remaining monthly quotas. */ -@JsonPropertyOrder({ - AccountResponseQuotas.JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT, - AccountResponseQuotas.JSON_PROPERTY_DOCUMENTS_LEFT, - AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_TOTAL, - AccountResponseQuotas.JSON_PROPERTY_TEMPLATES_LEFT, - AccountResponseQuotas.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT, - AccountResponseQuotas.JSON_PROPERTY_NUM_FAX_PAGES_LEFT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountResponseQuotas { - public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = - "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; - - public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; - - public static final String JSON_PROPERTY_TEMPLATES_TOTAL = "templates_total"; - private Integer templatesTotal; - - public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; - - public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; - - public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; - private Integer numFaxPagesLeft; - - public AccountResponseQuotas() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountResponseQuotas init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountResponseQuotas.class); - } - - public static AccountResponseQuotas init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), AccountResponseQuotas.class); - } - - public AccountResponseQuotas apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { - this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; - return this; - } - - /** - * API signature requests remaining. - * - * @return apiSignatureRequestsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getApiSignatureRequestsLeft() { - return apiSignatureRequestsLeft; - } - - @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { - this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; - } - - public AccountResponseQuotas documentsLeft(Integer documentsLeft) { - this.documentsLeft = documentsLeft; - return this; - } - - /** - * Signature requests remaining. - * - * @return documentsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDocumentsLeft() { - return documentsLeft; - } - - @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { - this.documentsLeft = documentsLeft; - } - - public AccountResponseQuotas templatesTotal(Integer templatesTotal) { - this.templatesTotal = templatesTotal; - return this; - } - - /** - * Total API templates allowed. - * - * @return templatesTotal - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATES_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getTemplatesTotal() { - return templatesTotal; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATES_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesTotal(Integer templatesTotal) { - this.templatesTotal = templatesTotal; - } - - public AccountResponseQuotas templatesLeft(Integer templatesLeft) { - this.templatesLeft = templatesLeft; - return this; - } - - /** - * API templates remaining. - * - * @return templatesLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getTemplatesLeft() { - return templatesLeft; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { - this.templatesLeft = templatesLeft; - } - - public AccountResponseQuotas smsVerificationsLeft(Integer smsVerificationsLeft) { - this.smsVerificationsLeft = smsVerificationsLeft; - return this; - } - - /** - * SMS verifications remaining. - * - * @return smsVerificationsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSmsVerificationsLeft() { - return smsVerificationsLeft; - } - - @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { - this.smsVerificationsLeft = smsVerificationsLeft; - } - - public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { - this.numFaxPagesLeft = numFaxPagesLeft; - return this; - } - - /** - * Number of fax pages left - * - * @return numFaxPagesLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumFaxPagesLeft() { - return numFaxPagesLeft; - } - - @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { - this.numFaxPagesLeft = numFaxPagesLeft; - } - - /** Return true if this AccountResponseQuotas object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountResponseQuotas accountResponseQuotas = (AccountResponseQuotas) o; - return Objects.equals( - this.apiSignatureRequestsLeft, - accountResponseQuotas.apiSignatureRequestsLeft) - && Objects.equals(this.documentsLeft, accountResponseQuotas.documentsLeft) - && Objects.equals(this.templatesTotal, accountResponseQuotas.templatesTotal) - && Objects.equals(this.templatesLeft, accountResponseQuotas.templatesLeft) - && Objects.equals( - this.smsVerificationsLeft, accountResponseQuotas.smsVerificationsLeft) - && Objects.equals(this.numFaxPagesLeft, accountResponseQuotas.numFaxPagesLeft); - } - - @Override - public int hashCode() { - return Objects.hash( - apiSignatureRequestsLeft, - documentsLeft, - templatesTotal, - templatesLeft, - smsVerificationsLeft, - numFaxPagesLeft); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountResponseQuotas {\n"); - sb.append(" apiSignatureRequestsLeft: ") - .append(toIndentedString(apiSignatureRequestsLeft)) - .append("\n"); - sb.append(" documentsLeft: ").append(toIndentedString(documentsLeft)).append("\n"); - sb.append(" templatesTotal: ").append(toIndentedString(templatesTotal)).append("\n"); - sb.append(" templatesLeft: ").append(toIndentedString(templatesLeft)).append("\n"); - sb.append(" smsVerificationsLeft: ") - .append(toIndentedString(smsVerificationsLeft)) - .append("\n"); - sb.append(" numFaxPagesLeft: ").append(toIndentedString(numFaxPagesLeft)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (apiSignatureRequestsLeft != null) { - if (isFileTypeOrListOfFiles(apiSignatureRequestsLeft)) { - fileTypeFound = true; - } - - if (apiSignatureRequestsLeft.getClass().equals(java.io.File.class) - || apiSignatureRequestsLeft.getClass().equals(Integer.class) - || apiSignatureRequestsLeft.getClass().equals(String.class) - || apiSignatureRequestsLeft.getClass().isEnum()) { - map.put("api_signature_requests_left", apiSignatureRequestsLeft); - } else if (isListOfFile(apiSignatureRequestsLeft)) { - for (int i = 0; i < getListSize(apiSignatureRequestsLeft); i++) { - map.put( - "api_signature_requests_left[" + i + "]", - getFromList(apiSignatureRequestsLeft, i)); - } - } else { - map.put( - "api_signature_requests_left", - JSON.getDefault() - .getMapper() - .writeValueAsString(apiSignatureRequestsLeft)); - } - } - if (documentsLeft != null) { - if (isFileTypeOrListOfFiles(documentsLeft)) { - fileTypeFound = true; - } - - if (documentsLeft.getClass().equals(java.io.File.class) - || documentsLeft.getClass().equals(Integer.class) - || documentsLeft.getClass().equals(String.class) - || documentsLeft.getClass().isEnum()) { - map.put("documents_left", documentsLeft); - } else if (isListOfFile(documentsLeft)) { - for (int i = 0; i < getListSize(documentsLeft); i++) { - map.put("documents_left[" + i + "]", getFromList(documentsLeft, i)); - } - } else { - map.put( - "documents_left", - JSON.getDefault().getMapper().writeValueAsString(documentsLeft)); - } - } - if (templatesTotal != null) { - if (isFileTypeOrListOfFiles(templatesTotal)) { - fileTypeFound = true; - } - - if (templatesTotal.getClass().equals(java.io.File.class) - || templatesTotal.getClass().equals(Integer.class) - || templatesTotal.getClass().equals(String.class) - || templatesTotal.getClass().isEnum()) { - map.put("templates_total", templatesTotal); - } else if (isListOfFile(templatesTotal)) { - for (int i = 0; i < getListSize(templatesTotal); i++) { - map.put("templates_total[" + i + "]", getFromList(templatesTotal, i)); - } - } else { - map.put( - "templates_total", - JSON.getDefault().getMapper().writeValueAsString(templatesTotal)); - } - } - if (templatesLeft != null) { - if (isFileTypeOrListOfFiles(templatesLeft)) { - fileTypeFound = true; - } - - if (templatesLeft.getClass().equals(java.io.File.class) - || templatesLeft.getClass().equals(Integer.class) - || templatesLeft.getClass().equals(String.class) - || templatesLeft.getClass().isEnum()) { - map.put("templates_left", templatesLeft); - } else if (isListOfFile(templatesLeft)) { - for (int i = 0; i < getListSize(templatesLeft); i++) { - map.put("templates_left[" + i + "]", getFromList(templatesLeft, i)); - } - } else { - map.put( - "templates_left", - JSON.getDefault().getMapper().writeValueAsString(templatesLeft)); - } - } - if (smsVerificationsLeft != null) { - if (isFileTypeOrListOfFiles(smsVerificationsLeft)) { - fileTypeFound = true; - } - - if (smsVerificationsLeft.getClass().equals(java.io.File.class) - || smsVerificationsLeft.getClass().equals(Integer.class) - || smsVerificationsLeft.getClass().equals(String.class) - || smsVerificationsLeft.getClass().isEnum()) { - map.put("sms_verifications_left", smsVerificationsLeft); - } else if (isListOfFile(smsVerificationsLeft)) { - for (int i = 0; i < getListSize(smsVerificationsLeft); i++) { - map.put( - "sms_verifications_left[" + i + "]", - getFromList(smsVerificationsLeft, i)); - } - } else { - map.put( - "sms_verifications_left", - JSON.getDefault().getMapper().writeValueAsString(smsVerificationsLeft)); - } - } - if (numFaxPagesLeft != null) { - if (isFileTypeOrListOfFiles(numFaxPagesLeft)) { - fileTypeFound = true; - } - - if (numFaxPagesLeft.getClass().equals(java.io.File.class) - || numFaxPagesLeft.getClass().equals(Integer.class) - || numFaxPagesLeft.getClass().equals(String.class) - || numFaxPagesLeft.getClass().isEnum()) { - map.put("num_fax_pages_left", numFaxPagesLeft); - } else if (isListOfFile(numFaxPagesLeft)) { - for (int i = 0; i < getListSize(numFaxPagesLeft); i++) { - map.put("num_fax_pages_left[" + i + "]", getFromList(numFaxPagesLeft, i)); - } - } else { - map.put( - "num_fax_pages_left", - JSON.getDefault().getMapper().writeValueAsString(numFaxPagesLeft)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java deleted file mode 100644 index daac05931..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Details concerning monthly usage */ -@JsonPropertyOrder({AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountResponseUsage { - public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; - private Integer faxPagesSent; - - public AccountResponseUsage() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountResponseUsage init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountResponseUsage.class); - } - - public static AccountResponseUsage init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountResponseUsage.class); - } - - public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { - this.faxPagesSent = faxPagesSent; - return this; - } - - /** - * Number of fax pages sent - * - * @return faxPagesSent - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFaxPagesSent() { - return faxPagesSent; - } - - @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFaxPagesSent(Integer faxPagesSent) { - this.faxPagesSent = faxPagesSent; - } - - /** Return true if this AccountResponseUsage object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountResponseUsage accountResponseUsage = (AccountResponseUsage) o; - return Objects.equals(this.faxPagesSent, accountResponseUsage.faxPagesSent); - } - - @Override - public int hashCode() { - return Objects.hash(faxPagesSent); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountResponseUsage {\n"); - sb.append(" faxPagesSent: ").append(toIndentedString(faxPagesSent)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (faxPagesSent != null) { - if (isFileTypeOrListOfFiles(faxPagesSent)) { - fileTypeFound = true; - } - - if (faxPagesSent.getClass().equals(java.io.File.class) - || faxPagesSent.getClass().equals(Integer.class) - || faxPagesSent.getClass().equals(String.class) - || faxPagesSent.getClass().isEnum()) { - map.put("fax_pages_sent", faxPagesSent); - } else if (isListOfFile(faxPagesSent)) { - for (int i = 0; i < getListSize(faxPagesSent); i++) { - map.put("fax_pages_sent[" + i + "]", getFromList(faxPagesSent, i)); - } - } else { - map.put( - "fax_pages_sent", - JSON.getDefault().getMapper().writeValueAsString(faxPagesSent)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java deleted file mode 100644 index 24bc0a80d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** AccountUpdateRequest */ -@JsonPropertyOrder({ - AccountUpdateRequest.JSON_PROPERTY_ACCOUNT_ID, - AccountUpdateRequest.JSON_PROPERTY_CALLBACK_URL, - AccountUpdateRequest.JSON_PROPERTY_LOCALE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountUpdateRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; - - public AccountUpdateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountUpdateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountUpdateRequest.class); - } - - public static AccountUpdateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountUpdateRequest.class); - } - - public AccountUpdateRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The ID of the Account - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public AccountUpdateRequest callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The URL that Dropbox Sign should POST events to. - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public AccountUpdateRequest locale(String locale) { - this.locale = locale; - return this; - } - - /** - * The locale used in this Account. Check out the list of [supported - * locales](/api/reference/constants/#supported-locales) to learn more about the possible - * values. - * - * @return locale - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLocale() { - return locale; - } - - @JsonProperty(JSON_PROPERTY_LOCALE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { - this.locale = locale; - } - - /** Return true if this AccountUpdateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountUpdateRequest accountUpdateRequest = (AccountUpdateRequest) o; - return Objects.equals(this.accountId, accountUpdateRequest.accountId) - && Objects.equals(this.callbackUrl, accountUpdateRequest.callbackUrl) - && Objects.equals(this.locale, accountUpdateRequest.locale); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, callbackUrl, locale); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountUpdateRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (locale != null) { - if (isFileTypeOrListOfFiles(locale)) { - fileTypeFound = true; - } - - if (locale.getClass().equals(java.io.File.class) - || locale.getClass().equals(Integer.class) - || locale.getClass().equals(String.class) - || locale.getClass().isEnum()) { - map.put("locale", locale); - } else if (isListOfFile(locale)) { - for (int i = 0; i < getListSize(locale); i++) { - map.put("locale[" + i + "]", getFromList(locale, i)); - } - } else { - map.put("locale", JSON.getDefault().getMapper().writeValueAsString(locale)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java deleted file mode 100644 index ffe2f15e4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** AccountVerifyRequest */ -@JsonPropertyOrder({AccountVerifyRequest.JSON_PROPERTY_EMAIL_ADDRESS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountVerifyRequest { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public AccountVerifyRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountVerifyRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountVerifyRequest.class); - } - - public static AccountVerifyRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), AccountVerifyRequest.class); - } - - public AccountVerifyRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Email address to run the verification for. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this AccountVerifyRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountVerifyRequest accountVerifyRequest = (AccountVerifyRequest) o; - return Objects.equals(this.emailAddress, accountVerifyRequest.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountVerifyRequest {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java deleted file mode 100644 index bce3d5a4a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** AccountVerifyResponse */ -@JsonPropertyOrder({ - AccountVerifyResponse.JSON_PROPERTY_ACCOUNT, - AccountVerifyResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountVerifyResponse { - public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountVerifyResponseAccount account; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public AccountVerifyResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountVerifyResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountVerifyResponse.class); - } - - public static AccountVerifyResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), AccountVerifyResponse.class); - } - - public AccountVerifyResponse account(AccountVerifyResponseAccount account) { - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccountVerifyResponseAccount getAccount() { - return account; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountVerifyResponseAccount account) { - this.account = account; - } - - public AccountVerifyResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public AccountVerifyResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this AccountVerifyResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountVerifyResponse accountVerifyResponse = (AccountVerifyResponse) o; - return Objects.equals(this.account, accountVerifyResponse.account) - && Objects.equals(this.warnings, accountVerifyResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(account, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountVerifyResponse {\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (account != null) { - if (isFileTypeOrListOfFiles(account)) { - fileTypeFound = true; - } - - if (account.getClass().equals(java.io.File.class) - || account.getClass().equals(Integer.class) - || account.getClass().equals(String.class) - || account.getClass().isEnum()) { - map.put("account", account); - } else if (isListOfFile(account)) { - for (int i = 0; i < getListSize(account); i++) { - map.put("account[" + i + "]", getFromList(account, i)); - } - } else { - map.put("account", JSON.getDefault().getMapper().writeValueAsString(account)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java deleted file mode 100644 index 3a2a2f72f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** AccountVerifyResponseAccount */ -@JsonPropertyOrder({AccountVerifyResponseAccount.JSON_PROPERTY_EMAIL_ADDRESS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class AccountVerifyResponseAccount { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public AccountVerifyResponseAccount() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static AccountVerifyResponseAccount init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, AccountVerifyResponseAccount.class); - } - - public static AccountVerifyResponseAccount init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - AccountVerifyResponseAccount.class); - } - - public AccountVerifyResponseAccount emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address associated with the Account. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this AccountVerifyResponseAccount object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AccountVerifyResponseAccount accountVerifyResponseAccount = - (AccountVerifyResponseAccount) o; - return Objects.equals(this.emailAddress, accountVerifyResponseAccount.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AccountVerifyResponseAccount {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java deleted file mode 100644 index ff8e8a71d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ApiAppCreateRequest */ -@JsonPropertyOrder({ - ApiAppCreateRequest.JSON_PROPERTY_DOMAINS, - ApiAppCreateRequest.JSON_PROPERTY_NAME, - ApiAppCreateRequest.JSON_PROPERTY_CALLBACK_URL, - ApiAppCreateRequest.JSON_PROPERTY_CUSTOM_LOGO_FILE, - ApiAppCreateRequest.JSON_PROPERTY_OAUTH, - ApiAppCreateRequest.JSON_PROPERTY_OPTIONS, - ApiAppCreateRequest.JSON_PROPERTY_WHITE_LABELING_OPTIONS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppCreateRequest { - public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = new ArrayList<>(); - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; - - public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; - - public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; - - public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; - - public ApiAppCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppCreateRequest.class); - } - - public static ApiAppCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppCreateRequest.class); - } - - public ApiAppCreateRequest domains(List domains) { - this.domains = domains; - return this; - } - - public ApiAppCreateRequest addDomainsItem(String domainsItem) { - if (this.domains == null) { - this.domains = new ArrayList<>(); - } - this.domains.add(domainsItem); - return this; - } - - /** - * The domain names the ApiApp will be associated with. - * - * @return domains - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getDomains() { - return domains; - } - - @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomains(List domains) { - this.domains = domains; - } - - public ApiAppCreateRequest name(String name) { - this.name = name; - return this; - } - - /** - * The name you want to assign to the ApiApp. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public ApiAppCreateRequest callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The URL at which the ApiApp should receive event callbacks. - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public ApiAppCreateRequest customLogoFile(File customLogoFile) { - this.customLogoFile = customLogoFile; - return this; - } - - /** - * An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) - * - * @return customLogoFile - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getCustomLogoFile() { - return customLogoFile; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { - this.customLogoFile = customLogoFile; - } - - public ApiAppCreateRequest oauth(SubOAuth oauth) { - this.oauth = oauth; - return this; - } - - /** - * Get oauth - * - * @return oauth - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubOAuth getOauth() { - return oauth; - } - - @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { - this.oauth = oauth; - } - - public ApiAppCreateRequest options(SubOptions options) { - this.options = options; - return this; - } - - /** - * Get options - * - * @return options - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubOptions getOptions() { - return options; - } - - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { - this.options = options; - } - - public ApiAppCreateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - return this; - } - - /** - * Get whiteLabelingOptions - * - * @return whiteLabelingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubWhiteLabelingOptions getWhiteLabelingOptions() { - return whiteLabelingOptions; - } - - @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - } - - /** Return true if this ApiAppCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppCreateRequest apiAppCreateRequest = (ApiAppCreateRequest) o; - return Objects.equals(this.domains, apiAppCreateRequest.domains) - && Objects.equals(this.name, apiAppCreateRequest.name) - && Objects.equals(this.callbackUrl, apiAppCreateRequest.callbackUrl) - && Objects.equals(this.customLogoFile, apiAppCreateRequest.customLogoFile) - && Objects.equals(this.oauth, apiAppCreateRequest.oauth) - && Objects.equals(this.options, apiAppCreateRequest.options) - && Objects.equals( - this.whiteLabelingOptions, apiAppCreateRequest.whiteLabelingOptions); - } - - @Override - public int hashCode() { - return Objects.hash( - domains, name, callbackUrl, customLogoFile, oauth, options, whiteLabelingOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppCreateRequest {\n"); - sb.append(" domains: ").append(toIndentedString(domains)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" customLogoFile: ").append(toIndentedString(customLogoFile)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" whiteLabelingOptions: ") - .append(toIndentedString(whiteLabelingOptions)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (domains != null) { - if (isFileTypeOrListOfFiles(domains)) { - fileTypeFound = true; - } - - if (domains.getClass().equals(java.io.File.class) - || domains.getClass().equals(Integer.class) - || domains.getClass().equals(String.class) - || domains.getClass().isEnum()) { - map.put("domains", domains); - } else if (isListOfFile(domains)) { - for (int i = 0; i < getListSize(domains); i++) { - map.put("domains[" + i + "]", getFromList(domains, i)); - } - } else { - map.put("domains", JSON.getDefault().getMapper().writeValueAsString(domains)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (customLogoFile != null) { - if (isFileTypeOrListOfFiles(customLogoFile)) { - fileTypeFound = true; - } - - if (customLogoFile.getClass().equals(java.io.File.class) - || customLogoFile.getClass().equals(Integer.class) - || customLogoFile.getClass().equals(String.class) - || customLogoFile.getClass().isEnum()) { - map.put("custom_logo_file", customLogoFile); - } else if (isListOfFile(customLogoFile)) { - for (int i = 0; i < getListSize(customLogoFile); i++) { - map.put("custom_logo_file[" + i + "]", getFromList(customLogoFile, i)); - } - } else { - map.put( - "custom_logo_file", - JSON.getDefault().getMapper().writeValueAsString(customLogoFile)); - } - } - if (oauth != null) { - if (isFileTypeOrListOfFiles(oauth)) { - fileTypeFound = true; - } - - if (oauth.getClass().equals(java.io.File.class) - || oauth.getClass().equals(Integer.class) - || oauth.getClass().equals(String.class) - || oauth.getClass().isEnum()) { - map.put("oauth", oauth); - } else if (isListOfFile(oauth)) { - for (int i = 0; i < getListSize(oauth); i++) { - map.put("oauth[" + i + "]", getFromList(oauth, i)); - } - } else { - map.put("oauth", JSON.getDefault().getMapper().writeValueAsString(oauth)); - } - } - if (options != null) { - if (isFileTypeOrListOfFiles(options)) { - fileTypeFound = true; - } - - if (options.getClass().equals(java.io.File.class) - || options.getClass().equals(Integer.class) - || options.getClass().equals(String.class) - || options.getClass().isEnum()) { - map.put("options", options); - } else if (isListOfFile(options)) { - for (int i = 0; i < getListSize(options); i++) { - map.put("options[" + i + "]", getFromList(options, i)); - } - } else { - map.put("options", JSON.getDefault().getMapper().writeValueAsString(options)); - } - } - if (whiteLabelingOptions != null) { - if (isFileTypeOrListOfFiles(whiteLabelingOptions)) { - fileTypeFound = true; - } - - if (whiteLabelingOptions.getClass().equals(java.io.File.class) - || whiteLabelingOptions.getClass().equals(Integer.class) - || whiteLabelingOptions.getClass().equals(String.class) - || whiteLabelingOptions.getClass().isEnum()) { - map.put("white_labeling_options", whiteLabelingOptions); - } else if (isListOfFile(whiteLabelingOptions)) { - for (int i = 0; i < getListSize(whiteLabelingOptions); i++) { - map.put( - "white_labeling_options[" + i + "]", - getFromList(whiteLabelingOptions, i)); - } - } else { - map.put( - "white_labeling_options", - JSON.getDefault().getMapper().writeValueAsString(whiteLabelingOptions)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java deleted file mode 100644 index 57bf2b41c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ApiAppGetResponse */ -@JsonPropertyOrder({ - ApiAppGetResponse.JSON_PROPERTY_API_APP, - ApiAppGetResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppGetResponse { - public static final String JSON_PROPERTY_API_APP = "api_app"; - private ApiAppResponse apiApp; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public ApiAppGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppGetResponse.class); - } - - public static ApiAppGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppGetResponse.class); - } - - public ApiAppGetResponse apiApp(ApiAppResponse apiApp) { - this.apiApp = apiApp; - return this; - } - - /** - * Get apiApp - * - * @return apiApp - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_API_APP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ApiAppResponse getApiApp() { - return apiApp; - } - - @JsonProperty(JSON_PROPERTY_API_APP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApp(ApiAppResponse apiApp) { - this.apiApp = apiApp; - } - - public ApiAppGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public ApiAppGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this ApiAppGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppGetResponse apiAppGetResponse = (ApiAppGetResponse) o; - return Objects.equals(this.apiApp, apiAppGetResponse.apiApp) - && Objects.equals(this.warnings, apiAppGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(apiApp, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppGetResponse {\n"); - sb.append(" apiApp: ").append(toIndentedString(apiApp)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (apiApp != null) { - if (isFileTypeOrListOfFiles(apiApp)) { - fileTypeFound = true; - } - - if (apiApp.getClass().equals(java.io.File.class) - || apiApp.getClass().equals(Integer.class) - || apiApp.getClass().equals(String.class) - || apiApp.getClass().isEnum()) { - map.put("api_app", apiApp); - } else if (isListOfFile(apiApp)) { - for (int i = 0; i < getListSize(apiApp); i++) { - map.put("api_app[" + i + "]", getFromList(apiApp, i)); - } - } else { - map.put("api_app", JSON.getDefault().getMapper().writeValueAsString(apiApp)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java deleted file mode 100644 index 4963459cd..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ApiAppListResponse */ -@JsonPropertyOrder({ - ApiAppListResponse.JSON_PROPERTY_API_APPS, - ApiAppListResponse.JSON_PROPERTY_LIST_INFO, - ApiAppListResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppListResponse { - public static final String JSON_PROPERTY_API_APPS = "api_apps"; - private List apiApps = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public ApiAppListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppListResponse.class); - } - - public static ApiAppListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppListResponse.class); - } - - public ApiAppListResponse apiApps(List apiApps) { - this.apiApps = apiApps; - return this; - } - - public ApiAppListResponse addApiAppsItem(ApiAppResponse apiAppsItem) { - if (this.apiApps == null) { - this.apiApps = new ArrayList<>(); - } - this.apiApps.add(apiAppsItem); - return this; - } - - /** - * Contains information about API Apps. - * - * @return apiApps - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_API_APPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getApiApps() { - return apiApps; - } - - @JsonProperty(JSON_PROPERTY_API_APPS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApps(List apiApps) { - this.apiApps = apiApps; - } - - public ApiAppListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public ApiAppListResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public ApiAppListResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this ApiAppListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppListResponse apiAppListResponse = (ApiAppListResponse) o; - return Objects.equals(this.apiApps, apiAppListResponse.apiApps) - && Objects.equals(this.listInfo, apiAppListResponse.listInfo) - && Objects.equals(this.warnings, apiAppListResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(apiApps, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppListResponse {\n"); - sb.append(" apiApps: ").append(toIndentedString(apiApps)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (apiApps != null) { - if (isFileTypeOrListOfFiles(apiApps)) { - fileTypeFound = true; - } - - if (apiApps.getClass().equals(java.io.File.class) - || apiApps.getClass().equals(Integer.class) - || apiApps.getClass().equals(String.class) - || apiApps.getClass().isEnum()) { - map.put("api_apps", apiApps); - } else if (isListOfFile(apiApps)) { - for (int i = 0; i < getListSize(apiApps); i++) { - map.put("api_apps[" + i + "]", getFromList(apiApps, i)); - } - } else { - map.put("api_apps", JSON.getDefault().getMapper().writeValueAsString(apiApps)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java deleted file mode 100644 index 9e5b0073d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java +++ /dev/null @@ -1,618 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains information about an API App. */ -@JsonPropertyOrder({ - ApiAppResponse.JSON_PROPERTY_CALLBACK_URL, - ApiAppResponse.JSON_PROPERTY_CLIENT_ID, - ApiAppResponse.JSON_PROPERTY_CREATED_AT, - ApiAppResponse.JSON_PROPERTY_DOMAINS, - ApiAppResponse.JSON_PROPERTY_NAME, - ApiAppResponse.JSON_PROPERTY_IS_APPROVED, - ApiAppResponse.JSON_PROPERTY_OAUTH, - ApiAppResponse.JSON_PROPERTY_OPTIONS, - ApiAppResponse.JSON_PROPERTY_OWNER_ACCOUNT, - ApiAppResponse.JSON_PROPERTY_WHITE_LABELING_OPTIONS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppResponse { - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_IS_APPROVED = "is_approved"; - private Boolean isApproved; - - public static final String JSON_PROPERTY_OAUTH = "oauth"; - private ApiAppResponseOAuth oauth; - - public static final String JSON_PROPERTY_OPTIONS = "options"; - private ApiAppResponseOptions options; - - public static final String JSON_PROPERTY_OWNER_ACCOUNT = "owner_account"; - private ApiAppResponseOwnerAccount ownerAccount; - - public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; - - public ApiAppResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppResponse.class); - } - - public static ApiAppResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponse.class); - } - - public ApiAppResponse callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The app's callback URL (for events) - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public ApiAppResponse clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The app's client id - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public ApiAppResponse createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The time that the app was created - * - * @return createdAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public ApiAppResponse domains(List domains) { - this.domains = domains; - return this; - } - - public ApiAppResponse addDomainsItem(String domainsItem) { - if (this.domains == null) { - this.domains = new ArrayList<>(); - } - this.domains.add(domainsItem); - return this; - } - - /** - * The domain name(s) associated with the app - * - * @return domains - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDomains() { - return domains; - } - - @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { - this.domains = domains; - } - - public ApiAppResponse name(String name) { - this.name = name; - return this; - } - - /** - * The name of the app - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public ApiAppResponse isApproved(Boolean isApproved) { - this.isApproved = isApproved; - return this; - } - - /** - * Boolean to indicate if the app has been approved - * - * @return isApproved - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_APPROVED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsApproved() { - return isApproved; - } - - @JsonProperty(JSON_PROPERTY_IS_APPROVED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsApproved(Boolean isApproved) { - this.isApproved = isApproved; - } - - public ApiAppResponse oauth(ApiAppResponseOAuth oauth) { - this.oauth = oauth; - return this; - } - - /** - * Get oauth - * - * @return oauth - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiAppResponseOAuth getOauth() { - return oauth; - } - - @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(ApiAppResponseOAuth oauth) { - this.oauth = oauth; - } - - public ApiAppResponse options(ApiAppResponseOptions options) { - this.options = options; - return this; - } - - /** - * Get options - * - * @return options - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiAppResponseOptions getOptions() { - return options; - } - - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(ApiAppResponseOptions options) { - this.options = options; - } - - public ApiAppResponse ownerAccount(ApiAppResponseOwnerAccount ownerAccount) { - this.ownerAccount = ownerAccount; - return this; - } - - /** - * Get ownerAccount - * - * @return ownerAccount - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OWNER_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiAppResponseOwnerAccount getOwnerAccount() { - return ownerAccount; - } - - @JsonProperty(JSON_PROPERTY_OWNER_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerAccount(ApiAppResponseOwnerAccount ownerAccount) { - this.ownerAccount = ownerAccount; - } - - public ApiAppResponse whiteLabelingOptions( - ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - return this; - } - - /** - * Get whiteLabelingOptions - * - * @return whiteLabelingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ApiAppResponseWhiteLabelingOptions getWhiteLabelingOptions() { - return whiteLabelingOptions; - } - - @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - } - - /** Return true if this ApiAppResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppResponse apiAppResponse = (ApiAppResponse) o; - return Objects.equals(this.callbackUrl, apiAppResponse.callbackUrl) - && Objects.equals(this.clientId, apiAppResponse.clientId) - && Objects.equals(this.createdAt, apiAppResponse.createdAt) - && Objects.equals(this.domains, apiAppResponse.domains) - && Objects.equals(this.name, apiAppResponse.name) - && Objects.equals(this.isApproved, apiAppResponse.isApproved) - && Objects.equals(this.oauth, apiAppResponse.oauth) - && Objects.equals(this.options, apiAppResponse.options) - && Objects.equals(this.ownerAccount, apiAppResponse.ownerAccount) - && Objects.equals(this.whiteLabelingOptions, apiAppResponse.whiteLabelingOptions); - } - - @Override - public int hashCode() { - return Objects.hash( - callbackUrl, - clientId, - createdAt, - domains, - name, - isApproved, - oauth, - options, - ownerAccount, - whiteLabelingOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppResponse {\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" domains: ").append(toIndentedString(domains)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" isApproved: ").append(toIndentedString(isApproved)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" ownerAccount: ").append(toIndentedString(ownerAccount)).append("\n"); - sb.append(" whiteLabelingOptions: ") - .append(toIndentedString(whiteLabelingOptions)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - if (domains != null) { - if (isFileTypeOrListOfFiles(domains)) { - fileTypeFound = true; - } - - if (domains.getClass().equals(java.io.File.class) - || domains.getClass().equals(Integer.class) - || domains.getClass().equals(String.class) - || domains.getClass().isEnum()) { - map.put("domains", domains); - } else if (isListOfFile(domains)) { - for (int i = 0; i < getListSize(domains); i++) { - map.put("domains[" + i + "]", getFromList(domains, i)); - } - } else { - map.put("domains", JSON.getDefault().getMapper().writeValueAsString(domains)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (isApproved != null) { - if (isFileTypeOrListOfFiles(isApproved)) { - fileTypeFound = true; - } - - if (isApproved.getClass().equals(java.io.File.class) - || isApproved.getClass().equals(Integer.class) - || isApproved.getClass().equals(String.class) - || isApproved.getClass().isEnum()) { - map.put("is_approved", isApproved); - } else if (isListOfFile(isApproved)) { - for (int i = 0; i < getListSize(isApproved); i++) { - map.put("is_approved[" + i + "]", getFromList(isApproved, i)); - } - } else { - map.put( - "is_approved", - JSON.getDefault().getMapper().writeValueAsString(isApproved)); - } - } - if (oauth != null) { - if (isFileTypeOrListOfFiles(oauth)) { - fileTypeFound = true; - } - - if (oauth.getClass().equals(java.io.File.class) - || oauth.getClass().equals(Integer.class) - || oauth.getClass().equals(String.class) - || oauth.getClass().isEnum()) { - map.put("oauth", oauth); - } else if (isListOfFile(oauth)) { - for (int i = 0; i < getListSize(oauth); i++) { - map.put("oauth[" + i + "]", getFromList(oauth, i)); - } - } else { - map.put("oauth", JSON.getDefault().getMapper().writeValueAsString(oauth)); - } - } - if (options != null) { - if (isFileTypeOrListOfFiles(options)) { - fileTypeFound = true; - } - - if (options.getClass().equals(java.io.File.class) - || options.getClass().equals(Integer.class) - || options.getClass().equals(String.class) - || options.getClass().isEnum()) { - map.put("options", options); - } else if (isListOfFile(options)) { - for (int i = 0; i < getListSize(options); i++) { - map.put("options[" + i + "]", getFromList(options, i)); - } - } else { - map.put("options", JSON.getDefault().getMapper().writeValueAsString(options)); - } - } - if (ownerAccount != null) { - if (isFileTypeOrListOfFiles(ownerAccount)) { - fileTypeFound = true; - } - - if (ownerAccount.getClass().equals(java.io.File.class) - || ownerAccount.getClass().equals(Integer.class) - || ownerAccount.getClass().equals(String.class) - || ownerAccount.getClass().isEnum()) { - map.put("owner_account", ownerAccount); - } else if (isListOfFile(ownerAccount)) { - for (int i = 0; i < getListSize(ownerAccount); i++) { - map.put("owner_account[" + i + "]", getFromList(ownerAccount, i)); - } - } else { - map.put( - "owner_account", - JSON.getDefault().getMapper().writeValueAsString(ownerAccount)); - } - } - if (whiteLabelingOptions != null) { - if (isFileTypeOrListOfFiles(whiteLabelingOptions)) { - fileTypeFound = true; - } - - if (whiteLabelingOptions.getClass().equals(java.io.File.class) - || whiteLabelingOptions.getClass().equals(Integer.class) - || whiteLabelingOptions.getClass().equals(String.class) - || whiteLabelingOptions.getClass().isEnum()) { - map.put("white_labeling_options", whiteLabelingOptions); - } else if (isListOfFile(whiteLabelingOptions)) { - for (int i = 0; i < getListSize(whiteLabelingOptions); i++) { - map.put( - "white_labeling_options[" + i + "]", - getFromList(whiteLabelingOptions, i)); - } - } else { - map.put( - "white_labeling_options", - JSON.getDefault().getMapper().writeValueAsString(whiteLabelingOptions)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java deleted file mode 100644 index 74ba41e86..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** - * An object describing the app's OAuth properties, or null if OAuth is not configured for the - * app. - */ -@JsonPropertyOrder({ - ApiAppResponseOAuth.JSON_PROPERTY_CALLBACK_URL, - ApiAppResponseOAuth.JSON_PROPERTY_SECRET, - ApiAppResponseOAuth.JSON_PROPERTY_SCOPES, - ApiAppResponseOAuth.JSON_PROPERTY_CHARGES_USERS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppResponseOAuth { - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_SECRET = "secret"; - private String secret; - - public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; - - public static final String JSON_PROPERTY_CHARGES_USERS = "charges_users"; - private Boolean chargesUsers; - - public ApiAppResponseOAuth() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppResponseOAuth init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppResponseOAuth.class); - } - - public static ApiAppResponseOAuth init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponseOAuth.class); - } - - public ApiAppResponseOAuth callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The app's OAuth callback URL. - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public ApiAppResponseOAuth secret(String secret) { - this.secret = secret; - return this; - } - - /** - * The app's OAuth secret, or null if the app does not belong to user. - * - * @return secret - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecret() { - return secret; - } - - @JsonProperty(JSON_PROPERTY_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecret(String secret) { - this.secret = secret; - } - - public ApiAppResponseOAuth scopes(List scopes) { - this.scopes = scopes; - return this; - } - - public ApiAppResponseOAuth addScopesItem(String scopesItem) { - if (this.scopes == null) { - this.scopes = new ArrayList<>(); - } - this.scopes.add(scopesItem); - return this; - } - - /** - * Array of OAuth scopes used by the app. - * - * @return scopes - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScopes() { - return scopes; - } - - @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { - this.scopes = scopes; - } - - public ApiAppResponseOAuth chargesUsers(Boolean chargesUsers) { - this.chargesUsers = chargesUsers; - return this; - } - - /** - * Boolean indicating whether the app owner or the account granting permission is billed for - * OAuth requests. - * - * @return chargesUsers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CHARGES_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getChargesUsers() { - return chargesUsers; - } - - @JsonProperty(JSON_PROPERTY_CHARGES_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChargesUsers(Boolean chargesUsers) { - this.chargesUsers = chargesUsers; - } - - /** Return true if this ApiAppResponseOAuth object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppResponseOAuth apiAppResponseOAuth = (ApiAppResponseOAuth) o; - return Objects.equals(this.callbackUrl, apiAppResponseOAuth.callbackUrl) - && Objects.equals(this.secret, apiAppResponseOAuth.secret) - && Objects.equals(this.scopes, apiAppResponseOAuth.scopes) - && Objects.equals(this.chargesUsers, apiAppResponseOAuth.chargesUsers); - } - - @Override - public int hashCode() { - return Objects.hash(callbackUrl, secret, scopes, chargesUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppResponseOAuth {\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); - sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); - sb.append(" chargesUsers: ").append(toIndentedString(chargesUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (secret != null) { - if (isFileTypeOrListOfFiles(secret)) { - fileTypeFound = true; - } - - if (secret.getClass().equals(java.io.File.class) - || secret.getClass().equals(Integer.class) - || secret.getClass().equals(String.class) - || secret.getClass().isEnum()) { - map.put("secret", secret); - } else if (isListOfFile(secret)) { - for (int i = 0; i < getListSize(secret); i++) { - map.put("secret[" + i + "]", getFromList(secret, i)); - } - } else { - map.put("secret", JSON.getDefault().getMapper().writeValueAsString(secret)); - } - } - if (scopes != null) { - if (isFileTypeOrListOfFiles(scopes)) { - fileTypeFound = true; - } - - if (scopes.getClass().equals(java.io.File.class) - || scopes.getClass().equals(Integer.class) - || scopes.getClass().equals(String.class) - || scopes.getClass().isEnum()) { - map.put("scopes", scopes); - } else if (isListOfFile(scopes)) { - for (int i = 0; i < getListSize(scopes); i++) { - map.put("scopes[" + i + "]", getFromList(scopes, i)); - } - } else { - map.put("scopes", JSON.getDefault().getMapper().writeValueAsString(scopes)); - } - } - if (chargesUsers != null) { - if (isFileTypeOrListOfFiles(chargesUsers)) { - fileTypeFound = true; - } - - if (chargesUsers.getClass().equals(java.io.File.class) - || chargesUsers.getClass().equals(Integer.class) - || chargesUsers.getClass().equals(String.class) - || chargesUsers.getClass().isEnum()) { - map.put("charges_users", chargesUsers); - } else if (isListOfFile(chargesUsers)) { - for (int i = 0; i < getListSize(chargesUsers); i++) { - map.put("charges_users[" + i + "]", getFromList(chargesUsers, i)); - } - } else { - map.put( - "charges_users", - JSON.getDefault().getMapper().writeValueAsString(chargesUsers)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java deleted file mode 100644 index e2d672dda..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An object with options that override account settings. */ -@JsonPropertyOrder({ApiAppResponseOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppResponseOptions { - public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere; - - public ApiAppResponseOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppResponseOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppResponseOptions.class); - } - - public static ApiAppResponseOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), ApiAppResponseOptions.class); - } - - public ApiAppResponseOptions canInsertEverywhere(Boolean canInsertEverywhere) { - this.canInsertEverywhere = canInsertEverywhere; - return this; - } - - /** - * Boolean denoting if signers can \"Insert Everywhere\" in one click while signing a - * document - * - * @return canInsertEverywhere - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCanInsertEverywhere() { - return canInsertEverywhere; - } - - @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { - this.canInsertEverywhere = canInsertEverywhere; - } - - /** Return true if this ApiAppResponseOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppResponseOptions apiAppResponseOptions = (ApiAppResponseOptions) o; - return Objects.equals(this.canInsertEverywhere, apiAppResponseOptions.canInsertEverywhere); - } - - @Override - public int hashCode() { - return Objects.hash(canInsertEverywhere); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppResponseOptions {\n"); - sb.append(" canInsertEverywhere: ") - .append(toIndentedString(canInsertEverywhere)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (canInsertEverywhere != null) { - if (isFileTypeOrListOfFiles(canInsertEverywhere)) { - fileTypeFound = true; - } - - if (canInsertEverywhere.getClass().equals(java.io.File.class) - || canInsertEverywhere.getClass().equals(Integer.class) - || canInsertEverywhere.getClass().equals(String.class) - || canInsertEverywhere.getClass().isEnum()) { - map.put("can_insert_everywhere", canInsertEverywhere); - } else if (isListOfFile(canInsertEverywhere)) { - for (int i = 0; i < getListSize(canInsertEverywhere); i++) { - map.put( - "can_insert_everywhere[" + i + "]", - getFromList(canInsertEverywhere, i)); - } - } else { - map.put( - "can_insert_everywhere", - JSON.getDefault().getMapper().writeValueAsString(canInsertEverywhere)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java deleted file mode 100644 index 7107a4329..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An object describing the app's owner */ -@JsonPropertyOrder({ - ApiAppResponseOwnerAccount.JSON_PROPERTY_ACCOUNT_ID, - ApiAppResponseOwnerAccount.JSON_PROPERTY_EMAIL_ADDRESS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppResponseOwnerAccount { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public ApiAppResponseOwnerAccount() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppResponseOwnerAccount init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppResponseOwnerAccount.class); - } - - public static ApiAppResponseOwnerAccount init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - ApiAppResponseOwnerAccount.class); - } - - public ApiAppResponseOwnerAccount accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The owner account's ID - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public ApiAppResponseOwnerAccount emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The owner account's email address - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this ApiAppResponseOwnerAccount object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppResponseOwnerAccount apiAppResponseOwnerAccount = (ApiAppResponseOwnerAccount) o; - return Objects.equals(this.accountId, apiAppResponseOwnerAccount.accountId) - && Objects.equals(this.emailAddress, apiAppResponseOwnerAccount.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppResponseOwnerAccount {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java deleted file mode 100644 index 6efd8fc40..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java +++ /dev/null @@ -1,897 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An object with options to customize the app's signer page */ -@JsonPropertyOrder({ - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_HEADER_BACKGROUND_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_LEGAL_VERSION, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_LINK_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_PAGE_BACKGROUND_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR1, - ApiAppResponseWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR2 -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppResponseWhiteLabelingOptions { - public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor; - - public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private String legalVersion; - - public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor; - - public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = - "primary_button_color_hover"; - private String primaryButtonColorHover; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = - "primary_button_text_color"; - private String primaryButtonTextColor; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = - "primary_button_text_color_hover"; - private String primaryButtonTextColorHover; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = - "secondary_button_color_hover"; - private String secondaryButtonColorHover; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = - "secondary_button_text_color"; - private String secondaryButtonTextColor; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = - "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover; - - public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1; - - public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2; - - public ApiAppResponseWhiteLabelingOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppResponseWhiteLabelingOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppResponseWhiteLabelingOptions.class); - } - - public static ApiAppResponseWhiteLabelingOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - ApiAppResponseWhiteLabelingOptions.class); - } - - public ApiAppResponseWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { - this.headerBackgroundColor = headerBackgroundColor; - return this; - } - - /** - * Get headerBackgroundColor - * - * @return headerBackgroundColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHeaderBackgroundColor() { - return headerBackgroundColor; - } - - @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { - this.headerBackgroundColor = headerBackgroundColor; - } - - public ApiAppResponseWhiteLabelingOptions legalVersion(String legalVersion) { - this.legalVersion = legalVersion; - return this; - } - - /** - * Get legalVersion - * - * @return legalVersion - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegalVersion() { - return legalVersion; - } - - @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(String legalVersion) { - this.legalVersion = legalVersion; - } - - public ApiAppResponseWhiteLabelingOptions linkColor(String linkColor) { - this.linkColor = linkColor; - return this; - } - - /** - * Get linkColor - * - * @return linkColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LINK_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLinkColor() { - return linkColor; - } - - @JsonProperty(JSON_PROPERTY_LINK_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { - this.linkColor = linkColor; - } - - public ApiAppResponseWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { - this.pageBackgroundColor = pageBackgroundColor; - return this; - } - - /** - * Get pageBackgroundColor - * - * @return pageBackgroundColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPageBackgroundColor() { - return pageBackgroundColor; - } - - @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { - this.pageBackgroundColor = pageBackgroundColor; - } - - public ApiAppResponseWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { - this.primaryButtonColor = primaryButtonColor; - return this; - } - - /** - * Get primaryButtonColor - * - * @return primaryButtonColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonColor() { - return primaryButtonColor; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { - this.primaryButtonColor = primaryButtonColor; - } - - public ApiAppResponseWhiteLabelingOptions primaryButtonColorHover( - String primaryButtonColorHover) { - this.primaryButtonColorHover = primaryButtonColorHover; - return this; - } - - /** - * Get primaryButtonColorHover - * - * @return primaryButtonColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonColorHover() { - return primaryButtonColorHover; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { - this.primaryButtonColorHover = primaryButtonColorHover; - } - - public ApiAppResponseWhiteLabelingOptions primaryButtonTextColor( - String primaryButtonTextColor) { - this.primaryButtonTextColor = primaryButtonTextColor; - return this; - } - - /** - * Get primaryButtonTextColor - * - * @return primaryButtonTextColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonTextColor() { - return primaryButtonTextColor; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { - this.primaryButtonTextColor = primaryButtonTextColor; - } - - public ApiAppResponseWhiteLabelingOptions primaryButtonTextColorHover( - String primaryButtonTextColorHover) { - this.primaryButtonTextColorHover = primaryButtonTextColorHover; - return this; - } - - /** - * Get primaryButtonTextColorHover - * - * @return primaryButtonTextColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonTextColorHover() { - return primaryButtonTextColorHover; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { - this.primaryButtonTextColorHover = primaryButtonTextColorHover; - } - - public ApiAppResponseWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { - this.secondaryButtonColor = secondaryButtonColor; - return this; - } - - /** - * Get secondaryButtonColor - * - * @return secondaryButtonColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonColor() { - return secondaryButtonColor; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { - this.secondaryButtonColor = secondaryButtonColor; - } - - public ApiAppResponseWhiteLabelingOptions secondaryButtonColorHover( - String secondaryButtonColorHover) { - this.secondaryButtonColorHover = secondaryButtonColorHover; - return this; - } - - /** - * Get secondaryButtonColorHover - * - * @return secondaryButtonColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonColorHover() { - return secondaryButtonColorHover; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { - this.secondaryButtonColorHover = secondaryButtonColorHover; - } - - public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColor( - String secondaryButtonTextColor) { - this.secondaryButtonTextColor = secondaryButtonTextColor; - return this; - } - - /** - * Get secondaryButtonTextColor - * - * @return secondaryButtonTextColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonTextColor() { - return secondaryButtonTextColor; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { - this.secondaryButtonTextColor = secondaryButtonTextColor; - } - - public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { - this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; - return this; - } - - /** - * Get secondaryButtonTextColorHover - * - * @return secondaryButtonTextColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonTextColorHover() { - return secondaryButtonTextColorHover; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { - this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; - } - - public ApiAppResponseWhiteLabelingOptions textColor1(String textColor1) { - this.textColor1 = textColor1; - return this; - } - - /** - * Get textColor1 - * - * @return textColor1 - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTextColor1() { - return textColor1; - } - - @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { - this.textColor1 = textColor1; - } - - public ApiAppResponseWhiteLabelingOptions textColor2(String textColor2) { - this.textColor2 = textColor2; - return this; - } - - /** - * Get textColor2 - * - * @return textColor2 - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTextColor2() { - return textColor2; - } - - @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { - this.textColor2 = textColor2; - } - - /** Return true if this ApiAppResponseWhiteLabelingOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppResponseWhiteLabelingOptions apiAppResponseWhiteLabelingOptions = - (ApiAppResponseWhiteLabelingOptions) o; - return Objects.equals( - this.headerBackgroundColor, - apiAppResponseWhiteLabelingOptions.headerBackgroundColor) - && Objects.equals( - this.legalVersion, apiAppResponseWhiteLabelingOptions.legalVersion) - && Objects.equals(this.linkColor, apiAppResponseWhiteLabelingOptions.linkColor) - && Objects.equals( - this.pageBackgroundColor, - apiAppResponseWhiteLabelingOptions.pageBackgroundColor) - && Objects.equals( - this.primaryButtonColor, - apiAppResponseWhiteLabelingOptions.primaryButtonColor) - && Objects.equals( - this.primaryButtonColorHover, - apiAppResponseWhiteLabelingOptions.primaryButtonColorHover) - && Objects.equals( - this.primaryButtonTextColor, - apiAppResponseWhiteLabelingOptions.primaryButtonTextColor) - && Objects.equals( - this.primaryButtonTextColorHover, - apiAppResponseWhiteLabelingOptions.primaryButtonTextColorHover) - && Objects.equals( - this.secondaryButtonColor, - apiAppResponseWhiteLabelingOptions.secondaryButtonColor) - && Objects.equals( - this.secondaryButtonColorHover, - apiAppResponseWhiteLabelingOptions.secondaryButtonColorHover) - && Objects.equals( - this.secondaryButtonTextColor, - apiAppResponseWhiteLabelingOptions.secondaryButtonTextColor) - && Objects.equals( - this.secondaryButtonTextColorHover, - apiAppResponseWhiteLabelingOptions.secondaryButtonTextColorHover) - && Objects.equals(this.textColor1, apiAppResponseWhiteLabelingOptions.textColor1) - && Objects.equals(this.textColor2, apiAppResponseWhiteLabelingOptions.textColor2); - } - - @Override - public int hashCode() { - return Objects.hash( - headerBackgroundColor, - legalVersion, - linkColor, - pageBackgroundColor, - primaryButtonColor, - primaryButtonColorHover, - primaryButtonTextColor, - primaryButtonTextColorHover, - secondaryButtonColor, - secondaryButtonColorHover, - secondaryButtonTextColor, - secondaryButtonTextColorHover, - textColor1, - textColor2); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppResponseWhiteLabelingOptions {\n"); - sb.append(" headerBackgroundColor: ") - .append(toIndentedString(headerBackgroundColor)) - .append("\n"); - sb.append(" legalVersion: ").append(toIndentedString(legalVersion)).append("\n"); - sb.append(" linkColor: ").append(toIndentedString(linkColor)).append("\n"); - sb.append(" pageBackgroundColor: ") - .append(toIndentedString(pageBackgroundColor)) - .append("\n"); - sb.append(" primaryButtonColor: ") - .append(toIndentedString(primaryButtonColor)) - .append("\n"); - sb.append(" primaryButtonColorHover: ") - .append(toIndentedString(primaryButtonColorHover)) - .append("\n"); - sb.append(" primaryButtonTextColor: ") - .append(toIndentedString(primaryButtonTextColor)) - .append("\n"); - sb.append(" primaryButtonTextColorHover: ") - .append(toIndentedString(primaryButtonTextColorHover)) - .append("\n"); - sb.append(" secondaryButtonColor: ") - .append(toIndentedString(secondaryButtonColor)) - .append("\n"); - sb.append(" secondaryButtonColorHover: ") - .append(toIndentedString(secondaryButtonColorHover)) - .append("\n"); - sb.append(" secondaryButtonTextColor: ") - .append(toIndentedString(secondaryButtonTextColor)) - .append("\n"); - sb.append(" secondaryButtonTextColorHover: ") - .append(toIndentedString(secondaryButtonTextColorHover)) - .append("\n"); - sb.append(" textColor1: ").append(toIndentedString(textColor1)).append("\n"); - sb.append(" textColor2: ").append(toIndentedString(textColor2)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (headerBackgroundColor != null) { - if (isFileTypeOrListOfFiles(headerBackgroundColor)) { - fileTypeFound = true; - } - - if (headerBackgroundColor.getClass().equals(java.io.File.class) - || headerBackgroundColor.getClass().equals(Integer.class) - || headerBackgroundColor.getClass().equals(String.class) - || headerBackgroundColor.getClass().isEnum()) { - map.put("header_background_color", headerBackgroundColor); - } else if (isListOfFile(headerBackgroundColor)) { - for (int i = 0; i < getListSize(headerBackgroundColor); i++) { - map.put( - "header_background_color[" + i + "]", - getFromList(headerBackgroundColor, i)); - } - } else { - map.put( - "header_background_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(headerBackgroundColor)); - } - } - if (legalVersion != null) { - if (isFileTypeOrListOfFiles(legalVersion)) { - fileTypeFound = true; - } - - if (legalVersion.getClass().equals(java.io.File.class) - || legalVersion.getClass().equals(Integer.class) - || legalVersion.getClass().equals(String.class) - || legalVersion.getClass().isEnum()) { - map.put("legal_version", legalVersion); - } else if (isListOfFile(legalVersion)) { - for (int i = 0; i < getListSize(legalVersion); i++) { - map.put("legal_version[" + i + "]", getFromList(legalVersion, i)); - } - } else { - map.put( - "legal_version", - JSON.getDefault().getMapper().writeValueAsString(legalVersion)); - } - } - if (linkColor != null) { - if (isFileTypeOrListOfFiles(linkColor)) { - fileTypeFound = true; - } - - if (linkColor.getClass().equals(java.io.File.class) - || linkColor.getClass().equals(Integer.class) - || linkColor.getClass().equals(String.class) - || linkColor.getClass().isEnum()) { - map.put("link_color", linkColor); - } else if (isListOfFile(linkColor)) { - for (int i = 0; i < getListSize(linkColor); i++) { - map.put("link_color[" + i + "]", getFromList(linkColor, i)); - } - } else { - map.put( - "link_color", - JSON.getDefault().getMapper().writeValueAsString(linkColor)); - } - } - if (pageBackgroundColor != null) { - if (isFileTypeOrListOfFiles(pageBackgroundColor)) { - fileTypeFound = true; - } - - if (pageBackgroundColor.getClass().equals(java.io.File.class) - || pageBackgroundColor.getClass().equals(Integer.class) - || pageBackgroundColor.getClass().equals(String.class) - || pageBackgroundColor.getClass().isEnum()) { - map.put("page_background_color", pageBackgroundColor); - } else if (isListOfFile(pageBackgroundColor)) { - for (int i = 0; i < getListSize(pageBackgroundColor); i++) { - map.put( - "page_background_color[" + i + "]", - getFromList(pageBackgroundColor, i)); - } - } else { - map.put( - "page_background_color", - JSON.getDefault().getMapper().writeValueAsString(pageBackgroundColor)); - } - } - if (primaryButtonColor != null) { - if (isFileTypeOrListOfFiles(primaryButtonColor)) { - fileTypeFound = true; - } - - if (primaryButtonColor.getClass().equals(java.io.File.class) - || primaryButtonColor.getClass().equals(Integer.class) - || primaryButtonColor.getClass().equals(String.class) - || primaryButtonColor.getClass().isEnum()) { - map.put("primary_button_color", primaryButtonColor); - } else if (isListOfFile(primaryButtonColor)) { - for (int i = 0; i < getListSize(primaryButtonColor); i++) { - map.put( - "primary_button_color[" + i + "]", - getFromList(primaryButtonColor, i)); - } - } else { - map.put( - "primary_button_color", - JSON.getDefault().getMapper().writeValueAsString(primaryButtonColor)); - } - } - if (primaryButtonColorHover != null) { - if (isFileTypeOrListOfFiles(primaryButtonColorHover)) { - fileTypeFound = true; - } - - if (primaryButtonColorHover.getClass().equals(java.io.File.class) - || primaryButtonColorHover.getClass().equals(Integer.class) - || primaryButtonColorHover.getClass().equals(String.class) - || primaryButtonColorHover.getClass().isEnum()) { - map.put("primary_button_color_hover", primaryButtonColorHover); - } else if (isListOfFile(primaryButtonColorHover)) { - for (int i = 0; i < getListSize(primaryButtonColorHover); i++) { - map.put( - "primary_button_color_hover[" + i + "]", - getFromList(primaryButtonColorHover, i)); - } - } else { - map.put( - "primary_button_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonColorHover)); - } - } - if (primaryButtonTextColor != null) { - if (isFileTypeOrListOfFiles(primaryButtonTextColor)) { - fileTypeFound = true; - } - - if (primaryButtonTextColor.getClass().equals(java.io.File.class) - || primaryButtonTextColor.getClass().equals(Integer.class) - || primaryButtonTextColor.getClass().equals(String.class) - || primaryButtonTextColor.getClass().isEnum()) { - map.put("primary_button_text_color", primaryButtonTextColor); - } else if (isListOfFile(primaryButtonTextColor)) { - for (int i = 0; i < getListSize(primaryButtonTextColor); i++) { - map.put( - "primary_button_text_color[" + i + "]", - getFromList(primaryButtonTextColor, i)); - } - } else { - map.put( - "primary_button_text_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonTextColor)); - } - } - if (primaryButtonTextColorHover != null) { - if (isFileTypeOrListOfFiles(primaryButtonTextColorHover)) { - fileTypeFound = true; - } - - if (primaryButtonTextColorHover.getClass().equals(java.io.File.class) - || primaryButtonTextColorHover.getClass().equals(Integer.class) - || primaryButtonTextColorHover.getClass().equals(String.class) - || primaryButtonTextColorHover.getClass().isEnum()) { - map.put("primary_button_text_color_hover", primaryButtonTextColorHover); - } else if (isListOfFile(primaryButtonTextColorHover)) { - for (int i = 0; i < getListSize(primaryButtonTextColorHover); i++) { - map.put( - "primary_button_text_color_hover[" + i + "]", - getFromList(primaryButtonTextColorHover, i)); - } - } else { - map.put( - "primary_button_text_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonTextColorHover)); - } - } - if (secondaryButtonColor != null) { - if (isFileTypeOrListOfFiles(secondaryButtonColor)) { - fileTypeFound = true; - } - - if (secondaryButtonColor.getClass().equals(java.io.File.class) - || secondaryButtonColor.getClass().equals(Integer.class) - || secondaryButtonColor.getClass().equals(String.class) - || secondaryButtonColor.getClass().isEnum()) { - map.put("secondary_button_color", secondaryButtonColor); - } else if (isListOfFile(secondaryButtonColor)) { - for (int i = 0; i < getListSize(secondaryButtonColor); i++) { - map.put( - "secondary_button_color[" + i + "]", - getFromList(secondaryButtonColor, i)); - } - } else { - map.put( - "secondary_button_color", - JSON.getDefault().getMapper().writeValueAsString(secondaryButtonColor)); - } - } - if (secondaryButtonColorHover != null) { - if (isFileTypeOrListOfFiles(secondaryButtonColorHover)) { - fileTypeFound = true; - } - - if (secondaryButtonColorHover.getClass().equals(java.io.File.class) - || secondaryButtonColorHover.getClass().equals(Integer.class) - || secondaryButtonColorHover.getClass().equals(String.class) - || secondaryButtonColorHover.getClass().isEnum()) { - map.put("secondary_button_color_hover", secondaryButtonColorHover); - } else if (isListOfFile(secondaryButtonColorHover)) { - for (int i = 0; i < getListSize(secondaryButtonColorHover); i++) { - map.put( - "secondary_button_color_hover[" + i + "]", - getFromList(secondaryButtonColorHover, i)); - } - } else { - map.put( - "secondary_button_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonColorHover)); - } - } - if (secondaryButtonTextColor != null) { - if (isFileTypeOrListOfFiles(secondaryButtonTextColor)) { - fileTypeFound = true; - } - - if (secondaryButtonTextColor.getClass().equals(java.io.File.class) - || secondaryButtonTextColor.getClass().equals(Integer.class) - || secondaryButtonTextColor.getClass().equals(String.class) - || secondaryButtonTextColor.getClass().isEnum()) { - map.put("secondary_button_text_color", secondaryButtonTextColor); - } else if (isListOfFile(secondaryButtonTextColor)) { - for (int i = 0; i < getListSize(secondaryButtonTextColor); i++) { - map.put( - "secondary_button_text_color[" + i + "]", - getFromList(secondaryButtonTextColor, i)); - } - } else { - map.put( - "secondary_button_text_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonTextColor)); - } - } - if (secondaryButtonTextColorHover != null) { - if (isFileTypeOrListOfFiles(secondaryButtonTextColorHover)) { - fileTypeFound = true; - } - - if (secondaryButtonTextColorHover.getClass().equals(java.io.File.class) - || secondaryButtonTextColorHover.getClass().equals(Integer.class) - || secondaryButtonTextColorHover.getClass().equals(String.class) - || secondaryButtonTextColorHover.getClass().isEnum()) { - map.put("secondary_button_text_color_hover", secondaryButtonTextColorHover); - } else if (isListOfFile(secondaryButtonTextColorHover)) { - for (int i = 0; i < getListSize(secondaryButtonTextColorHover); i++) { - map.put( - "secondary_button_text_color_hover[" + i + "]", - getFromList(secondaryButtonTextColorHover, i)); - } - } else { - map.put( - "secondary_button_text_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonTextColorHover)); - } - } - if (textColor1 != null) { - if (isFileTypeOrListOfFiles(textColor1)) { - fileTypeFound = true; - } - - if (textColor1.getClass().equals(java.io.File.class) - || textColor1.getClass().equals(Integer.class) - || textColor1.getClass().equals(String.class) - || textColor1.getClass().isEnum()) { - map.put("text_color1", textColor1); - } else if (isListOfFile(textColor1)) { - for (int i = 0; i < getListSize(textColor1); i++) { - map.put("text_color1[" + i + "]", getFromList(textColor1, i)); - } - } else { - map.put( - "text_color1", - JSON.getDefault().getMapper().writeValueAsString(textColor1)); - } - } - if (textColor2 != null) { - if (isFileTypeOrListOfFiles(textColor2)) { - fileTypeFound = true; - } - - if (textColor2.getClass().equals(java.io.File.class) - || textColor2.getClass().equals(Integer.class) - || textColor2.getClass().equals(String.class) - || textColor2.getClass().isEnum()) { - map.put("text_color2", textColor2); - } else if (isListOfFile(textColor2)) { - for (int i = 0; i < getListSize(textColor2); i++) { - map.put("text_color2[" + i + "]", getFromList(textColor2, i)); - } - } else { - map.put( - "text_color2", - JSON.getDefault().getMapper().writeValueAsString(textColor2)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java deleted file mode 100644 index 04b23fb36..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ApiAppUpdateRequest */ -@JsonPropertyOrder({ - ApiAppUpdateRequest.JSON_PROPERTY_CALLBACK_URL, - ApiAppUpdateRequest.JSON_PROPERTY_CUSTOM_LOGO_FILE, - ApiAppUpdateRequest.JSON_PROPERTY_DOMAINS, - ApiAppUpdateRequest.JSON_PROPERTY_NAME, - ApiAppUpdateRequest.JSON_PROPERTY_OAUTH, - ApiAppUpdateRequest.JSON_PROPERTY_OPTIONS, - ApiAppUpdateRequest.JSON_PROPERTY_WHITE_LABELING_OPTIONS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ApiAppUpdateRequest { - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; - - public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; - - public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; - - public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; - - public ApiAppUpdateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ApiAppUpdateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ApiAppUpdateRequest.class); - } - - public static ApiAppUpdateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ApiAppUpdateRequest.class); - } - - public ApiAppUpdateRequest callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The URL at which the API App should receive event callbacks. - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public ApiAppUpdateRequest customLogoFile(File customLogoFile) { - this.customLogoFile = customLogoFile; - return this; - } - - /** - * An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) - * - * @return customLogoFile - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getCustomLogoFile() { - return customLogoFile; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { - this.customLogoFile = customLogoFile; - } - - public ApiAppUpdateRequest domains(List domains) { - this.domains = domains; - return this; - } - - public ApiAppUpdateRequest addDomainsItem(String domainsItem) { - if (this.domains == null) { - this.domains = new ArrayList<>(); - } - this.domains.add(domainsItem); - return this; - } - - /** - * The domain names the ApiApp will be associated with. - * - * @return domains - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDomains() { - return domains; - } - - @JsonProperty(JSON_PROPERTY_DOMAINS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { - this.domains = domains; - } - - public ApiAppUpdateRequest name(String name) { - this.name = name; - return this; - } - - /** - * The name you want to assign to the ApiApp. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public ApiAppUpdateRequest oauth(SubOAuth oauth) { - this.oauth = oauth; - return this; - } - - /** - * Get oauth - * - * @return oauth - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubOAuth getOauth() { - return oauth; - } - - @JsonProperty(JSON_PROPERTY_OAUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { - this.oauth = oauth; - } - - public ApiAppUpdateRequest options(SubOptions options) { - this.options = options; - return this; - } - - /** - * Get options - * - * @return options - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubOptions getOptions() { - return options; - } - - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { - this.options = options; - } - - public ApiAppUpdateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - return this; - } - - /** - * Get whiteLabelingOptions - * - * @return whiteLabelingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubWhiteLabelingOptions getWhiteLabelingOptions() { - return whiteLabelingOptions; - } - - @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { - this.whiteLabelingOptions = whiteLabelingOptions; - } - - /** Return true if this ApiAppUpdateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ApiAppUpdateRequest apiAppUpdateRequest = (ApiAppUpdateRequest) o; - return Objects.equals(this.callbackUrl, apiAppUpdateRequest.callbackUrl) - && Objects.equals(this.customLogoFile, apiAppUpdateRequest.customLogoFile) - && Objects.equals(this.domains, apiAppUpdateRequest.domains) - && Objects.equals(this.name, apiAppUpdateRequest.name) - && Objects.equals(this.oauth, apiAppUpdateRequest.oauth) - && Objects.equals(this.options, apiAppUpdateRequest.options) - && Objects.equals( - this.whiteLabelingOptions, apiAppUpdateRequest.whiteLabelingOptions); - } - - @Override - public int hashCode() { - return Objects.hash( - callbackUrl, customLogoFile, domains, name, oauth, options, whiteLabelingOptions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ApiAppUpdateRequest {\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" customLogoFile: ").append(toIndentedString(customLogoFile)).append("\n"); - sb.append(" domains: ").append(toIndentedString(domains)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" oauth: ").append(toIndentedString(oauth)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" whiteLabelingOptions: ") - .append(toIndentedString(whiteLabelingOptions)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (customLogoFile != null) { - if (isFileTypeOrListOfFiles(customLogoFile)) { - fileTypeFound = true; - } - - if (customLogoFile.getClass().equals(java.io.File.class) - || customLogoFile.getClass().equals(Integer.class) - || customLogoFile.getClass().equals(String.class) - || customLogoFile.getClass().isEnum()) { - map.put("custom_logo_file", customLogoFile); - } else if (isListOfFile(customLogoFile)) { - for (int i = 0; i < getListSize(customLogoFile); i++) { - map.put("custom_logo_file[" + i + "]", getFromList(customLogoFile, i)); - } - } else { - map.put( - "custom_logo_file", - JSON.getDefault().getMapper().writeValueAsString(customLogoFile)); - } - } - if (domains != null) { - if (isFileTypeOrListOfFiles(domains)) { - fileTypeFound = true; - } - - if (domains.getClass().equals(java.io.File.class) - || domains.getClass().equals(Integer.class) - || domains.getClass().equals(String.class) - || domains.getClass().isEnum()) { - map.put("domains", domains); - } else if (isListOfFile(domains)) { - for (int i = 0; i < getListSize(domains); i++) { - map.put("domains[" + i + "]", getFromList(domains, i)); - } - } else { - map.put("domains", JSON.getDefault().getMapper().writeValueAsString(domains)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (oauth != null) { - if (isFileTypeOrListOfFiles(oauth)) { - fileTypeFound = true; - } - - if (oauth.getClass().equals(java.io.File.class) - || oauth.getClass().equals(Integer.class) - || oauth.getClass().equals(String.class) - || oauth.getClass().isEnum()) { - map.put("oauth", oauth); - } else if (isListOfFile(oauth)) { - for (int i = 0; i < getListSize(oauth); i++) { - map.put("oauth[" + i + "]", getFromList(oauth, i)); - } - } else { - map.put("oauth", JSON.getDefault().getMapper().writeValueAsString(oauth)); - } - } - if (options != null) { - if (isFileTypeOrListOfFiles(options)) { - fileTypeFound = true; - } - - if (options.getClass().equals(java.io.File.class) - || options.getClass().equals(Integer.class) - || options.getClass().equals(String.class) - || options.getClass().isEnum()) { - map.put("options", options); - } else if (isListOfFile(options)) { - for (int i = 0; i < getListSize(options); i++) { - map.put("options[" + i + "]", getFromList(options, i)); - } - } else { - map.put("options", JSON.getDefault().getMapper().writeValueAsString(options)); - } - } - if (whiteLabelingOptions != null) { - if (isFileTypeOrListOfFiles(whiteLabelingOptions)) { - fileTypeFound = true; - } - - if (whiteLabelingOptions.getClass().equals(java.io.File.class) - || whiteLabelingOptions.getClass().equals(Integer.class) - || whiteLabelingOptions.getClass().equals(String.class) - || whiteLabelingOptions.getClass().isEnum()) { - map.put("white_labeling_options", whiteLabelingOptions); - } else if (isListOfFile(whiteLabelingOptions)) { - for (int i = 0; i < getListSize(whiteLabelingOptions); i++) { - map.put( - "white_labeling_options[" + i + "]", - getFromList(whiteLabelingOptions, i)); - } - } else { - map.put( - "white_labeling_options", - JSON.getDefault().getMapper().writeValueAsString(whiteLabelingOptions)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java deleted file mode 100644 index 27b8be9e6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BulkSendJobGetResponse */ -@JsonPropertyOrder({ - BulkSendJobGetResponse.JSON_PROPERTY_BULK_SEND_JOB, - BulkSendJobGetResponse.JSON_PROPERTY_LIST_INFO, - BulkSendJobGetResponse.JSON_PROPERTY_SIGNATURE_REQUESTS, - BulkSendJobGetResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class BulkSendJobGetResponse { - public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; - private List signatureRequests = new ArrayList<>(); - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public BulkSendJobGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static BulkSendJobGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, BulkSendJobGetResponse.class); - } - - public static BulkSendJobGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), BulkSendJobGetResponse.class); - } - - public BulkSendJobGetResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { - this.bulkSendJob = bulkSendJob; - return this; - } - - /** - * Get bulkSendJob - * - * @return bulkSendJob - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkSendJobResponse getBulkSendJob() { - return bulkSendJob; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { - this.bulkSendJob = bulkSendJob; - } - - public BulkSendJobGetResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public BulkSendJobGetResponse signatureRequests( - List signatureRequests) { - this.signatureRequests = signatureRequests; - return this; - } - - public BulkSendJobGetResponse addSignatureRequestsItem( - BulkSendJobGetResponseSignatureRequests signatureRequestsItem) { - if (this.signatureRequests == null) { - this.signatureRequests = new ArrayList<>(); - } - this.signatureRequests.add(signatureRequestsItem); - return this; - } - - /** - * Contains information about the Signature Requests sent in bulk. - * - * @return signatureRequests - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignatureRequests() { - return signatureRequests; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests( - List signatureRequests) { - this.signatureRequests = signatureRequests; - } - - public BulkSendJobGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public BulkSendJobGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this BulkSendJobGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkSendJobGetResponse bulkSendJobGetResponse = (BulkSendJobGetResponse) o; - return Objects.equals(this.bulkSendJob, bulkSendJobGetResponse.bulkSendJob) - && Objects.equals(this.listInfo, bulkSendJobGetResponse.listInfo) - && Objects.equals(this.signatureRequests, bulkSendJobGetResponse.signatureRequests) - && Objects.equals(this.warnings, bulkSendJobGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(bulkSendJob, listInfo, signatureRequests, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkSendJobGetResponse {\n"); - sb.append(" bulkSendJob: ").append(toIndentedString(bulkSendJob)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" signatureRequests: ") - .append(toIndentedString(signatureRequests)) - .append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (bulkSendJob != null) { - if (isFileTypeOrListOfFiles(bulkSendJob)) { - fileTypeFound = true; - } - - if (bulkSendJob.getClass().equals(java.io.File.class) - || bulkSendJob.getClass().equals(Integer.class) - || bulkSendJob.getClass().equals(String.class) - || bulkSendJob.getClass().isEnum()) { - map.put("bulk_send_job", bulkSendJob); - } else if (isListOfFile(bulkSendJob)) { - for (int i = 0; i < getListSize(bulkSendJob); i++) { - map.put("bulk_send_job[" + i + "]", getFromList(bulkSendJob, i)); - } - } else { - map.put( - "bulk_send_job", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJob)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (signatureRequests != null) { - if (isFileTypeOrListOfFiles(signatureRequests)) { - fileTypeFound = true; - } - - if (signatureRequests.getClass().equals(java.io.File.class) - || signatureRequests.getClass().equals(Integer.class) - || signatureRequests.getClass().equals(String.class) - || signatureRequests.getClass().isEnum()) { - map.put("signature_requests", signatureRequests); - } else if (isListOfFile(signatureRequests)) { - for (int i = 0; i < getListSize(signatureRequests); i++) { - map.put("signature_requests[" + i + "]", getFromList(signatureRequests, i)); - } - } else { - map.put( - "signature_requests", - JSON.getDefault().getMapper().writeValueAsString(signatureRequests)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java deleted file mode 100644 index d96001b5c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java +++ /dev/null @@ -1,1456 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BulkSendJobGetResponseSignatureRequests */ -@JsonPropertyOrder({ - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_TEST_MODE, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SIGNATURE_REQUEST_ID, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_TITLE, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_ORIGINAL_TITLE, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SUBJECT, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_MESSAGE, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_METADATA, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_CREATED_AT, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_EXPIRES_AT, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_IS_COMPLETE, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_IS_DECLINED, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_HAS_ERROR, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_FILES_URL, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SIGNING_URL, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_DETAILS_URL, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SIGNING_REDIRECT_URL, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_FINAL_COPY_URI, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_TEMPLATE_IDS, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_CUSTOM_FIELDS, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_ATTACHMENTS, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_RESPONSE_DATA, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_SIGNATURES, - BulkSendJobGetResponseSignatureRequests.JSON_PROPERTY_BULK_SEND_JOB_ID -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class BulkSendJobGetResponseSignatureRequests { - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; - - public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; - - public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; - - public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; - - public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; - - public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; - - public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; - - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; - - public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; - - public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; - - public BulkSendJobGetResponseSignatureRequests() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static BulkSendJobGetResponseSignatureRequests init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, BulkSendJobGetResponseSignatureRequests.class); - } - - public static BulkSendJobGetResponseSignatureRequests init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - BulkSendJobGetResponseSignatureRequests.class); - } - - public BulkSendJobGetResponseSignatureRequests testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test signature request. Test requests have no legal value. Defaults to - * `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public BulkSendJobGetResponseSignatureRequests signatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - return this; - } - - /** - * The id of the SignatureRequest. - * - * @return signatureRequestId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignatureRequestId() { - return signatureRequestId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - } - - public BulkSendJobGetResponseSignatureRequests requesterEmailAddress( - String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - return this; - } - - /** - * The email address of the initiator of the SignatureRequest. - * - * @return requesterEmailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequesterEmailAddress() { - return requesterEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - } - - public BulkSendJobGetResponseSignatureRequests title(String title) { - this.title = title; - return this; - } - - /** - * The title the specified Account uses for the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public BulkSendJobGetResponseSignatureRequests originalTitle(String originalTitle) { - this.originalTitle = originalTitle; - return this; - } - - /** - * Default Label for account. - * - * @return originalTitle - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOriginalTitle() { - return originalTitle; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { - this.originalTitle = originalTitle; - } - - public BulkSendJobGetResponseSignatureRequests subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that was initially sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public BulkSendJobGetResponseSignatureRequests message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that was initially sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public BulkSendJobGetResponseSignatureRequests metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public BulkSendJobGetResponseSignatureRequests putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * The metadata attached to the signature request. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public BulkSendJobGetResponseSignatureRequests createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Time the signature request was created. - * - * @return createdAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public BulkSendJobGetResponseSignatureRequests expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * The time when the signature request will expire unsigned signatures. See [Signature Request - * Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for - * details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - public BulkSendJobGetResponseSignatureRequests isComplete(Boolean isComplete) { - this.isComplete = isComplete; - return this; - } - - /** - * Whether or not the SignatureRequest has been fully executed by all signers. - * - * @return isComplete - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsComplete() { - return isComplete; - } - - @JsonProperty(JSON_PROPERTY_IS_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { - this.isComplete = isComplete; - } - - public BulkSendJobGetResponseSignatureRequests isDeclined(Boolean isDeclined) { - this.isDeclined = isDeclined; - return this; - } - - /** - * Whether or not the SignatureRequest has been declined by a signer. - * - * @return isDeclined - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_DECLINED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDeclined() { - return isDeclined; - } - - @JsonProperty(JSON_PROPERTY_IS_DECLINED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { - this.isDeclined = isDeclined; - } - - public BulkSendJobGetResponseSignatureRequests hasError(Boolean hasError) { - this.hasError = hasError; - return this; - } - - /** - * Whether or not an error occurred (either during the creation of the SignatureRequest or - * during one of the signings). - * - * @return hasError - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HAS_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasError() { - return hasError; - } - - @JsonProperty(JSON_PROPERTY_HAS_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { - this.hasError = hasError; - } - - public BulkSendJobGetResponseSignatureRequests filesUrl(String filesUrl) { - this.filesUrl = filesUrl; - return this; - } - - /** - * The URL where a copy of the request's documents can be downloaded. - * - * @return filesUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFilesUrl() { - return filesUrl; - } - - @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { - this.filesUrl = filesUrl; - } - - public BulkSendJobGetResponseSignatureRequests signingUrl(String signingUrl) { - this.signingUrl = signingUrl; - return this; - } - - /** - * The URL where a signer, after authenticating, can sign the documents. This should only be - * used by users with existing Dropbox Sign accounts as they will be required to log in before - * signing. - * - * @return signingUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningUrl() { - return signingUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { - this.signingUrl = signingUrl; - } - - public BulkSendJobGetResponseSignatureRequests detailsUrl(String detailsUrl) { - this.detailsUrl = detailsUrl; - return this; - } - - /** - * The URL where the requester and the signers can view the current status of the - * SignatureRequest. - * - * @return detailsUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DETAILS_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetailsUrl() { - return detailsUrl; - } - - @JsonProperty(JSON_PROPERTY_DETAILS_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { - this.detailsUrl = detailsUrl; - } - - public BulkSendJobGetResponseSignatureRequests ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addCcEmailAddressesItem( - String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of - * the final PDF once all the signers have signed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public BulkSendJobGetResponseSignatureRequests signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want the signer redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public BulkSendJobGetResponseSignatureRequests finalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - return this; - } - - /** - * The path where the completed document can be downloaded - * - * @return finalCopyUri - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFinalCopyUri() { - return finalCopyUri; - } - - @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - } - - public BulkSendJobGetResponseSignatureRequests templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addTemplateIdsItem(String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Templates IDs used in this SignatureRequest (if any). - * - * @return templateIds - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public BulkSendJobGetResponseSignatureRequests customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addCustomFieldsItem( - SignatureRequestResponseCustomFieldBase customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array of Custom Field objects containing the name and type of each custom field. * Text - * Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses - * `SignatureRequestResponseCustomFieldCheckbox` - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public BulkSendJobGetResponseSignatureRequests attachments( - List attachments) { - this.attachments = attachments; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addAttachmentsItem( - SignatureRequestResponseAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * Signer attachments. - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public BulkSendJobGetResponseSignatureRequests responseData( - List responseData) { - this.responseData = responseData; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addResponseDataItem( - SignatureRequestResponseDataBase responseDataItem) { - if (this.responseData == null) { - this.responseData = new ArrayList<>(); - } - this.responseData.add(responseDataItem); - return this; - } - - /** - * An array of form field objects containing the name, value, and type of each textbox or - * checkmark field filled in by the signers. - * - * @return responseData - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResponseData() { - return responseData; - } - - @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { - this.responseData = responseData; - } - - public BulkSendJobGetResponseSignatureRequests signatures( - List signatures) { - this.signatures = signatures; - return this; - } - - public BulkSendJobGetResponseSignatureRequests addSignaturesItem( - SignatureRequestResponseSignatures signaturesItem) { - if (this.signatures == null) { - this.signatures = new ArrayList<>(); - } - this.signatures.add(signaturesItem); - return this; - } - - /** - * An array of signature objects, 1 for each signer. - * - * @return signatures - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignatures() { - return signatures; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { - this.signatures = signatures; - } - - public BulkSendJobGetResponseSignatureRequests bulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - return this; - } - - /** - * The id of the BulkSendJob. - * - * @return bulkSendJobId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBulkSendJobId() { - return bulkSendJobId; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - } - - /** Return true if this BulkSendJobGetResponseSignatureRequests object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkSendJobGetResponseSignatureRequests bulkSendJobGetResponseSignatureRequests = - (BulkSendJobGetResponseSignatureRequests) o; - return Objects.equals(this.testMode, bulkSendJobGetResponseSignatureRequests.testMode) - && Objects.equals( - this.signatureRequestId, - bulkSendJobGetResponseSignatureRequests.signatureRequestId) - && Objects.equals( - this.requesterEmailAddress, - bulkSendJobGetResponseSignatureRequests.requesterEmailAddress) - && Objects.equals(this.title, bulkSendJobGetResponseSignatureRequests.title) - && Objects.equals( - this.originalTitle, bulkSendJobGetResponseSignatureRequests.originalTitle) - && Objects.equals(this.subject, bulkSendJobGetResponseSignatureRequests.subject) - && Objects.equals(this.message, bulkSendJobGetResponseSignatureRequests.message) - && Objects.equals(this.metadata, bulkSendJobGetResponseSignatureRequests.metadata) - && Objects.equals(this.createdAt, bulkSendJobGetResponseSignatureRequests.createdAt) - && Objects.equals(this.expiresAt, bulkSendJobGetResponseSignatureRequests.expiresAt) - && Objects.equals( - this.isComplete, bulkSendJobGetResponseSignatureRequests.isComplete) - && Objects.equals( - this.isDeclined, bulkSendJobGetResponseSignatureRequests.isDeclined) - && Objects.equals(this.hasError, bulkSendJobGetResponseSignatureRequests.hasError) - && Objects.equals(this.filesUrl, bulkSendJobGetResponseSignatureRequests.filesUrl) - && Objects.equals( - this.signingUrl, bulkSendJobGetResponseSignatureRequests.signingUrl) - && Objects.equals( - this.detailsUrl, bulkSendJobGetResponseSignatureRequests.detailsUrl) - && Objects.equals( - this.ccEmailAddresses, - bulkSendJobGetResponseSignatureRequests.ccEmailAddresses) - && Objects.equals( - this.signingRedirectUrl, - bulkSendJobGetResponseSignatureRequests.signingRedirectUrl) - && Objects.equals( - this.finalCopyUri, bulkSendJobGetResponseSignatureRequests.finalCopyUri) - && Objects.equals( - this.templateIds, bulkSendJobGetResponseSignatureRequests.templateIds) - && Objects.equals( - this.customFields, bulkSendJobGetResponseSignatureRequests.customFields) - && Objects.equals( - this.attachments, bulkSendJobGetResponseSignatureRequests.attachments) - && Objects.equals( - this.responseData, bulkSendJobGetResponseSignatureRequests.responseData) - && Objects.equals( - this.signatures, bulkSendJobGetResponseSignatureRequests.signatures) - && Objects.equals( - this.bulkSendJobId, bulkSendJobGetResponseSignatureRequests.bulkSendJobId); - } - - @Override - public int hashCode() { - return Objects.hash( - testMode, - signatureRequestId, - requesterEmailAddress, - title, - originalTitle, - subject, - message, - metadata, - createdAt, - expiresAt, - isComplete, - isDeclined, - hasError, - filesUrl, - signingUrl, - detailsUrl, - ccEmailAddresses, - signingRedirectUrl, - finalCopyUri, - templateIds, - customFields, - attachments, - responseData, - signatures, - bulkSendJobId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkSendJobGetResponseSignatureRequests {\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" signatureRequestId: ") - .append(toIndentedString(signatureRequestId)) - .append("\n"); - sb.append(" requesterEmailAddress: ") - .append(toIndentedString(requesterEmailAddress)) - .append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" isComplete: ").append(toIndentedString(isComplete)).append("\n"); - sb.append(" isDeclined: ").append(toIndentedString(isDeclined)).append("\n"); - sb.append(" hasError: ").append(toIndentedString(hasError)).append("\n"); - sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); - sb.append(" signingUrl: ").append(toIndentedString(signingUrl)).append("\n"); - sb.append(" detailsUrl: ").append(toIndentedString(detailsUrl)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" finalCopyUri: ").append(toIndentedString(finalCopyUri)).append("\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" responseData: ").append(toIndentedString(responseData)).append("\n"); - sb.append(" signatures: ").append(toIndentedString(signatures)).append("\n"); - sb.append(" bulkSendJobId: ").append(toIndentedString(bulkSendJobId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (signatureRequestId != null) { - if (isFileTypeOrListOfFiles(signatureRequestId)) { - fileTypeFound = true; - } - - if (signatureRequestId.getClass().equals(java.io.File.class) - || signatureRequestId.getClass().equals(Integer.class) - || signatureRequestId.getClass().equals(String.class) - || signatureRequestId.getClass().isEnum()) { - map.put("signature_request_id", signatureRequestId); - } else if (isListOfFile(signatureRequestId)) { - for (int i = 0; i < getListSize(signatureRequestId); i++) { - map.put( - "signature_request_id[" + i + "]", - getFromList(signatureRequestId, i)); - } - } else { - map.put( - "signature_request_id", - JSON.getDefault().getMapper().writeValueAsString(signatureRequestId)); - } - } - if (requesterEmailAddress != null) { - if (isFileTypeOrListOfFiles(requesterEmailAddress)) { - fileTypeFound = true; - } - - if (requesterEmailAddress.getClass().equals(java.io.File.class) - || requesterEmailAddress.getClass().equals(Integer.class) - || requesterEmailAddress.getClass().equals(String.class) - || requesterEmailAddress.getClass().isEnum()) { - map.put("requester_email_address", requesterEmailAddress); - } else if (isListOfFile(requesterEmailAddress)) { - for (int i = 0; i < getListSize(requesterEmailAddress); i++) { - map.put( - "requester_email_address[" + i + "]", - getFromList(requesterEmailAddress, i)); - } - } else { - map.put( - "requester_email_address", - JSON.getDefault() - .getMapper() - .writeValueAsString(requesterEmailAddress)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (originalTitle != null) { - if (isFileTypeOrListOfFiles(originalTitle)) { - fileTypeFound = true; - } - - if (originalTitle.getClass().equals(java.io.File.class) - || originalTitle.getClass().equals(Integer.class) - || originalTitle.getClass().equals(String.class) - || originalTitle.getClass().isEnum()) { - map.put("original_title", originalTitle); - } else if (isListOfFile(originalTitle)) { - for (int i = 0; i < getListSize(originalTitle); i++) { - map.put("original_title[" + i + "]", getFromList(originalTitle, i)); - } - } else { - map.put( - "original_title", - JSON.getDefault().getMapper().writeValueAsString(originalTitle)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - if (isComplete != null) { - if (isFileTypeOrListOfFiles(isComplete)) { - fileTypeFound = true; - } - - if (isComplete.getClass().equals(java.io.File.class) - || isComplete.getClass().equals(Integer.class) - || isComplete.getClass().equals(String.class) - || isComplete.getClass().isEnum()) { - map.put("is_complete", isComplete); - } else if (isListOfFile(isComplete)) { - for (int i = 0; i < getListSize(isComplete); i++) { - map.put("is_complete[" + i + "]", getFromList(isComplete, i)); - } - } else { - map.put( - "is_complete", - JSON.getDefault().getMapper().writeValueAsString(isComplete)); - } - } - if (isDeclined != null) { - if (isFileTypeOrListOfFiles(isDeclined)) { - fileTypeFound = true; - } - - if (isDeclined.getClass().equals(java.io.File.class) - || isDeclined.getClass().equals(Integer.class) - || isDeclined.getClass().equals(String.class) - || isDeclined.getClass().isEnum()) { - map.put("is_declined", isDeclined); - } else if (isListOfFile(isDeclined)) { - for (int i = 0; i < getListSize(isDeclined); i++) { - map.put("is_declined[" + i + "]", getFromList(isDeclined, i)); - } - } else { - map.put( - "is_declined", - JSON.getDefault().getMapper().writeValueAsString(isDeclined)); - } - } - if (hasError != null) { - if (isFileTypeOrListOfFiles(hasError)) { - fileTypeFound = true; - } - - if (hasError.getClass().equals(java.io.File.class) - || hasError.getClass().equals(Integer.class) - || hasError.getClass().equals(String.class) - || hasError.getClass().isEnum()) { - map.put("has_error", hasError); - } else if (isListOfFile(hasError)) { - for (int i = 0; i < getListSize(hasError); i++) { - map.put("has_error[" + i + "]", getFromList(hasError, i)); - } - } else { - map.put( - "has_error", - JSON.getDefault().getMapper().writeValueAsString(hasError)); - } - } - if (filesUrl != null) { - if (isFileTypeOrListOfFiles(filesUrl)) { - fileTypeFound = true; - } - - if (filesUrl.getClass().equals(java.io.File.class) - || filesUrl.getClass().equals(Integer.class) - || filesUrl.getClass().equals(String.class) - || filesUrl.getClass().isEnum()) { - map.put("files_url", filesUrl); - } else if (isListOfFile(filesUrl)) { - for (int i = 0; i < getListSize(filesUrl); i++) { - map.put("files_url[" + i + "]", getFromList(filesUrl, i)); - } - } else { - map.put( - "files_url", - JSON.getDefault().getMapper().writeValueAsString(filesUrl)); - } - } - if (signingUrl != null) { - if (isFileTypeOrListOfFiles(signingUrl)) { - fileTypeFound = true; - } - - if (signingUrl.getClass().equals(java.io.File.class) - || signingUrl.getClass().equals(Integer.class) - || signingUrl.getClass().equals(String.class) - || signingUrl.getClass().isEnum()) { - map.put("signing_url", signingUrl); - } else if (isListOfFile(signingUrl)) { - for (int i = 0; i < getListSize(signingUrl); i++) { - map.put("signing_url[" + i + "]", getFromList(signingUrl, i)); - } - } else { - map.put( - "signing_url", - JSON.getDefault().getMapper().writeValueAsString(signingUrl)); - } - } - if (detailsUrl != null) { - if (isFileTypeOrListOfFiles(detailsUrl)) { - fileTypeFound = true; - } - - if (detailsUrl.getClass().equals(java.io.File.class) - || detailsUrl.getClass().equals(Integer.class) - || detailsUrl.getClass().equals(String.class) - || detailsUrl.getClass().isEnum()) { - map.put("details_url", detailsUrl); - } else if (isListOfFile(detailsUrl)) { - for (int i = 0; i < getListSize(detailsUrl); i++) { - map.put("details_url[" + i + "]", getFromList(detailsUrl, i)); - } - } else { - map.put( - "details_url", - JSON.getDefault().getMapper().writeValueAsString(detailsUrl)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (finalCopyUri != null) { - if (isFileTypeOrListOfFiles(finalCopyUri)) { - fileTypeFound = true; - } - - if (finalCopyUri.getClass().equals(java.io.File.class) - || finalCopyUri.getClass().equals(Integer.class) - || finalCopyUri.getClass().equals(String.class) - || finalCopyUri.getClass().isEnum()) { - map.put("final_copy_uri", finalCopyUri); - } else if (isListOfFile(finalCopyUri)) { - for (int i = 0; i < getListSize(finalCopyUri); i++) { - map.put("final_copy_uri[" + i + "]", getFromList(finalCopyUri, i)); - } - } else { - map.put( - "final_copy_uri", - JSON.getDefault().getMapper().writeValueAsString(finalCopyUri)); - } - } - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (responseData != null) { - if (isFileTypeOrListOfFiles(responseData)) { - fileTypeFound = true; - } - - if (responseData.getClass().equals(java.io.File.class) - || responseData.getClass().equals(Integer.class) - || responseData.getClass().equals(String.class) - || responseData.getClass().isEnum()) { - map.put("response_data", responseData); - } else if (isListOfFile(responseData)) { - for (int i = 0; i < getListSize(responseData); i++) { - map.put("response_data[" + i + "]", getFromList(responseData, i)); - } - } else { - map.put( - "response_data", - JSON.getDefault().getMapper().writeValueAsString(responseData)); - } - } - if (signatures != null) { - if (isFileTypeOrListOfFiles(signatures)) { - fileTypeFound = true; - } - - if (signatures.getClass().equals(java.io.File.class) - || signatures.getClass().equals(Integer.class) - || signatures.getClass().equals(String.class) - || signatures.getClass().isEnum()) { - map.put("signatures", signatures); - } else if (isListOfFile(signatures)) { - for (int i = 0; i < getListSize(signatures); i++) { - map.put("signatures[" + i + "]", getFromList(signatures, i)); - } - } else { - map.put( - "signatures", - JSON.getDefault().getMapper().writeValueAsString(signatures)); - } - } - if (bulkSendJobId != null) { - if (isFileTypeOrListOfFiles(bulkSendJobId)) { - fileTypeFound = true; - } - - if (bulkSendJobId.getClass().equals(java.io.File.class) - || bulkSendJobId.getClass().equals(Integer.class) - || bulkSendJobId.getClass().equals(String.class) - || bulkSendJobId.getClass().isEnum()) { - map.put("bulk_send_job_id", bulkSendJobId); - } else if (isListOfFile(bulkSendJobId)) { - for (int i = 0; i < getListSize(bulkSendJobId); i++) { - map.put("bulk_send_job_id[" + i + "]", getFromList(bulkSendJobId, i)); - } - } else { - map.put( - "bulk_send_job_id", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJobId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java deleted file mode 100644 index 3f4c641a5..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BulkSendJobListResponse */ -@JsonPropertyOrder({ - BulkSendJobListResponse.JSON_PROPERTY_BULK_SEND_JOBS, - BulkSendJobListResponse.JSON_PROPERTY_LIST_INFO, - BulkSendJobListResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class BulkSendJobListResponse { - public static final String JSON_PROPERTY_BULK_SEND_JOBS = "bulk_send_jobs"; - private List bulkSendJobs = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public BulkSendJobListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static BulkSendJobListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, BulkSendJobListResponse.class); - } - - public static BulkSendJobListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), BulkSendJobListResponse.class); - } - - public BulkSendJobListResponse bulkSendJobs(List bulkSendJobs) { - this.bulkSendJobs = bulkSendJobs; - return this; - } - - public BulkSendJobListResponse addBulkSendJobsItem(BulkSendJobResponse bulkSendJobsItem) { - if (this.bulkSendJobs == null) { - this.bulkSendJobs = new ArrayList<>(); - } - this.bulkSendJobs.add(bulkSendJobsItem); - return this; - } - - /** - * Contains a list of BulkSendJobs that the API caller has access to. - * - * @return bulkSendJobs - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOBS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getBulkSendJobs() { - return bulkSendJobs; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOBS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJobs(List bulkSendJobs) { - this.bulkSendJobs = bulkSendJobs; - } - - public BulkSendJobListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public BulkSendJobListResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public BulkSendJobListResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this BulkSendJobListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkSendJobListResponse bulkSendJobListResponse = (BulkSendJobListResponse) o; - return Objects.equals(this.bulkSendJobs, bulkSendJobListResponse.bulkSendJobs) - && Objects.equals(this.listInfo, bulkSendJobListResponse.listInfo) - && Objects.equals(this.warnings, bulkSendJobListResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(bulkSendJobs, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkSendJobListResponse {\n"); - sb.append(" bulkSendJobs: ").append(toIndentedString(bulkSendJobs)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (bulkSendJobs != null) { - if (isFileTypeOrListOfFiles(bulkSendJobs)) { - fileTypeFound = true; - } - - if (bulkSendJobs.getClass().equals(java.io.File.class) - || bulkSendJobs.getClass().equals(Integer.class) - || bulkSendJobs.getClass().equals(String.class) - || bulkSendJobs.getClass().isEnum()) { - map.put("bulk_send_jobs", bulkSendJobs); - } else if (isListOfFile(bulkSendJobs)) { - for (int i = 0; i < getListSize(bulkSendJobs); i++) { - map.put("bulk_send_jobs[" + i + "]", getFromList(bulkSendJobs, i)); - } - } else { - map.put( - "bulk_send_jobs", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJobs)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java deleted file mode 100644 index bc366fdce..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * Contains information about the BulkSendJob such as when it was created and how many signature - * requests are queued. - */ -@JsonPropertyOrder({ - BulkSendJobResponse.JSON_PROPERTY_BULK_SEND_JOB_ID, - BulkSendJobResponse.JSON_PROPERTY_TOTAL, - BulkSendJobResponse.JSON_PROPERTY_IS_CREATOR, - BulkSendJobResponse.JSON_PROPERTY_CREATED_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class BulkSendJobResponse { - public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; - - public static final String JSON_PROPERTY_TOTAL = "total"; - private Integer total; - - public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public BulkSendJobResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static BulkSendJobResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, BulkSendJobResponse.class); - } - - public static BulkSendJobResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), BulkSendJobResponse.class); - } - - public BulkSendJobResponse bulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - return this; - } - - /** - * The id of the BulkSendJob. - * - * @return bulkSendJobId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBulkSendJobId() { - return bulkSendJobId; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - } - - public BulkSendJobResponse total(Integer total) { - this.total = total; - return this; - } - - /** - * The total amount of Signature Requests queued for sending. - * - * @return total - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getTotal() { - return total; - } - - @JsonProperty(JSON_PROPERTY_TOTAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotal(Integer total) { - this.total = total; - } - - public BulkSendJobResponse isCreator(Boolean isCreator) { - this.isCreator = isCreator; - return this; - } - - /** - * True if you are the owner of this BulkSendJob, false if it's been shared with you by a - * team member. - * - * @return isCreator - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsCreator() { - return isCreator; - } - - @JsonProperty(JSON_PROPERTY_IS_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { - this.isCreator = isCreator; - } - - public BulkSendJobResponse createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Time that the BulkSendJob was created. - * - * @return createdAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - /** Return true if this BulkSendJobResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkSendJobResponse bulkSendJobResponse = (BulkSendJobResponse) o; - return Objects.equals(this.bulkSendJobId, bulkSendJobResponse.bulkSendJobId) - && Objects.equals(this.total, bulkSendJobResponse.total) - && Objects.equals(this.isCreator, bulkSendJobResponse.isCreator) - && Objects.equals(this.createdAt, bulkSendJobResponse.createdAt); - } - - @Override - public int hashCode() { - return Objects.hash(bulkSendJobId, total, isCreator, createdAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkSendJobResponse {\n"); - sb.append(" bulkSendJobId: ").append(toIndentedString(bulkSendJobId)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" isCreator: ").append(toIndentedString(isCreator)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (bulkSendJobId != null) { - if (isFileTypeOrListOfFiles(bulkSendJobId)) { - fileTypeFound = true; - } - - if (bulkSendJobId.getClass().equals(java.io.File.class) - || bulkSendJobId.getClass().equals(Integer.class) - || bulkSendJobId.getClass().equals(String.class) - || bulkSendJobId.getClass().isEnum()) { - map.put("bulk_send_job_id", bulkSendJobId); - } else if (isListOfFile(bulkSendJobId)) { - for (int i = 0; i < getListSize(bulkSendJobId); i++) { - map.put("bulk_send_job_id[" + i + "]", getFromList(bulkSendJobId, i)); - } - } else { - map.put( - "bulk_send_job_id", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJobId)); - } - } - if (total != null) { - if (isFileTypeOrListOfFiles(total)) { - fileTypeFound = true; - } - - if (total.getClass().equals(java.io.File.class) - || total.getClass().equals(Integer.class) - || total.getClass().equals(String.class) - || total.getClass().isEnum()) { - map.put("total", total); - } else if (isListOfFile(total)) { - for (int i = 0; i < getListSize(total); i++) { - map.put("total[" + i + "]", getFromList(total, i)); - } - } else { - map.put("total", JSON.getDefault().getMapper().writeValueAsString(total)); - } - } - if (isCreator != null) { - if (isFileTypeOrListOfFiles(isCreator)) { - fileTypeFound = true; - } - - if (isCreator.getClass().equals(java.io.File.class) - || isCreator.getClass().equals(Integer.class) - || isCreator.getClass().equals(String.class) - || isCreator.getClass().isEnum()) { - map.put("is_creator", isCreator); - } else if (isListOfFile(isCreator)) { - for (int i = 0; i < getListSize(isCreator); i++) { - map.put("is_creator[" + i + "]", getFromList(isCreator, i)); - } - } else { - map.put( - "is_creator", - JSON.getDefault().getMapper().writeValueAsString(isCreator)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java deleted file mode 100644 index 38e273f63..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** BulkSendJobSendResponse */ -@JsonPropertyOrder({ - BulkSendJobSendResponse.JSON_PROPERTY_BULK_SEND_JOB, - BulkSendJobSendResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class BulkSendJobSendResponse { - public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public BulkSendJobSendResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static BulkSendJobSendResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, BulkSendJobSendResponse.class); - } - - public static BulkSendJobSendResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), BulkSendJobSendResponse.class); - } - - public BulkSendJobSendResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { - this.bulkSendJob = bulkSendJob; - return this; - } - - /** - * Get bulkSendJob - * - * @return bulkSendJob - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BulkSendJobResponse getBulkSendJob() { - return bulkSendJob; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { - this.bulkSendJob = bulkSendJob; - } - - public BulkSendJobSendResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public BulkSendJobSendResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this BulkSendJobSendResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - BulkSendJobSendResponse bulkSendJobSendResponse = (BulkSendJobSendResponse) o; - return Objects.equals(this.bulkSendJob, bulkSendJobSendResponse.bulkSendJob) - && Objects.equals(this.warnings, bulkSendJobSendResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(bulkSendJob, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class BulkSendJobSendResponse {\n"); - sb.append(" bulkSendJob: ").append(toIndentedString(bulkSendJob)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (bulkSendJob != null) { - if (isFileTypeOrListOfFiles(bulkSendJob)) { - fileTypeFound = true; - } - - if (bulkSendJob.getClass().equals(java.io.File.class) - || bulkSendJob.getClass().equals(Integer.class) - || bulkSendJob.getClass().equals(String.class) - || bulkSendJob.getClass().isEnum()) { - map.put("bulk_send_job", bulkSendJob); - } else if (isListOfFile(bulkSendJob)) { - for (int i = 0; i < getListSize(bulkSendJob); i++) { - map.put("bulk_send_job[" + i + "]", getFromList(bulkSendJob, i)); - } - } else { - map.put( - "bulk_send_job", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJob)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java deleted file mode 100644 index 1494bf469..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java +++ /dev/null @@ -1,646 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** EmbeddedEditUrlRequest */ -@JsonPropertyOrder({ - EmbeddedEditUrlRequest.JSON_PROPERTY_ALLOW_EDIT_CCS, - EmbeddedEditUrlRequest.JSON_PROPERTY_CC_ROLES, - EmbeddedEditUrlRequest.JSON_PROPERTY_EDITOR_OPTIONS, - EmbeddedEditUrlRequest.JSON_PROPERTY_FORCE_SIGNER_ROLES, - EmbeddedEditUrlRequest.JSON_PROPERTY_FORCE_SUBJECT_MESSAGE, - EmbeddedEditUrlRequest.JSON_PROPERTY_MERGE_FIELDS, - EmbeddedEditUrlRequest.JSON_PROPERTY_PREVIEW_ONLY, - EmbeddedEditUrlRequest.JSON_PROPERTY_SHOW_PREVIEW, - EmbeddedEditUrlRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - EmbeddedEditUrlRequest.JSON_PROPERTY_TEST_MODE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddedEditUrlRequest { - public static final String JSON_PROPERTY_ALLOW_EDIT_CCS = "allow_edit_ccs"; - private Boolean allowEditCcs = false; - - public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; - - public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; - - public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; - - public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; - - public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; - - public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; - - public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public EmbeddedEditUrlRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EmbeddedEditUrlRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EmbeddedEditUrlRequest.class); - } - - public static EmbeddedEditUrlRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlRequest.class); - } - - public EmbeddedEditUrlRequest allowEditCcs(Boolean allowEditCcs) { - this.allowEditCcs = allowEditCcs; - return this; - } - - /** - * This allows the requester to enable/disable to add or change CC roles when editing the - * template. - * - * @return allowEditCcs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowEditCcs() { - return allowEditCcs; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditCcs(Boolean allowEditCcs) { - this.allowEditCcs = allowEditCcs; - } - - public EmbeddedEditUrlRequest ccRoles(List ccRoles) { - this.ccRoles = ccRoles; - return this; - } - - public EmbeddedEditUrlRequest addCcRolesItem(String ccRolesItem) { - if (this.ccRoles == null) { - this.ccRoles = new ArrayList<>(); - } - this.ccRoles.add(ccRolesItem); - return this; - } - - /** - * The CC roles that must be assigned when using the template to send a signature request. To - * remove all CC roles, pass in a single role with no name. For use in a POST request. - * - * @return ccRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcRoles() { - return ccRoles; - } - - @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { - this.ccRoles = ccRoles; - } - - public EmbeddedEditUrlRequest editorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - return this; - } - - /** - * Get editorOptions - * - * @return editorOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubEditorOptions getEditorOptions() { - return editorOptions; - } - - @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - } - - public EmbeddedEditUrlRequest forceSignerRoles(Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - return this; - } - - /** - * Provide users the ability to review/edit the template signer roles. - * - * @return forceSignerRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSignerRoles() { - return forceSignerRoles; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - } - - public EmbeddedEditUrlRequest forceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - return this; - } - - /** - * Provide users the ability to review/edit the template subject and message. - * - * @return forceSubjectMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSubjectMessage() { - return forceSubjectMessage; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - } - - public EmbeddedEditUrlRequest mergeFields(List mergeFields) { - this.mergeFields = mergeFields; - return this; - } - - public EmbeddedEditUrlRequest addMergeFieldsItem(SubMergeField mergeFieldsItem) { - if (this.mergeFields == null) { - this.mergeFields = new ArrayList<>(); - } - this.mergeFields.add(mergeFieldsItem); - return this; - } - - /** - * Add additional merge fields to the template, which can be used used to pre-fill data by - * passing values into signature requests made with that template. Remove all merge fields on - * the template by passing an empty array `[]`. - * - * @return mergeFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMergeFields() { - return mergeFields; - } - - @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { - this.mergeFields = mergeFields; - } - - public EmbeddedEditUrlRequest previewOnly(Boolean previewOnly) { - this.previewOnly = previewOnly; - return this; - } - - /** - * This allows the requester to enable the preview experience (i.e. does not allow the - * requester's end user to add any additional fields via the editor). **NOTE:** This - * parameter overwrites `show_preview=true` (if set). - * - * @return previewOnly - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPreviewOnly() { - return previewOnly; - } - - @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { - this.previewOnly = previewOnly; - } - - public EmbeddedEditUrlRequest showPreview(Boolean showPreview) { - this.showPreview = showPreview; - return this; - } - - /** - * This allows the requester to enable the editor/preview experience. - * - * @return showPreview - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPreview() { - return showPreview; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { - this.showPreview = showPreview; - } - - public EmbeddedEditUrlRequest showProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public EmbeddedEditUrlRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, locked templates will only be available for editing if this is set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - /** Return true if this EmbeddedEditUrlRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmbeddedEditUrlRequest embeddedEditUrlRequest = (EmbeddedEditUrlRequest) o; - return Objects.equals(this.allowEditCcs, embeddedEditUrlRequest.allowEditCcs) - && Objects.equals(this.ccRoles, embeddedEditUrlRequest.ccRoles) - && Objects.equals(this.editorOptions, embeddedEditUrlRequest.editorOptions) - && Objects.equals(this.forceSignerRoles, embeddedEditUrlRequest.forceSignerRoles) - && Objects.equals( - this.forceSubjectMessage, embeddedEditUrlRequest.forceSubjectMessage) - && Objects.equals(this.mergeFields, embeddedEditUrlRequest.mergeFields) - && Objects.equals(this.previewOnly, embeddedEditUrlRequest.previewOnly) - && Objects.equals(this.showPreview, embeddedEditUrlRequest.showPreview) - && Objects.equals( - this.showProgressStepper, embeddedEditUrlRequest.showProgressStepper) - && Objects.equals(this.testMode, embeddedEditUrlRequest.testMode); - } - - @Override - public int hashCode() { - return Objects.hash( - allowEditCcs, - ccRoles, - editorOptions, - forceSignerRoles, - forceSubjectMessage, - mergeFields, - previewOnly, - showPreview, - showProgressStepper, - testMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmbeddedEditUrlRequest {\n"); - sb.append(" allowEditCcs: ").append(toIndentedString(allowEditCcs)).append("\n"); - sb.append(" ccRoles: ").append(toIndentedString(ccRoles)).append("\n"); - sb.append(" editorOptions: ").append(toIndentedString(editorOptions)).append("\n"); - sb.append(" forceSignerRoles: ").append(toIndentedString(forceSignerRoles)).append("\n"); - sb.append(" forceSubjectMessage: ") - .append(toIndentedString(forceSubjectMessage)) - .append("\n"); - sb.append(" mergeFields: ").append(toIndentedString(mergeFields)).append("\n"); - sb.append(" previewOnly: ").append(toIndentedString(previewOnly)).append("\n"); - sb.append(" showPreview: ").append(toIndentedString(showPreview)).append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (allowEditCcs != null) { - if (isFileTypeOrListOfFiles(allowEditCcs)) { - fileTypeFound = true; - } - - if (allowEditCcs.getClass().equals(java.io.File.class) - || allowEditCcs.getClass().equals(Integer.class) - || allowEditCcs.getClass().equals(String.class) - || allowEditCcs.getClass().isEnum()) { - map.put("allow_edit_ccs", allowEditCcs); - } else if (isListOfFile(allowEditCcs)) { - for (int i = 0; i < getListSize(allowEditCcs); i++) { - map.put("allow_edit_ccs[" + i + "]", getFromList(allowEditCcs, i)); - } - } else { - map.put( - "allow_edit_ccs", - JSON.getDefault().getMapper().writeValueAsString(allowEditCcs)); - } - } - if (ccRoles != null) { - if (isFileTypeOrListOfFiles(ccRoles)) { - fileTypeFound = true; - } - - if (ccRoles.getClass().equals(java.io.File.class) - || ccRoles.getClass().equals(Integer.class) - || ccRoles.getClass().equals(String.class) - || ccRoles.getClass().isEnum()) { - map.put("cc_roles", ccRoles); - } else if (isListOfFile(ccRoles)) { - for (int i = 0; i < getListSize(ccRoles); i++) { - map.put("cc_roles[" + i + "]", getFromList(ccRoles, i)); - } - } else { - map.put("cc_roles", JSON.getDefault().getMapper().writeValueAsString(ccRoles)); - } - } - if (editorOptions != null) { - if (isFileTypeOrListOfFiles(editorOptions)) { - fileTypeFound = true; - } - - if (editorOptions.getClass().equals(java.io.File.class) - || editorOptions.getClass().equals(Integer.class) - || editorOptions.getClass().equals(String.class) - || editorOptions.getClass().isEnum()) { - map.put("editor_options", editorOptions); - } else if (isListOfFile(editorOptions)) { - for (int i = 0; i < getListSize(editorOptions); i++) { - map.put("editor_options[" + i + "]", getFromList(editorOptions, i)); - } - } else { - map.put( - "editor_options", - JSON.getDefault().getMapper().writeValueAsString(editorOptions)); - } - } - if (forceSignerRoles != null) { - if (isFileTypeOrListOfFiles(forceSignerRoles)) { - fileTypeFound = true; - } - - if (forceSignerRoles.getClass().equals(java.io.File.class) - || forceSignerRoles.getClass().equals(Integer.class) - || forceSignerRoles.getClass().equals(String.class) - || forceSignerRoles.getClass().isEnum()) { - map.put("force_signer_roles", forceSignerRoles); - } else if (isListOfFile(forceSignerRoles)) { - for (int i = 0; i < getListSize(forceSignerRoles); i++) { - map.put("force_signer_roles[" + i + "]", getFromList(forceSignerRoles, i)); - } - } else { - map.put( - "force_signer_roles", - JSON.getDefault().getMapper().writeValueAsString(forceSignerRoles)); - } - } - if (forceSubjectMessage != null) { - if (isFileTypeOrListOfFiles(forceSubjectMessage)) { - fileTypeFound = true; - } - - if (forceSubjectMessage.getClass().equals(java.io.File.class) - || forceSubjectMessage.getClass().equals(Integer.class) - || forceSubjectMessage.getClass().equals(String.class) - || forceSubjectMessage.getClass().isEnum()) { - map.put("force_subject_message", forceSubjectMessage); - } else if (isListOfFile(forceSubjectMessage)) { - for (int i = 0; i < getListSize(forceSubjectMessage); i++) { - map.put( - "force_subject_message[" + i + "]", - getFromList(forceSubjectMessage, i)); - } - } else { - map.put( - "force_subject_message", - JSON.getDefault().getMapper().writeValueAsString(forceSubjectMessage)); - } - } - if (mergeFields != null) { - if (isFileTypeOrListOfFiles(mergeFields)) { - fileTypeFound = true; - } - - if (mergeFields.getClass().equals(java.io.File.class) - || mergeFields.getClass().equals(Integer.class) - || mergeFields.getClass().equals(String.class) - || mergeFields.getClass().isEnum()) { - map.put("merge_fields", mergeFields); - } else if (isListOfFile(mergeFields)) { - for (int i = 0; i < getListSize(mergeFields); i++) { - map.put("merge_fields[" + i + "]", getFromList(mergeFields, i)); - } - } else { - map.put( - "merge_fields", - JSON.getDefault().getMapper().writeValueAsString(mergeFields)); - } - } - if (previewOnly != null) { - if (isFileTypeOrListOfFiles(previewOnly)) { - fileTypeFound = true; - } - - if (previewOnly.getClass().equals(java.io.File.class) - || previewOnly.getClass().equals(Integer.class) - || previewOnly.getClass().equals(String.class) - || previewOnly.getClass().isEnum()) { - map.put("preview_only", previewOnly); - } else if (isListOfFile(previewOnly)) { - for (int i = 0; i < getListSize(previewOnly); i++) { - map.put("preview_only[" + i + "]", getFromList(previewOnly, i)); - } - } else { - map.put( - "preview_only", - JSON.getDefault().getMapper().writeValueAsString(previewOnly)); - } - } - if (showPreview != null) { - if (isFileTypeOrListOfFiles(showPreview)) { - fileTypeFound = true; - } - - if (showPreview.getClass().equals(java.io.File.class) - || showPreview.getClass().equals(Integer.class) - || showPreview.getClass().equals(String.class) - || showPreview.getClass().isEnum()) { - map.put("show_preview", showPreview); - } else if (isListOfFile(showPreview)) { - for (int i = 0; i < getListSize(showPreview); i++) { - map.put("show_preview[" + i + "]", getFromList(showPreview, i)); - } - } else { - map.put( - "show_preview", - JSON.getDefault().getMapper().writeValueAsString(showPreview)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java deleted file mode 100644 index a16cac937..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** EmbeddedEditUrlResponse */ -@JsonPropertyOrder({ - EmbeddedEditUrlResponse.JSON_PROPERTY_EMBEDDED, - EmbeddedEditUrlResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddedEditUrlResponse { - public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedEditUrlResponseEmbedded embedded; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public EmbeddedEditUrlResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EmbeddedEditUrlResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EmbeddedEditUrlResponse.class); - } - - public static EmbeddedEditUrlResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlResponse.class); - } - - public EmbeddedEditUrlResponse embedded(EmbeddedEditUrlResponseEmbedded embedded) { - this.embedded = embedded; - return this; - } - - /** - * Get embedded - * - * @return embedded - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EmbeddedEditUrlResponseEmbedded getEmbedded() { - return embedded; - } - - @JsonProperty(JSON_PROPERTY_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedEditUrlResponseEmbedded embedded) { - this.embedded = embedded; - } - - public EmbeddedEditUrlResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public EmbeddedEditUrlResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this EmbeddedEditUrlResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmbeddedEditUrlResponse embeddedEditUrlResponse = (EmbeddedEditUrlResponse) o; - return Objects.equals(this.embedded, embeddedEditUrlResponse.embedded) - && Objects.equals(this.warnings, embeddedEditUrlResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(embedded, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmbeddedEditUrlResponse {\n"); - sb.append(" embedded: ").append(toIndentedString(embedded)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (embedded != null) { - if (isFileTypeOrListOfFiles(embedded)) { - fileTypeFound = true; - } - - if (embedded.getClass().equals(java.io.File.class) - || embedded.getClass().equals(Integer.class) - || embedded.getClass().equals(String.class) - || embedded.getClass().isEnum()) { - map.put("embedded", embedded); - } else if (isListOfFile(embedded)) { - for (int i = 0; i < getListSize(embedded); i++) { - map.put("embedded[" + i + "]", getFromList(embedded, i)); - } - } else { - map.put("embedded", JSON.getDefault().getMapper().writeValueAsString(embedded)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java deleted file mode 100644 index 7ce01e5f1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An embedded template object. */ -@JsonPropertyOrder({ - EmbeddedEditUrlResponseEmbedded.JSON_PROPERTY_EDIT_URL, - EmbeddedEditUrlResponseEmbedded.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddedEditUrlResponseEmbedded { - public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public EmbeddedEditUrlResponseEmbedded() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EmbeddedEditUrlResponseEmbedded init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EmbeddedEditUrlResponseEmbedded.class); - } - - public static EmbeddedEditUrlResponseEmbedded init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - EmbeddedEditUrlResponseEmbedded.class); - } - - public EmbeddedEditUrlResponseEmbedded editUrl(String editUrl) { - this.editUrl = editUrl; - return this; - } - - /** - * A template url that can be opened in an iFrame. - * - * @return editUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDIT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEditUrl() { - return editUrl; - } - - @JsonProperty(JSON_PROPERTY_EDIT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { - this.editUrl = editUrl; - } - - public EmbeddedEditUrlResponseEmbedded expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * The specific time that the the `edit_url` link expires, in epoch. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this EmbeddedEditUrlResponseEmbedded object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmbeddedEditUrlResponseEmbedded embeddedEditUrlResponseEmbedded = - (EmbeddedEditUrlResponseEmbedded) o; - return Objects.equals(this.editUrl, embeddedEditUrlResponseEmbedded.editUrl) - && Objects.equals(this.expiresAt, embeddedEditUrlResponseEmbedded.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash(editUrl, expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmbeddedEditUrlResponseEmbedded {\n"); - sb.append(" editUrl: ").append(toIndentedString(editUrl)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (editUrl != null) { - if (isFileTypeOrListOfFiles(editUrl)) { - fileTypeFound = true; - } - - if (editUrl.getClass().equals(java.io.File.class) - || editUrl.getClass().equals(Integer.class) - || editUrl.getClass().equals(String.class) - || editUrl.getClass().isEnum()) { - map.put("edit_url", editUrl); - } else if (isListOfFile(editUrl)) { - for (int i = 0; i < getListSize(editUrl); i++) { - map.put("edit_url[" + i + "]", getFromList(editUrl, i)); - } - } else { - map.put("edit_url", JSON.getDefault().getMapper().writeValueAsString(editUrl)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java deleted file mode 100644 index 7e34d2d2d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** EmbeddedSignUrlResponse */ -@JsonPropertyOrder({ - EmbeddedSignUrlResponse.JSON_PROPERTY_EMBEDDED, - EmbeddedSignUrlResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddedSignUrlResponse { - public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedSignUrlResponseEmbedded embedded; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public EmbeddedSignUrlResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EmbeddedSignUrlResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EmbeddedSignUrlResponse.class); - } - - public static EmbeddedSignUrlResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), EmbeddedSignUrlResponse.class); - } - - public EmbeddedSignUrlResponse embedded(EmbeddedSignUrlResponseEmbedded embedded) { - this.embedded = embedded; - return this; - } - - /** - * Get embedded - * - * @return embedded - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EmbeddedSignUrlResponseEmbedded getEmbedded() { - return embedded; - } - - @JsonProperty(JSON_PROPERTY_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedSignUrlResponseEmbedded embedded) { - this.embedded = embedded; - } - - public EmbeddedSignUrlResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public EmbeddedSignUrlResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this EmbeddedSignUrlResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmbeddedSignUrlResponse embeddedSignUrlResponse = (EmbeddedSignUrlResponse) o; - return Objects.equals(this.embedded, embeddedSignUrlResponse.embedded) - && Objects.equals(this.warnings, embeddedSignUrlResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(embedded, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmbeddedSignUrlResponse {\n"); - sb.append(" embedded: ").append(toIndentedString(embedded)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (embedded != null) { - if (isFileTypeOrListOfFiles(embedded)) { - fileTypeFound = true; - } - - if (embedded.getClass().equals(java.io.File.class) - || embedded.getClass().equals(Integer.class) - || embedded.getClass().equals(String.class) - || embedded.getClass().isEnum()) { - map.put("embedded", embedded); - } else if (isListOfFile(embedded)) { - for (int i = 0; i < getListSize(embedded); i++) { - map.put("embedded[" + i + "]", getFromList(embedded, i)); - } - } else { - map.put("embedded", JSON.getDefault().getMapper().writeValueAsString(embedded)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java deleted file mode 100644 index 716bd324d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An object that contains necessary information to set up embedded signing. */ -@JsonPropertyOrder({ - EmbeddedSignUrlResponseEmbedded.JSON_PROPERTY_SIGN_URL, - EmbeddedSignUrlResponseEmbedded.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddedSignUrlResponseEmbedded { - public static final String JSON_PROPERTY_SIGN_URL = "sign_url"; - private String signUrl; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public EmbeddedSignUrlResponseEmbedded() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EmbeddedSignUrlResponseEmbedded init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EmbeddedSignUrlResponseEmbedded.class); - } - - public static EmbeddedSignUrlResponseEmbedded init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - EmbeddedSignUrlResponseEmbedded.class); - } - - public EmbeddedSignUrlResponseEmbedded signUrl(String signUrl) { - this.signUrl = signUrl; - return this; - } - - /** - * A signature url that can be opened in an iFrame. - * - * @return signUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGN_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignUrl() { - return signUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGN_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignUrl(String signUrl) { - this.signUrl = signUrl; - } - - public EmbeddedSignUrlResponseEmbedded expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * The specific time that the the `sign_url` link expires, in epoch. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this EmbeddedSignUrlResponseEmbedded object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EmbeddedSignUrlResponseEmbedded embeddedSignUrlResponseEmbedded = - (EmbeddedSignUrlResponseEmbedded) o; - return Objects.equals(this.signUrl, embeddedSignUrlResponseEmbedded.signUrl) - && Objects.equals(this.expiresAt, embeddedSignUrlResponseEmbedded.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash(signUrl, expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EmbeddedSignUrlResponseEmbedded {\n"); - sb.append(" signUrl: ").append(toIndentedString(signUrl)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signUrl != null) { - if (isFileTypeOrListOfFiles(signUrl)) { - fileTypeFound = true; - } - - if (signUrl.getClass().equals(java.io.File.class) - || signUrl.getClass().equals(Integer.class) - || signUrl.getClass().equals(String.class) - || signUrl.getClass().isEnum()) { - map.put("sign_url", signUrl); - } else if (isListOfFile(signUrl)) { - for (int i = 0; i < getListSize(signUrl); i++) { - map.put("sign_url[" + i + "]", getFromList(signUrl, i)); - } - } else { - map.put("sign_url", JSON.getDefault().getMapper().writeValueAsString(signUrl)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java deleted file mode 100644 index 0536233e0..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** ErrorResponse */ -@JsonPropertyOrder({ErrorResponse.JSON_PROPERTY_ERROR}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ErrorResponse { - public static final String JSON_PROPERTY_ERROR = "error"; - private ErrorResponseError error; - - public ErrorResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ErrorResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ErrorResponse.class); - } - - public static ErrorResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponse.class); - } - - public ErrorResponse error(ErrorResponseError error) { - this.error = error; - return this; - } - - /** - * Get error - * - * @return error - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ErrorResponseError getError() { - return error; - } - - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(ErrorResponseError error) { - this.error = error; - } - - /** Return true if this ErrorResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorResponse errorResponse = (ErrorResponse) o; - return Objects.equals(this.error, errorResponse.error); - } - - @Override - public int hashCode() { - return Objects.hash(error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorResponse {\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (error != null) { - if (isFileTypeOrListOfFiles(error)) { - fileTypeFound = true; - } - - if (error.getClass().equals(java.io.File.class) - || error.getClass().equals(Integer.class) - || error.getClass().equals(String.class) - || error.getClass().isEnum()) { - map.put("error", error); - } else if (isListOfFile(error)) { - for (int i = 0; i < getListSize(error); i++) { - map.put("error[" + i + "]", getFromList(error, i)); - } - } else { - map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java deleted file mode 100644 index 613016529..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Contains information about an error that occurred. */ -@JsonPropertyOrder({ - ErrorResponseError.JSON_PROPERTY_ERROR_MSG, - ErrorResponseError.JSON_PROPERTY_ERROR_NAME, - ErrorResponseError.JSON_PROPERTY_ERROR_PATH -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ErrorResponseError { - public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; - private String errorMsg; - - public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - private String errorName; - - public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; - private String errorPath; - - public ErrorResponseError() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ErrorResponseError init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ErrorResponseError.class); - } - - public static ErrorResponseError init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponseError.class); - } - - public ErrorResponseError errorMsg(String errorMsg) { - this.errorMsg = errorMsg; - return this; - } - - /** - * Message describing an error. - * - * @return errorMsg - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorMsg() { - return errorMsg; - } - - @JsonProperty(JSON_PROPERTY_ERROR_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(String errorMsg) { - this.errorMsg = errorMsg; - } - - public ErrorResponseError errorName(String errorName) { - this.errorName = errorName; - return this; - } - - /** - * Name of the error. - * - * @return errorName - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getErrorName() { - return errorName; - } - - @JsonProperty(JSON_PROPERTY_ERROR_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(String errorName) { - this.errorName = errorName; - } - - public ErrorResponseError errorPath(String errorPath) { - this.errorPath = errorPath; - return this; - } - - /** - * Path at which an error occurred. - * - * @return errorPath - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ERROR_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getErrorPath() { - return errorPath; - } - - @JsonProperty(JSON_PROPERTY_ERROR_PATH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorPath(String errorPath) { - this.errorPath = errorPath; - } - - /** Return true if this ErrorResponseError object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ErrorResponseError errorResponseError = (ErrorResponseError) o; - return Objects.equals(this.errorMsg, errorResponseError.errorMsg) - && Objects.equals(this.errorName, errorResponseError.errorName) - && Objects.equals(this.errorPath, errorResponseError.errorPath); - } - - @Override - public int hashCode() { - return Objects.hash(errorMsg, errorName, errorPath); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorResponseError {\n"); - sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); - sb.append(" errorName: ").append(toIndentedString(errorName)).append("\n"); - sb.append(" errorPath: ").append(toIndentedString(errorPath)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (errorMsg != null) { - if (isFileTypeOrListOfFiles(errorMsg)) { - fileTypeFound = true; - } - - if (errorMsg.getClass().equals(java.io.File.class) - || errorMsg.getClass().equals(Integer.class) - || errorMsg.getClass().equals(String.class) - || errorMsg.getClass().isEnum()) { - map.put("error_msg", errorMsg); - } else if (isListOfFile(errorMsg)) { - for (int i = 0; i < getListSize(errorMsg); i++) { - map.put("error_msg[" + i + "]", getFromList(errorMsg, i)); - } - } else { - map.put( - "error_msg", - JSON.getDefault().getMapper().writeValueAsString(errorMsg)); - } - } - if (errorName != null) { - if (isFileTypeOrListOfFiles(errorName)) { - fileTypeFound = true; - } - - if (errorName.getClass().equals(java.io.File.class) - || errorName.getClass().equals(Integer.class) - || errorName.getClass().equals(String.class) - || errorName.getClass().isEnum()) { - map.put("error_name", errorName); - } else if (isListOfFile(errorName)) { - for (int i = 0; i < getListSize(errorName); i++) { - map.put("error_name[" + i + "]", getFromList(errorName, i)); - } - } else { - map.put( - "error_name", - JSON.getDefault().getMapper().writeValueAsString(errorName)); - } - } - if (errorPath != null) { - if (isFileTypeOrListOfFiles(errorPath)) { - fileTypeFound = true; - } - - if (errorPath.getClass().equals(java.io.File.class) - || errorPath.getClass().equals(Integer.class) - || errorPath.getClass().equals(String.class) - || errorPath.getClass().isEnum()) { - map.put("error_path", errorPath); - } else if (isListOfFile(errorPath)) { - for (int i = 0; i < getListSize(errorPath); i++) { - map.put("error_path[" + i + "]", getFromList(errorPath, i)); - } - } else { - map.put( - "error_path", - JSON.getDefault().getMapper().writeValueAsString(errorPath)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java deleted file mode 100644 index 54c98461f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** EventCallbackRequest */ -@JsonPropertyOrder({ - EventCallbackRequest.JSON_PROPERTY_EVENT, - EventCallbackRequest.JSON_PROPERTY_ACCOUNT, - EventCallbackRequest.JSON_PROPERTY_SIGNATURE_REQUEST, - EventCallbackRequest.JSON_PROPERTY_TEMPLATE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EventCallbackRequest { - public static final String JSON_PROPERTY_EVENT = "event"; - private EventCallbackRequestEvent event; - - public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; - - public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; - - public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; - - public EventCallbackRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EventCallbackRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EventCallbackRequest.class); - } - - public static EventCallbackRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), EventCallbackRequest.class); - } - - public EventCallbackRequest event(EventCallbackRequestEvent event) { - this.event = event; - return this; - } - - /** - * Get event - * - * @return event - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EVENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventCallbackRequestEvent getEvent() { - return event; - } - - @JsonProperty(JSON_PROPERTY_EVENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEvent(EventCallbackRequestEvent event) { - this.event = event; - } - - public EventCallbackRequest account(AccountResponse account) { - this.account = account; - return this; - } - - /** - * Get account - * - * @return account - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AccountResponse getAccount() { - return account; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountResponse account) { - this.account = account; - } - - public EventCallbackRequest signatureRequest(SignatureRequestResponse signatureRequest) { - this.signatureRequest = signatureRequest; - return this; - } - - /** - * Get signatureRequest - * - * @return signatureRequest - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SignatureRequestResponse getSignatureRequest() { - return signatureRequest; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { - this.signatureRequest = signatureRequest; - } - - public EventCallbackRequest template(TemplateResponse template) { - this.template = template; - return this; - } - - /** - * Get template - * - * @return template - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponse getTemplate() { - return template; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplate(TemplateResponse template) { - this.template = template; - } - - /** Return true if this EventCallbackRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventCallbackRequest eventCallbackRequest = (EventCallbackRequest) o; - return Objects.equals(this.event, eventCallbackRequest.event) - && Objects.equals(this.account, eventCallbackRequest.account) - && Objects.equals(this.signatureRequest, eventCallbackRequest.signatureRequest) - && Objects.equals(this.template, eventCallbackRequest.template); - } - - @Override - public int hashCode() { - return Objects.hash(event, account, signatureRequest, template); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventCallbackRequest {\n"); - sb.append(" event: ").append(toIndentedString(event)).append("\n"); - sb.append(" account: ").append(toIndentedString(account)).append("\n"); - sb.append(" signatureRequest: ").append(toIndentedString(signatureRequest)).append("\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (event != null) { - if (isFileTypeOrListOfFiles(event)) { - fileTypeFound = true; - } - - if (event.getClass().equals(java.io.File.class) - || event.getClass().equals(Integer.class) - || event.getClass().equals(String.class) - || event.getClass().isEnum()) { - map.put("event", event); - } else if (isListOfFile(event)) { - for (int i = 0; i < getListSize(event); i++) { - map.put("event[" + i + "]", getFromList(event, i)); - } - } else { - map.put("event", JSON.getDefault().getMapper().writeValueAsString(event)); - } - } - if (account != null) { - if (isFileTypeOrListOfFiles(account)) { - fileTypeFound = true; - } - - if (account.getClass().equals(java.io.File.class) - || account.getClass().equals(Integer.class) - || account.getClass().equals(String.class) - || account.getClass().isEnum()) { - map.put("account", account); - } else if (isListOfFile(account)) { - for (int i = 0; i < getListSize(account); i++) { - map.put("account[" + i + "]", getFromList(account, i)); - } - } else { - map.put("account", JSON.getDefault().getMapper().writeValueAsString(account)); - } - } - if (signatureRequest != null) { - if (isFileTypeOrListOfFiles(signatureRequest)) { - fileTypeFound = true; - } - - if (signatureRequest.getClass().equals(java.io.File.class) - || signatureRequest.getClass().equals(Integer.class) - || signatureRequest.getClass().equals(String.class) - || signatureRequest.getClass().isEnum()) { - map.put("signature_request", signatureRequest); - } else if (isListOfFile(signatureRequest)) { - for (int i = 0; i < getListSize(signatureRequest); i++) { - map.put("signature_request[" + i + "]", getFromList(signatureRequest, i)); - } - } else { - map.put( - "signature_request", - JSON.getDefault().getMapper().writeValueAsString(signatureRequest)); - } - } - if (template != null) { - if (isFileTypeOrListOfFiles(template)) { - fileTypeFound = true; - } - - if (template.getClass().equals(java.io.File.class) - || template.getClass().equals(Integer.class) - || template.getClass().equals(String.class) - || template.getClass().isEnum()) { - map.put("template", template); - } else if (isListOfFile(template)) { - for (int i = 0; i < getListSize(template); i++) { - map.put("template[" + i + "]", getFromList(template, i)); - } - } else { - map.put("template", JSON.getDefault().getMapper().writeValueAsString(template)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java deleted file mode 100644 index a7462562f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Basic information about the event that occurred. */ -@JsonPropertyOrder({ - EventCallbackRequestEvent.JSON_PROPERTY_EVENT_TIME, - EventCallbackRequestEvent.JSON_PROPERTY_EVENT_TYPE, - EventCallbackRequestEvent.JSON_PROPERTY_EVENT_HASH, - EventCallbackRequestEvent.JSON_PROPERTY_EVENT_METADATA -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EventCallbackRequestEvent { - public static final String JSON_PROPERTY_EVENT_TIME = "event_time"; - private String eventTime; - - /** Type of callback event that was triggered. */ - public enum EventTypeEnum { - ACCOUNT_CONFIRMED("account_confirmed"), - - UNKNOWN_ERROR("unknown_error"), - - FILE_ERROR("file_error"), - - SIGN_URL_INVALID("sign_url_invalid"), - - SIGNATURE_REQUEST_VIEWED("signature_request_viewed"), - - SIGNATURE_REQUEST_SIGNED("signature_request_signed"), - - SIGNATURE_REQUEST_SENT("signature_request_sent"), - - SIGNATURE_REQUEST_ALL_SIGNED("signature_request_all_signed"), - - SIGNATURE_REQUEST_EMAIL_BOUNCE("signature_request_email_bounce"), - - SIGNATURE_REQUEST_REMIND("signature_request_remind"), - - SIGNATURE_REQUEST_INCOMPLETE_QES("signature_request_incomplete_qes"), - - SIGNATURE_REQUEST_DESTROYED("signature_request_destroyed"), - - SIGNATURE_REQUEST_CANCELED("signature_request_canceled"), - - SIGNATURE_REQUEST_DOWNLOADABLE("signature_request_downloadable"), - - SIGNATURE_REQUEST_DECLINED("signature_request_declined"), - - SIGNATURE_REQUEST_REASSIGNED("signature_request_reassigned"), - - SIGNATURE_REQUEST_INVALID("signature_request_invalid"), - - SIGNATURE_REQUEST_PREPARED("signature_request_prepared"), - - SIGNATURE_REQUEST_EXPIRED("signature_request_expired"), - - TEMPLATE_CREATED("template_created"), - - TEMPLATE_ERROR("template_error"), - - CALLBACK_TEST("callback_test"), - - SIGNATURE_REQUEST_SIGNER_REMOVED("signature_request_signer_removed"); - - private String value; - - EventTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EventTypeEnum fromValue(String value) { - for (EventTypeEnum b : EventTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; - private EventTypeEnum eventType; - - public static final String JSON_PROPERTY_EVENT_HASH = "event_hash"; - private String eventHash; - - public static final String JSON_PROPERTY_EVENT_METADATA = "event_metadata"; - private EventCallbackRequestEventMetadata eventMetadata; - - public EventCallbackRequestEvent() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EventCallbackRequestEvent init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EventCallbackRequestEvent.class); - } - - public static EventCallbackRequestEvent init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - EventCallbackRequestEvent.class); - } - - public EventCallbackRequestEvent eventTime(String eventTime) { - this.eventTime = eventTime; - return this; - } - - /** - * Time the event was created (using Unix time). - * - * @return eventTime - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EVENT_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventTime() { - return eventTime; - } - - @JsonProperty(JSON_PROPERTY_EVENT_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventTime(String eventTime) { - this.eventTime = eventTime; - } - - public EventCallbackRequestEvent eventType(EventTypeEnum eventType) { - this.eventType = eventType; - return this; - } - - /** - * Type of callback event that was triggered. - * - * @return eventType - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EVENT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EventTypeEnum getEventType() { - return eventType; - } - - @JsonProperty(JSON_PROPERTY_EVENT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventType(EventTypeEnum eventType) { - this.eventType = eventType; - } - - public EventCallbackRequestEvent eventHash(String eventHash) { - this.eventHash = eventHash; - return this; - } - - /** - * Generated hash used to verify source of event data. - * - * @return eventHash - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EVENT_HASH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventHash() { - return eventHash; - } - - @JsonProperty(JSON_PROPERTY_EVENT_HASH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventHash(String eventHash) { - this.eventHash = eventHash; - } - - public EventCallbackRequestEvent eventMetadata( - EventCallbackRequestEventMetadata eventMetadata) { - this.eventMetadata = eventMetadata; - return this; - } - - /** - * Get eventMetadata - * - * @return eventMetadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EVENT_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EventCallbackRequestEventMetadata getEventMetadata() { - return eventMetadata; - } - - @JsonProperty(JSON_PROPERTY_EVENT_METADATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMetadata(EventCallbackRequestEventMetadata eventMetadata) { - this.eventMetadata = eventMetadata; - } - - /** Return true if this EventCallbackRequestEvent object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventCallbackRequestEvent eventCallbackRequestEvent = (EventCallbackRequestEvent) o; - return Objects.equals(this.eventTime, eventCallbackRequestEvent.eventTime) - && Objects.equals(this.eventType, eventCallbackRequestEvent.eventType) - && Objects.equals(this.eventHash, eventCallbackRequestEvent.eventHash) - && Objects.equals(this.eventMetadata, eventCallbackRequestEvent.eventMetadata); - } - - @Override - public int hashCode() { - return Objects.hash(eventTime, eventType, eventHash, eventMetadata); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventCallbackRequestEvent {\n"); - sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); - sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); - sb.append(" eventHash: ").append(toIndentedString(eventHash)).append("\n"); - sb.append(" eventMetadata: ").append(toIndentedString(eventMetadata)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (eventTime != null) { - if (isFileTypeOrListOfFiles(eventTime)) { - fileTypeFound = true; - } - - if (eventTime.getClass().equals(java.io.File.class) - || eventTime.getClass().equals(Integer.class) - || eventTime.getClass().equals(String.class) - || eventTime.getClass().isEnum()) { - map.put("event_time", eventTime); - } else if (isListOfFile(eventTime)) { - for (int i = 0; i < getListSize(eventTime); i++) { - map.put("event_time[" + i + "]", getFromList(eventTime, i)); - } - } else { - map.put( - "event_time", - JSON.getDefault().getMapper().writeValueAsString(eventTime)); - } - } - if (eventType != null) { - if (isFileTypeOrListOfFiles(eventType)) { - fileTypeFound = true; - } - - if (eventType.getClass().equals(java.io.File.class) - || eventType.getClass().equals(Integer.class) - || eventType.getClass().equals(String.class) - || eventType.getClass().isEnum()) { - map.put("event_type", eventType); - } else if (isListOfFile(eventType)) { - for (int i = 0; i < getListSize(eventType); i++) { - map.put("event_type[" + i + "]", getFromList(eventType, i)); - } - } else { - map.put( - "event_type", - JSON.getDefault().getMapper().writeValueAsString(eventType)); - } - } - if (eventHash != null) { - if (isFileTypeOrListOfFiles(eventHash)) { - fileTypeFound = true; - } - - if (eventHash.getClass().equals(java.io.File.class) - || eventHash.getClass().equals(Integer.class) - || eventHash.getClass().equals(String.class) - || eventHash.getClass().isEnum()) { - map.put("event_hash", eventHash); - } else if (isListOfFile(eventHash)) { - for (int i = 0; i < getListSize(eventHash); i++) { - map.put("event_hash[" + i + "]", getFromList(eventHash, i)); - } - } else { - map.put( - "event_hash", - JSON.getDefault().getMapper().writeValueAsString(eventHash)); - } - } - if (eventMetadata != null) { - if (isFileTypeOrListOfFiles(eventMetadata)) { - fileTypeFound = true; - } - - if (eventMetadata.getClass().equals(java.io.File.class) - || eventMetadata.getClass().equals(Integer.class) - || eventMetadata.getClass().equals(String.class) - || eventMetadata.getClass().isEnum()) { - map.put("event_metadata", eventMetadata); - } else if (isListOfFile(eventMetadata)) { - for (int i = 0; i < getListSize(eventMetadata); i++) { - map.put("event_metadata[" + i + "]", getFromList(eventMetadata, i)); - } - } else { - map.put( - "event_metadata", - JSON.getDefault().getMapper().writeValueAsString(eventMetadata)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java deleted file mode 100644 index e92975e77..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Specific metadata about the event. */ -@JsonPropertyOrder({ - EventCallbackRequestEventMetadata.JSON_PROPERTY_RELATED_SIGNATURE_ID, - EventCallbackRequestEventMetadata.JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID, - EventCallbackRequestEventMetadata.JSON_PROPERTY_REPORTED_FOR_APP_ID, - EventCallbackRequestEventMetadata.JSON_PROPERTY_EVENT_MESSAGE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class EventCallbackRequestEventMetadata { - public static final String JSON_PROPERTY_RELATED_SIGNATURE_ID = "related_signature_id"; - private String relatedSignatureId; - - public static final String JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID = "reported_for_account_id"; - private String reportedForAccountId; - - public static final String JSON_PROPERTY_REPORTED_FOR_APP_ID = "reported_for_app_id"; - private String reportedForAppId; - - public static final String JSON_PROPERTY_EVENT_MESSAGE = "event_message"; - private String eventMessage; - - public EventCallbackRequestEventMetadata() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static EventCallbackRequestEventMetadata init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, EventCallbackRequestEventMetadata.class); - } - - public static EventCallbackRequestEventMetadata init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - EventCallbackRequestEventMetadata.class); - } - - public EventCallbackRequestEventMetadata relatedSignatureId(String relatedSignatureId) { - this.relatedSignatureId = relatedSignatureId; - return this; - } - - /** - * Signature ID for a specific signer. Applicable to `signature_request_signed` and - * `signature_request_viewed` events. - * - * @return relatedSignatureId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_RELATED_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRelatedSignatureId() { - return relatedSignatureId; - } - - @JsonProperty(JSON_PROPERTY_RELATED_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelatedSignatureId(String relatedSignatureId) { - this.relatedSignatureId = relatedSignatureId; - } - - public EventCallbackRequestEventMetadata reportedForAccountId(String reportedForAccountId) { - this.reportedForAccountId = reportedForAccountId; - return this; - } - - /** - * Account ID the event was reported for. - * - * @return reportedForAccountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReportedForAccountId() { - return reportedForAccountId; - } - - @JsonProperty(JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAccountId(String reportedForAccountId) { - this.reportedForAccountId = reportedForAccountId; - } - - public EventCallbackRequestEventMetadata reportedForAppId(String reportedForAppId) { - this.reportedForAppId = reportedForAppId; - return this; - } - - /** - * App ID the event was reported for. - * - * @return reportedForAppId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REPORTED_FOR_APP_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReportedForAppId() { - return reportedForAppId; - } - - @JsonProperty(JSON_PROPERTY_REPORTED_FOR_APP_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAppId(String reportedForAppId) { - this.reportedForAppId = reportedForAppId; - } - - public EventCallbackRequestEventMetadata eventMessage(String eventMessage) { - this.eventMessage = eventMessage; - return this; - } - - /** - * Message about a declined or failed (due to error) signature flow. - * - * @return eventMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EVENT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEventMessage() { - return eventMessage; - } - - @JsonProperty(JSON_PROPERTY_EVENT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMessage(String eventMessage) { - this.eventMessage = eventMessage; - } - - /** Return true if this EventCallbackRequestEventMetadata object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EventCallbackRequestEventMetadata eventCallbackRequestEventMetadata = - (EventCallbackRequestEventMetadata) o; - return Objects.equals( - this.relatedSignatureId, - eventCallbackRequestEventMetadata.relatedSignatureId) - && Objects.equals( - this.reportedForAccountId, - eventCallbackRequestEventMetadata.reportedForAccountId) - && Objects.equals( - this.reportedForAppId, eventCallbackRequestEventMetadata.reportedForAppId) - && Objects.equals( - this.eventMessage, eventCallbackRequestEventMetadata.eventMessage); - } - - @Override - public int hashCode() { - return Objects.hash( - relatedSignatureId, reportedForAccountId, reportedForAppId, eventMessage); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventCallbackRequestEventMetadata {\n"); - sb.append(" relatedSignatureId: ") - .append(toIndentedString(relatedSignatureId)) - .append("\n"); - sb.append(" reportedForAccountId: ") - .append(toIndentedString(reportedForAccountId)) - .append("\n"); - sb.append(" reportedForAppId: ").append(toIndentedString(reportedForAppId)).append("\n"); - sb.append(" eventMessage: ").append(toIndentedString(eventMessage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (relatedSignatureId != null) { - if (isFileTypeOrListOfFiles(relatedSignatureId)) { - fileTypeFound = true; - } - - if (relatedSignatureId.getClass().equals(java.io.File.class) - || relatedSignatureId.getClass().equals(Integer.class) - || relatedSignatureId.getClass().equals(String.class) - || relatedSignatureId.getClass().isEnum()) { - map.put("related_signature_id", relatedSignatureId); - } else if (isListOfFile(relatedSignatureId)) { - for (int i = 0; i < getListSize(relatedSignatureId); i++) { - map.put( - "related_signature_id[" + i + "]", - getFromList(relatedSignatureId, i)); - } - } else { - map.put( - "related_signature_id", - JSON.getDefault().getMapper().writeValueAsString(relatedSignatureId)); - } - } - if (reportedForAccountId != null) { - if (isFileTypeOrListOfFiles(reportedForAccountId)) { - fileTypeFound = true; - } - - if (reportedForAccountId.getClass().equals(java.io.File.class) - || reportedForAccountId.getClass().equals(Integer.class) - || reportedForAccountId.getClass().equals(String.class) - || reportedForAccountId.getClass().isEnum()) { - map.put("reported_for_account_id", reportedForAccountId); - } else if (isListOfFile(reportedForAccountId)) { - for (int i = 0; i < getListSize(reportedForAccountId); i++) { - map.put( - "reported_for_account_id[" + i + "]", - getFromList(reportedForAccountId, i)); - } - } else { - map.put( - "reported_for_account_id", - JSON.getDefault().getMapper().writeValueAsString(reportedForAccountId)); - } - } - if (reportedForAppId != null) { - if (isFileTypeOrListOfFiles(reportedForAppId)) { - fileTypeFound = true; - } - - if (reportedForAppId.getClass().equals(java.io.File.class) - || reportedForAppId.getClass().equals(Integer.class) - || reportedForAppId.getClass().equals(String.class) - || reportedForAppId.getClass().isEnum()) { - map.put("reported_for_app_id", reportedForAppId); - } else if (isListOfFile(reportedForAppId)) { - for (int i = 0; i < getListSize(reportedForAppId); i++) { - map.put("reported_for_app_id[" + i + "]", getFromList(reportedForAppId, i)); - } - } else { - map.put( - "reported_for_app_id", - JSON.getDefault().getMapper().writeValueAsString(reportedForAppId)); - } - } - if (eventMessage != null) { - if (isFileTypeOrListOfFiles(eventMessage)) { - fileTypeFound = true; - } - - if (eventMessage.getClass().equals(java.io.File.class) - || eventMessage.getClass().equals(Integer.class) - || eventMessage.getClass().equals(String.class) - || eventMessage.getClass().isEnum()) { - map.put("event_message", eventMessage); - } else if (isListOfFile(eventMessage)) { - for (int i = 0; i < getListSize(eventMessage); i++) { - map.put("event_message[" + i + "]", getFromList(eventMessage, i)); - } - } else { - map.put( - "event_message", - JSON.getDefault().getMapper().writeValueAsString(eventMessage)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java deleted file mode 100644 index c4f86dd50..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxGetResponse */ -@JsonPropertyOrder({FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxGetResponse { - public static final String JSON_PROPERTY_FAX = "fax"; - private FaxResponse fax; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public FaxGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxGetResponse.class); - } - - public static FaxGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxGetResponse.class); - } - - public FaxGetResponse fax(FaxResponse fax) { - this.fax = fax; - return this; - } - - /** - * Get fax - * - * @return fax - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FAX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FaxResponse getFax() { - return fax; - } - - @JsonProperty(JSON_PROPERTY_FAX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFax(FaxResponse fax) { - this.fax = fax; - } - - public FaxGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public FaxGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this FaxGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxGetResponse faxGetResponse = (FaxGetResponse) o; - return Objects.equals(this.fax, faxGetResponse.fax) - && Objects.equals(this.warnings, faxGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(fax, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxGetResponse {\n"); - sb.append(" fax: ").append(toIndentedString(fax)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (fax != null) { - if (isFileTypeOrListOfFiles(fax)) { - fileTypeFound = true; - } - - if (fax.getClass().equals(java.io.File.class) - || fax.getClass().equals(Integer.class) - || fax.getClass().equals(String.class) - || fax.getClass().isEnum()) { - map.put("fax", fax); - } else if (isListOfFile(fax)) { - for (int i = 0; i < getListSize(fax); i++) { - map.put("fax[" + i + "]", getFromList(fax, i)); - } - } else { - map.put("fax", JSON.getDefault().getMapper().writeValueAsString(fax)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java deleted file mode 100644 index d86167c2e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxLineAddUserRequest */ -@JsonPropertyOrder({ - FaxLineAddUserRequest.JSON_PROPERTY_NUMBER, - FaxLineAddUserRequest.JSON_PROPERTY_ACCOUNT_ID, - FaxLineAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineAddUserRequest { - public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; - - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public FaxLineAddUserRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineAddUserRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineAddUserRequest.class); - } - - public static FaxLineAddUserRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), FaxLineAddUserRequest.class); - } - - public FaxLineAddUserRequest number(String number) { - this.number = number; - return this; - } - - /** - * The Fax Line number - * - * @return number - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNumber() { - return number; - } - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { - this.number = number; - } - - public FaxLineAddUserRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public FaxLineAddUserRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Email address - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this FaxLineAddUserRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineAddUserRequest faxLineAddUserRequest = (FaxLineAddUserRequest) o; - return Objects.equals(this.number, faxLineAddUserRequest.number) - && Objects.equals(this.accountId, faxLineAddUserRequest.accountId) - && Objects.equals(this.emailAddress, faxLineAddUserRequest.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(number, accountId, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineAddUserRequest {\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (number != null) { - if (isFileTypeOrListOfFiles(number)) { - fileTypeFound = true; - } - - if (number.getClass().equals(java.io.File.class) - || number.getClass().equals(Integer.class) - || number.getClass().equals(String.class) - || number.getClass().isEnum()) { - map.put("number", number); - } else if (isListOfFile(number)) { - for (int i = 0; i < getListSize(number); i++) { - map.put("number[" + i + "]", getFromList(number, i)); - } - } else { - map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); - } - } - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java deleted file mode 100644 index 2749d7769..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets FaxLineAreaCodeGetCountryEnum */ -public enum FaxLineAreaCodeGetCountryEnum { - CA("CA"), - - US("US"), - - UK("UK"); - - private String value; - - FaxLineAreaCodeGetCountryEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FaxLineAreaCodeGetCountryEnum fromValue(String value) { - for (FaxLineAreaCodeGetCountryEnum b : FaxLineAreaCodeGetCountryEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java deleted file mode 100644 index 6016ba996..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets FaxLineAreaCodeGetProvinceEnum */ -public enum FaxLineAreaCodeGetProvinceEnum { - AB("AB"), - - BC("BC"), - - MB("MB"), - - NB("NB"), - - NL("NL"), - - NT("NT"), - - NS("NS"), - - NU("NU"), - - ON("ON"), - - PE("PE"), - - QC("QC"), - - SK("SK"), - - YT("YT"); - - private String value; - - FaxLineAreaCodeGetProvinceEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FaxLineAreaCodeGetProvinceEnum fromValue(String value) { - for (FaxLineAreaCodeGetProvinceEnum b : FaxLineAreaCodeGetProvinceEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java deleted file mode 100644 index 54674a76b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxLineAreaCodeGetResponse */ -@JsonPropertyOrder({FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineAreaCodeGetResponse { - public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; - private List areaCodes = new ArrayList<>(); - - public FaxLineAreaCodeGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineAreaCodeGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineAreaCodeGetResponse.class); - } - - public static FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - FaxLineAreaCodeGetResponse.class); - } - - public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { - this.areaCodes = areaCodes; - return this; - } - - public FaxLineAreaCodeGetResponse addAreaCodesItem(Integer areaCodesItem) { - if (this.areaCodes == null) { - this.areaCodes = new ArrayList<>(); - } - this.areaCodes.add(areaCodesItem); - return this; - } - - /** - * Get areaCodes - * - * @return areaCodes - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_AREA_CODES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getAreaCodes() { - return areaCodes; - } - - @JsonProperty(JSON_PROPERTY_AREA_CODES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCodes(List areaCodes) { - this.areaCodes = areaCodes; - } - - /** Return true if this FaxLineAreaCodeGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineAreaCodeGetResponse faxLineAreaCodeGetResponse = (FaxLineAreaCodeGetResponse) o; - return Objects.equals(this.areaCodes, faxLineAreaCodeGetResponse.areaCodes); - } - - @Override - public int hashCode() { - return Objects.hash(areaCodes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineAreaCodeGetResponse {\n"); - sb.append(" areaCodes: ").append(toIndentedString(areaCodes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (areaCodes != null) { - if (isFileTypeOrListOfFiles(areaCodes)) { - fileTypeFound = true; - } - - if (areaCodes.getClass().equals(java.io.File.class) - || areaCodes.getClass().equals(Integer.class) - || areaCodes.getClass().equals(String.class) - || areaCodes.getClass().isEnum()) { - map.put("area_codes", areaCodes); - } else if (isListOfFile(areaCodes)) { - for (int i = 0; i < getListSize(areaCodes); i++) { - map.put("area_codes[" + i + "]", getFromList(areaCodes, i)); - } - } else { - map.put( - "area_codes", - JSON.getDefault().getMapper().writeValueAsString(areaCodes)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java deleted file mode 100644 index 2e9da9f6b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets FaxLineAreaCodeGetStateEnum */ -public enum FaxLineAreaCodeGetStateEnum { - AK("AK"), - - AL("AL"), - - AR("AR"), - - AZ("AZ"), - - CA("CA"), - - CO("CO"), - - CT("CT"), - - DC("DC"), - - DE("DE"), - - FL("FL"), - - GA("GA"), - - HI("HI"), - - IA("IA"), - - ID("ID"), - - IL("IL"), - - IN("IN"), - - KS("KS"), - - KY("KY"), - - LA("LA"), - - MA("MA"), - - MD("MD"), - - ME("ME"), - - MI("MI"), - - MN("MN"), - - MO("MO"), - - MS("MS"), - - MT("MT"), - - NC("NC"), - - ND("ND"), - - NE("NE"), - - NH("NH"), - - NJ("NJ"), - - NM("NM"), - - NV("NV"), - - NY("NY"), - - OH("OH"), - - OK("OK"), - - OR("OR"), - - PA("PA"), - - RI("RI"), - - SC("SC"), - - SD("SD"), - - TN("TN"), - - TX("TX"), - - UT("UT"), - - VA("VA"), - - VT("VT"), - - WA("WA"), - - WI("WI"), - - WV("WV"), - - WY("WY"); - - private String value; - - FaxLineAreaCodeGetStateEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FaxLineAreaCodeGetStateEnum fromValue(String value) { - for (FaxLineAreaCodeGetStateEnum b : FaxLineAreaCodeGetStateEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java deleted file mode 100644 index e75ea0d36..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxLineCreateRequest */ -@JsonPropertyOrder({ - FaxLineCreateRequest.JSON_PROPERTY_AREA_CODE, - FaxLineCreateRequest.JSON_PROPERTY_COUNTRY, - FaxLineCreateRequest.JSON_PROPERTY_CITY, - FaxLineCreateRequest.JSON_PROPERTY_ACCOUNT_ID -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineCreateRequest { - public static final String JSON_PROPERTY_AREA_CODE = "area_code"; - private Integer areaCode; - - /** Country of the area code */ - public enum CountryEnum { - CA("CA"), - - US("US"), - - UK("UK"); - - private String value; - - CountryEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static CountryEnum fromValue(String value) { - for (CountryEnum b : CountryEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_COUNTRY = "country"; - private CountryEnum country; - - public static final String JSON_PROPERTY_CITY = "city"; - private String city; - - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public FaxLineCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineCreateRequest.class); - } - - public static FaxLineCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxLineCreateRequest.class); - } - - public FaxLineCreateRequest areaCode(Integer areaCode) { - this.areaCode = areaCode; - return this; - } - - /** - * Area code of the new Fax Line - * - * @return areaCode - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_AREA_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getAreaCode() { - return areaCode; - } - - @JsonProperty(JSON_PROPERTY_AREA_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCode(Integer areaCode) { - this.areaCode = areaCode; - } - - public FaxLineCreateRequest country(CountryEnum country) { - this.country = country; - return this; - } - - /** - * Country of the area code - * - * @return country - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_COUNTRY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public CountryEnum getCountry() { - return country; - } - - @JsonProperty(JSON_PROPERTY_COUNTRY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCountry(CountryEnum country) { - this.country = country; - } - - public FaxLineCreateRequest city(String city) { - this.city = city; - return this; - } - - /** - * City of the area code - * - * @return city - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCity() { - return city; - } - - @JsonProperty(JSON_PROPERTY_CITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCity(String city) { - this.city = city; - } - - public FaxLineCreateRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID of the account that will be assigned this new Fax Line - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - /** Return true if this FaxLineCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineCreateRequest faxLineCreateRequest = (FaxLineCreateRequest) o; - return Objects.equals(this.areaCode, faxLineCreateRequest.areaCode) - && Objects.equals(this.country, faxLineCreateRequest.country) - && Objects.equals(this.city, faxLineCreateRequest.city) - && Objects.equals(this.accountId, faxLineCreateRequest.accountId); - } - - @Override - public int hashCode() { - return Objects.hash(areaCode, country, city, accountId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineCreateRequest {\n"); - sb.append(" areaCode: ").append(toIndentedString(areaCode)).append("\n"); - sb.append(" country: ").append(toIndentedString(country)).append("\n"); - sb.append(" city: ").append(toIndentedString(city)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (areaCode != null) { - if (isFileTypeOrListOfFiles(areaCode)) { - fileTypeFound = true; - } - - if (areaCode.getClass().equals(java.io.File.class) - || areaCode.getClass().equals(Integer.class) - || areaCode.getClass().equals(String.class) - || areaCode.getClass().isEnum()) { - map.put("area_code", areaCode); - } else if (isListOfFile(areaCode)) { - for (int i = 0; i < getListSize(areaCode); i++) { - map.put("area_code[" + i + "]", getFromList(areaCode, i)); - } - } else { - map.put( - "area_code", - JSON.getDefault().getMapper().writeValueAsString(areaCode)); - } - } - if (country != null) { - if (isFileTypeOrListOfFiles(country)) { - fileTypeFound = true; - } - - if (country.getClass().equals(java.io.File.class) - || country.getClass().equals(Integer.class) - || country.getClass().equals(String.class) - || country.getClass().isEnum()) { - map.put("country", country); - } else if (isListOfFile(country)) { - for (int i = 0; i < getListSize(country); i++) { - map.put("country[" + i + "]", getFromList(country, i)); - } - } else { - map.put("country", JSON.getDefault().getMapper().writeValueAsString(country)); - } - } - if (city != null) { - if (isFileTypeOrListOfFiles(city)) { - fileTypeFound = true; - } - - if (city.getClass().equals(java.io.File.class) - || city.getClass().equals(Integer.class) - || city.getClass().equals(String.class) - || city.getClass().isEnum()) { - map.put("city", city); - } else if (isListOfFile(city)) { - for (int i = 0; i < getListSize(city); i++) { - map.put("city[" + i + "]", getFromList(city, i)); - } - } else { - map.put("city", JSON.getDefault().getMapper().writeValueAsString(city)); - } - } - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java deleted file mode 100644 index efd21bff3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxLineDeleteRequest */ -@JsonPropertyOrder({FaxLineDeleteRequest.JSON_PROPERTY_NUMBER}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineDeleteRequest { - public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; - - public FaxLineDeleteRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineDeleteRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineDeleteRequest.class); - } - - public static FaxLineDeleteRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxLineDeleteRequest.class); - } - - public FaxLineDeleteRequest number(String number) { - this.number = number; - return this; - } - - /** - * The Fax Line number - * - * @return number - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNumber() { - return number; - } - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { - this.number = number; - } - - /** Return true if this FaxLineDeleteRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineDeleteRequest faxLineDeleteRequest = (FaxLineDeleteRequest) o; - return Objects.equals(this.number, faxLineDeleteRequest.number); - } - - @Override - public int hashCode() { - return Objects.hash(number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineDeleteRequest {\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (number != null) { - if (isFileTypeOrListOfFiles(number)) { - fileTypeFound = true; - } - - if (number.getClass().equals(java.io.File.class) - || number.getClass().equals(Integer.class) - || number.getClass().equals(String.class) - || number.getClass().isEnum()) { - map.put("number", number); - } else if (isListOfFile(number)) { - for (int i = 0; i < getListSize(number); i++) { - map.put("number[" + i + "]", getFromList(number, i)); - } - } else { - map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java deleted file mode 100644 index 9ad984747..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxLineListResponse */ -@JsonPropertyOrder({ - FaxLineListResponse.JSON_PROPERTY_LIST_INFO, - FaxLineListResponse.JSON_PROPERTY_FAX_LINES, - FaxLineListResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineListResponse { - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; - private List faxLines = new ArrayList<>(); - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; - - public FaxLineListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineListResponse.class); - } - - public static FaxLineListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxLineListResponse.class); - } - - public FaxLineListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public FaxLineListResponse faxLines(List faxLines) { - this.faxLines = faxLines; - return this; - } - - public FaxLineListResponse addFaxLinesItem(FaxLineResponseFaxLine faxLinesItem) { - if (this.faxLines == null) { - this.faxLines = new ArrayList<>(); - } - this.faxLines.add(faxLinesItem); - return this; - } - - /** - * Get faxLines - * - * @return faxLines - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FAX_LINES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getFaxLines() { - return faxLines; - } - - @JsonProperty(JSON_PROPERTY_FAX_LINES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLines(List faxLines) { - this.faxLines = faxLines; - } - - public FaxLineListResponse warnings(WarningResponse warnings) { - this.warnings = warnings; - return this; - } - - /** - * Get warnings - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WarningResponse getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { - this.warnings = warnings; - } - - /** Return true if this FaxLineListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineListResponse faxLineListResponse = (FaxLineListResponse) o; - return Objects.equals(this.listInfo, faxLineListResponse.listInfo) - && Objects.equals(this.faxLines, faxLineListResponse.faxLines) - && Objects.equals(this.warnings, faxLineListResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(listInfo, faxLines, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineListResponse {\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" faxLines: ").append(toIndentedString(faxLines)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (faxLines != null) { - if (isFileTypeOrListOfFiles(faxLines)) { - fileTypeFound = true; - } - - if (faxLines.getClass().equals(java.io.File.class) - || faxLines.getClass().equals(Integer.class) - || faxLines.getClass().equals(String.class) - || faxLines.getClass().isEnum()) { - map.put("fax_lines", faxLines); - } else if (isListOfFile(faxLines)) { - for (int i = 0; i < getListSize(faxLines); i++) { - map.put("fax_lines[" + i + "]", getFromList(faxLines, i)); - } - } else { - map.put( - "fax_lines", - JSON.getDefault().getMapper().writeValueAsString(faxLines)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java deleted file mode 100644 index 14d15e0bd..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxLineRemoveUserRequest */ -@JsonPropertyOrder({ - FaxLineRemoveUserRequest.JSON_PROPERTY_NUMBER, - FaxLineRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, - FaxLineRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineRemoveUserRequest { - public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; - - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public FaxLineRemoveUserRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineRemoveUserRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineRemoveUserRequest.class); - } - - public static FaxLineRemoveUserRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - FaxLineRemoveUserRequest.class); - } - - public FaxLineRemoveUserRequest number(String number) { - this.number = number; - return this; - } - - /** - * The Fax Line number - * - * @return number - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNumber() { - return number; - } - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { - this.number = number; - } - - public FaxLineRemoveUserRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account ID of the user to remove access - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public FaxLineRemoveUserRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Email address of the user to remove access - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this FaxLineRemoveUserRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineRemoveUserRequest faxLineRemoveUserRequest = (FaxLineRemoveUserRequest) o; - return Objects.equals(this.number, faxLineRemoveUserRequest.number) - && Objects.equals(this.accountId, faxLineRemoveUserRequest.accountId) - && Objects.equals(this.emailAddress, faxLineRemoveUserRequest.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(number, accountId, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineRemoveUserRequest {\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (number != null) { - if (isFileTypeOrListOfFiles(number)) { - fileTypeFound = true; - } - - if (number.getClass().equals(java.io.File.class) - || number.getClass().equals(Integer.class) - || number.getClass().equals(String.class) - || number.getClass().isEnum()) { - map.put("number", number); - } else if (isListOfFile(number)) { - for (int i = 0; i < getListSize(number); i++) { - map.put("number[" + i + "]", getFromList(number, i)); - } - } else { - map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); - } - } - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java deleted file mode 100644 index 24837c26f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxLineResponse */ -@JsonPropertyOrder({FaxLineResponse.JSON_PROPERTY_FAX_LINE, FaxLineResponse.JSON_PROPERTY_WARNINGS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineResponse { - public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; - private FaxLineResponseFaxLine faxLine; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; - - public FaxLineResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineResponse.class); - } - - public static FaxLineResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxLineResponse.class); - } - - public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { - this.faxLine = faxLine; - return this; - } - - /** - * Get faxLine - * - * @return faxLine - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FAX_LINE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FaxLineResponseFaxLine getFaxLine() { - return faxLine; - } - - @JsonProperty(JSON_PROPERTY_FAX_LINE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLine(FaxLineResponseFaxLine faxLine) { - this.faxLine = faxLine; - } - - public FaxLineResponse warnings(WarningResponse warnings) { - this.warnings = warnings; - return this; - } - - /** - * Get warnings - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WarningResponse getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { - this.warnings = warnings; - } - - /** Return true if this FaxLineResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineResponse faxLineResponse = (FaxLineResponse) o; - return Objects.equals(this.faxLine, faxLineResponse.faxLine) - && Objects.equals(this.warnings, faxLineResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(faxLine, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineResponse {\n"); - sb.append(" faxLine: ").append(toIndentedString(faxLine)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (faxLine != null) { - if (isFileTypeOrListOfFiles(faxLine)) { - fileTypeFound = true; - } - - if (faxLine.getClass().equals(java.io.File.class) - || faxLine.getClass().equals(Integer.class) - || faxLine.getClass().equals(String.class) - || faxLine.getClass().isEnum()) { - map.put("fax_line", faxLine); - } else if (isListOfFile(faxLine)) { - for (int i = 0; i < getListSize(faxLine); i++) { - map.put("fax_line[" + i + "]", getFromList(faxLine, i)); - } - } else { - map.put("fax_line", JSON.getDefault().getMapper().writeValueAsString(faxLine)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java deleted file mode 100644 index 63ef50b37..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxLineResponseFaxLine */ -@JsonPropertyOrder({ - FaxLineResponseFaxLine.JSON_PROPERTY_NUMBER, - FaxLineResponseFaxLine.JSON_PROPERTY_CREATED_AT, - FaxLineResponseFaxLine.JSON_PROPERTY_UPDATED_AT, - FaxLineResponseFaxLine.JSON_PROPERTY_ACCOUNTS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxLineResponseFaxLine { - public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; - - public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; - - public FaxLineResponseFaxLine() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxLineResponseFaxLine init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxLineResponseFaxLine.class); - } - - public static FaxLineResponseFaxLine init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), FaxLineResponseFaxLine.class); - } - - public FaxLineResponseFaxLine number(String number) { - this.number = number; - return this; - } - - /** - * Number - * - * @return number - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNumber() { - return number; - } - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumber(String number) { - this.number = number; - } - - public FaxLineResponseFaxLine createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Created at - * - * @return createdAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Updated at - * - * @return updatedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUpdatedAt() { - return updatedAt; - } - - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { - this.updatedAt = updatedAt; - } - - public FaxLineResponseFaxLine accounts(List accounts) { - this.accounts = accounts; - return this; - } - - public FaxLineResponseFaxLine addAccountsItem(AccountResponse accountsItem) { - if (this.accounts == null) { - this.accounts = new ArrayList<>(); - } - this.accounts.add(accountsItem); - return this; - } - - /** - * Get accounts - * - * @return accounts - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAccounts() { - return accounts; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { - this.accounts = accounts; - } - - /** Return true if this FaxLineResponseFaxLine object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxLineResponseFaxLine faxLineResponseFaxLine = (FaxLineResponseFaxLine) o; - return Objects.equals(this.number, faxLineResponseFaxLine.number) - && Objects.equals(this.createdAt, faxLineResponseFaxLine.createdAt) - && Objects.equals(this.updatedAt, faxLineResponseFaxLine.updatedAt) - && Objects.equals(this.accounts, faxLineResponseFaxLine.accounts); - } - - @Override - public int hashCode() { - return Objects.hash(number, createdAt, updatedAt, accounts); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxLineResponseFaxLine {\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (number != null) { - if (isFileTypeOrListOfFiles(number)) { - fileTypeFound = true; - } - - if (number.getClass().equals(java.io.File.class) - || number.getClass().equals(Integer.class) - || number.getClass().equals(String.class) - || number.getClass().isEnum()) { - map.put("number", number); - } else if (isListOfFile(number)) { - for (int i = 0; i < getListSize(number); i++) { - map.put("number[" + i + "]", getFromList(number, i)); - } - } else { - map.put("number", JSON.getDefault().getMapper().writeValueAsString(number)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - if (updatedAt != null) { - if (isFileTypeOrListOfFiles(updatedAt)) { - fileTypeFound = true; - } - - if (updatedAt.getClass().equals(java.io.File.class) - || updatedAt.getClass().equals(Integer.class) - || updatedAt.getClass().equals(String.class) - || updatedAt.getClass().isEnum()) { - map.put("updated_at", updatedAt); - } else if (isListOfFile(updatedAt)) { - for (int i = 0; i < getListSize(updatedAt); i++) { - map.put("updated_at[" + i + "]", getFromList(updatedAt, i)); - } - } else { - map.put( - "updated_at", - JSON.getDefault().getMapper().writeValueAsString(updatedAt)); - } - } - if (accounts != null) { - if (isFileTypeOrListOfFiles(accounts)) { - fileTypeFound = true; - } - - if (accounts.getClass().equals(java.io.File.class) - || accounts.getClass().equals(Integer.class) - || accounts.getClass().equals(String.class) - || accounts.getClass().isEnum()) { - map.put("accounts", accounts); - } else if (isListOfFile(accounts)) { - for (int i = 0; i < getListSize(accounts); i++) { - map.put("accounts[" + i + "]", getFromList(accounts, i)); - } - } else { - map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java deleted file mode 100644 index 7da2189b9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxListResponse */ -@JsonPropertyOrder({FaxListResponse.JSON_PROPERTY_FAXES, FaxListResponse.JSON_PROPERTY_LIST_INFO}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxListResponse { - public static final String JSON_PROPERTY_FAXES = "faxes"; - private List faxes = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public FaxListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxListResponse.class); - } - - public static FaxListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxListResponse.class); - } - - public FaxListResponse faxes(List faxes) { - this.faxes = faxes; - return this; - } - - public FaxListResponse addFaxesItem(FaxResponse faxesItem) { - if (this.faxes == null) { - this.faxes = new ArrayList<>(); - } - this.faxes.add(faxesItem); - return this; - } - - /** - * Get faxes - * - * @return faxes - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FAXES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getFaxes() { - return faxes; - } - - @JsonProperty(JSON_PROPERTY_FAXES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxes(List faxes) { - this.faxes = faxes; - } - - public FaxListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - /** Return true if this FaxListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxListResponse faxListResponse = (FaxListResponse) o; - return Objects.equals(this.faxes, faxListResponse.faxes) - && Objects.equals(this.listInfo, faxListResponse.listInfo); - } - - @Override - public int hashCode() { - return Objects.hash(faxes, listInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxListResponse {\n"); - sb.append(" faxes: ").append(toIndentedString(faxes)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (faxes != null) { - if (isFileTypeOrListOfFiles(faxes)) { - fileTypeFound = true; - } - - if (faxes.getClass().equals(java.io.File.class) - || faxes.getClass().equals(Integer.class) - || faxes.getClass().equals(String.class) - || faxes.getClass().isEnum()) { - map.put("faxes", faxes); - } else if (isListOfFile(faxes)) { - for (int i = 0; i < getListSize(faxes); i++) { - map.put("faxes[" + i + "]", getFromList(faxes, i)); - } - } else { - map.put("faxes", JSON.getDefault().getMapper().writeValueAsString(faxes)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java deleted file mode 100644 index ebe69e4dc..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java +++ /dev/null @@ -1,674 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxResponse */ -@JsonPropertyOrder({ - FaxResponse.JSON_PROPERTY_FAX_ID, - FaxResponse.JSON_PROPERTY_TITLE, - FaxResponse.JSON_PROPERTY_ORIGINAL_TITLE, - FaxResponse.JSON_PROPERTY_METADATA, - FaxResponse.JSON_PROPERTY_CREATED_AT, - FaxResponse.JSON_PROPERTY_SENDER, - FaxResponse.JSON_PROPERTY_FILES_URL, - FaxResponse.JSON_PROPERTY_TRANSMISSIONS, - FaxResponse.JSON_PROPERTY_SUBJECT, - FaxResponse.JSON_PROPERTY_MESSAGE, - FaxResponse.JSON_PROPERTY_FINAL_COPY_URI -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxResponse { - public static final String JSON_PROPERTY_FAX_ID = "fax_id"; - private String faxId; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = new HashMap<>(); - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; - - public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; - - public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; - private List transmissions = new ArrayList<>(); - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; - - public FaxResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxResponse.class); - } - - public static FaxResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxResponse.class); - } - - public FaxResponse faxId(String faxId) { - this.faxId = faxId; - return this; - } - - /** - * Fax ID - * - * @return faxId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FAX_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFaxId() { - return faxId; - } - - @JsonProperty(JSON_PROPERTY_FAX_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxId(String faxId) { - this.faxId = faxId; - } - - public FaxResponse title(String title) { - this.title = title; - return this; - } - - /** - * Fax Title - * - * @return title - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(String title) { - this.title = title; - } - - public FaxResponse originalTitle(String originalTitle) { - this.originalTitle = originalTitle; - return this; - } - - /** - * Fax Original Title - * - * @return originalTitle - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOriginalTitle() { - return originalTitle; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOriginalTitle(String originalTitle) { - this.originalTitle = originalTitle; - } - - public FaxResponse metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public FaxResponse putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Fax Metadata - * - * @return metadata - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public FaxResponse createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Fax Created At Timestamp - * - * @return createdAt - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public FaxResponse sender(String sender) { - this.sender = sender; - return this; - } - - /** - * Fax Sender Email - * - * @return sender - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SENDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSender() { - return sender; - } - - @JsonProperty(JSON_PROPERTY_SENDER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSender(String sender) { - this.sender = sender; - } - - public FaxResponse filesUrl(String filesUrl) { - this.filesUrl = filesUrl; - return this; - } - - /** - * Fax Files URL - * - * @return filesUrl - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFilesUrl() { - return filesUrl; - } - - @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFilesUrl(String filesUrl) { - this.filesUrl = filesUrl; - } - - public FaxResponse transmissions(List transmissions) { - this.transmissions = transmissions; - return this; - } - - public FaxResponse addTransmissionsItem(FaxResponseTransmission transmissionsItem) { - if (this.transmissions == null) { - this.transmissions = new ArrayList<>(); - } - this.transmissions.add(transmissionsItem); - return this; - } - - /** - * Fax Transmissions List - * - * @return transmissions - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTransmissions() { - return transmissions; - } - - @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTransmissions(List transmissions) { - this.transmissions = transmissions; - } - - public FaxResponse subject(String subject) { - this.subject = subject; - return this; - } - - /** - * Fax Subject - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public FaxResponse message(String message) { - this.message = message; - return this; - } - - /** - * Fax Message - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public FaxResponse finalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - return this; - } - - /** - * The path where the completed document can be downloaded - * - * @return finalCopyUri - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFinalCopyUri() { - return finalCopyUri; - } - - @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - } - - /** Return true if this FaxResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxResponse faxResponse = (FaxResponse) o; - return Objects.equals(this.faxId, faxResponse.faxId) - && Objects.equals(this.title, faxResponse.title) - && Objects.equals(this.originalTitle, faxResponse.originalTitle) - && Objects.equals(this.metadata, faxResponse.metadata) - && Objects.equals(this.createdAt, faxResponse.createdAt) - && Objects.equals(this.sender, faxResponse.sender) - && Objects.equals(this.filesUrl, faxResponse.filesUrl) - && Objects.equals(this.transmissions, faxResponse.transmissions) - && Objects.equals(this.subject, faxResponse.subject) - && Objects.equals(this.message, faxResponse.message) - && Objects.equals(this.finalCopyUri, faxResponse.finalCopyUri); - } - - @Override - public int hashCode() { - return Objects.hash( - faxId, - title, - originalTitle, - metadata, - createdAt, - sender, - filesUrl, - transmissions, - subject, - message, - finalCopyUri); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxResponse {\n"); - sb.append(" faxId: ").append(toIndentedString(faxId)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); - sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); - sb.append(" transmissions: ").append(toIndentedString(transmissions)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" finalCopyUri: ").append(toIndentedString(finalCopyUri)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (faxId != null) { - if (isFileTypeOrListOfFiles(faxId)) { - fileTypeFound = true; - } - - if (faxId.getClass().equals(java.io.File.class) - || faxId.getClass().equals(Integer.class) - || faxId.getClass().equals(String.class) - || faxId.getClass().isEnum()) { - map.put("fax_id", faxId); - } else if (isListOfFile(faxId)) { - for (int i = 0; i < getListSize(faxId); i++) { - map.put("fax_id[" + i + "]", getFromList(faxId, i)); - } - } else { - map.put("fax_id", JSON.getDefault().getMapper().writeValueAsString(faxId)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (originalTitle != null) { - if (isFileTypeOrListOfFiles(originalTitle)) { - fileTypeFound = true; - } - - if (originalTitle.getClass().equals(java.io.File.class) - || originalTitle.getClass().equals(Integer.class) - || originalTitle.getClass().equals(String.class) - || originalTitle.getClass().isEnum()) { - map.put("original_title", originalTitle); - } else if (isListOfFile(originalTitle)) { - for (int i = 0; i < getListSize(originalTitle); i++) { - map.put("original_title[" + i + "]", getFromList(originalTitle, i)); - } - } else { - map.put( - "original_title", - JSON.getDefault().getMapper().writeValueAsString(originalTitle)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - if (sender != null) { - if (isFileTypeOrListOfFiles(sender)) { - fileTypeFound = true; - } - - if (sender.getClass().equals(java.io.File.class) - || sender.getClass().equals(Integer.class) - || sender.getClass().equals(String.class) - || sender.getClass().isEnum()) { - map.put("sender", sender); - } else if (isListOfFile(sender)) { - for (int i = 0; i < getListSize(sender); i++) { - map.put("sender[" + i + "]", getFromList(sender, i)); - } - } else { - map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); - } - } - if (filesUrl != null) { - if (isFileTypeOrListOfFiles(filesUrl)) { - fileTypeFound = true; - } - - if (filesUrl.getClass().equals(java.io.File.class) - || filesUrl.getClass().equals(Integer.class) - || filesUrl.getClass().equals(String.class) - || filesUrl.getClass().isEnum()) { - map.put("files_url", filesUrl); - } else if (isListOfFile(filesUrl)) { - for (int i = 0; i < getListSize(filesUrl); i++) { - map.put("files_url[" + i + "]", getFromList(filesUrl, i)); - } - } else { - map.put( - "files_url", - JSON.getDefault().getMapper().writeValueAsString(filesUrl)); - } - } - if (transmissions != null) { - if (isFileTypeOrListOfFiles(transmissions)) { - fileTypeFound = true; - } - - if (transmissions.getClass().equals(java.io.File.class) - || transmissions.getClass().equals(Integer.class) - || transmissions.getClass().equals(String.class) - || transmissions.getClass().isEnum()) { - map.put("transmissions", transmissions); - } else if (isListOfFile(transmissions)) { - for (int i = 0; i < getListSize(transmissions); i++) { - map.put("transmissions[" + i + "]", getFromList(transmissions, i)); - } - } else { - map.put( - "transmissions", - JSON.getDefault().getMapper().writeValueAsString(transmissions)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (finalCopyUri != null) { - if (isFileTypeOrListOfFiles(finalCopyUri)) { - fileTypeFound = true; - } - - if (finalCopyUri.getClass().equals(java.io.File.class) - || finalCopyUri.getClass().equals(Integer.class) - || finalCopyUri.getClass().equals(String.class) - || finalCopyUri.getClass().isEnum()) { - map.put("final_copy_uri", finalCopyUri); - } else if (isListOfFile(finalCopyUri)) { - for (int i = 0; i < getListSize(finalCopyUri); i++) { - map.put("final_copy_uri[" + i + "]", getFromList(finalCopyUri, i)); - } - } else { - map.put( - "final_copy_uri", - JSON.getDefault().getMapper().writeValueAsString(finalCopyUri)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java deleted file mode 100644 index 684e2ba86..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FaxResponseTransmission */ -@JsonPropertyOrder({ - FaxResponseTransmission.JSON_PROPERTY_RECIPIENT, - FaxResponseTransmission.JSON_PROPERTY_STATUS_CODE, - FaxResponseTransmission.JSON_PROPERTY_SENT_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxResponseTransmission { - public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; - - /** Fax Transmission Status Code */ - public enum StatusCodeEnum { - SUCCESS("success"), - - TRANSMITTING("transmitting"), - - ERROR_COULD_NOT_FAX("error_could_not_fax"), - - ERROR_UNKNOWN("error_unknown"), - - ERROR_BUSY("error_busy"), - - ERROR_NO_ANSWER("error_no_answer"), - - ERROR_DISCONNECTED("error_disconnected"), - - ERROR_BAD_DESTINATION("error_bad_destination"); - - private String value; - - StatusCodeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusCodeEnum fromValue(String value) { - for (StatusCodeEnum b : StatusCodeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private StatusCodeEnum statusCode; - - public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; - - public FaxResponseTransmission() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxResponseTransmission init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxResponseTransmission.class); - } - - public static FaxResponseTransmission init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), FaxResponseTransmission.class); - } - - public FaxResponseTransmission recipient(String recipient) { - this.recipient = recipient; - return this; - } - - /** - * Fax Transmission Recipient - * - * @return recipient - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_RECIPIENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRecipient() { - return recipient; - } - - @JsonProperty(JSON_PROPERTY_RECIPIENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { - this.recipient = recipient; - } - - public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Fax Transmission Status Code - * - * @return statusCode - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public StatusCodeEnum getStatusCode() { - return statusCode; - } - - @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatusCode(StatusCodeEnum statusCode) { - this.statusCode = statusCode; - } - - public FaxResponseTransmission sentAt(Integer sentAt) { - this.sentAt = sentAt; - return this; - } - - /** - * Fax Transmission Sent Timestamp - * - * @return sentAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENT_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSentAt() { - return sentAt; - } - - @JsonProperty(JSON_PROPERTY_SENT_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { - this.sentAt = sentAt; - } - - /** Return true if this FaxResponseTransmission object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxResponseTransmission faxResponseTransmission = (FaxResponseTransmission) o; - return Objects.equals(this.recipient, faxResponseTransmission.recipient) - && Objects.equals(this.statusCode, faxResponseTransmission.statusCode) - && Objects.equals(this.sentAt, faxResponseTransmission.sentAt); - } - - @Override - public int hashCode() { - return Objects.hash(recipient, statusCode, sentAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxResponseTransmission {\n"); - sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append(" sentAt: ").append(toIndentedString(sentAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (recipient != null) { - if (isFileTypeOrListOfFiles(recipient)) { - fileTypeFound = true; - } - - if (recipient.getClass().equals(java.io.File.class) - || recipient.getClass().equals(Integer.class) - || recipient.getClass().equals(String.class) - || recipient.getClass().isEnum()) { - map.put("recipient", recipient); - } else if (isListOfFile(recipient)) { - for (int i = 0; i < getListSize(recipient); i++) { - map.put("recipient[" + i + "]", getFromList(recipient, i)); - } - } else { - map.put( - "recipient", - JSON.getDefault().getMapper().writeValueAsString(recipient)); - } - } - if (statusCode != null) { - if (isFileTypeOrListOfFiles(statusCode)) { - fileTypeFound = true; - } - - if (statusCode.getClass().equals(java.io.File.class) - || statusCode.getClass().equals(Integer.class) - || statusCode.getClass().equals(String.class) - || statusCode.getClass().isEnum()) { - map.put("status_code", statusCode); - } else if (isListOfFile(statusCode)) { - for (int i = 0; i < getListSize(statusCode); i++) { - map.put("status_code[" + i + "]", getFromList(statusCode, i)); - } - } else { - map.put( - "status_code", - JSON.getDefault().getMapper().writeValueAsString(statusCode)); - } - } - if (sentAt != null) { - if (isFileTypeOrListOfFiles(sentAt)) { - fileTypeFound = true; - } - - if (sentAt.getClass().equals(java.io.File.class) - || sentAt.getClass().equals(Integer.class) - || sentAt.getClass().equals(String.class) - || sentAt.getClass().isEnum()) { - map.put("sent_at", sentAt); - } else if (isListOfFile(sentAt)) { - for (int i = 0; i < getListSize(sentAt); i++) { - map.put("sent_at[" + i + "]", getFromList(sentAt, i)); - } - } else { - map.put("sent_at", JSON.getDefault().getMapper().writeValueAsString(sentAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java deleted file mode 100644 index b668e9ff7..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** FaxSendRequest */ -@JsonPropertyOrder({ - FaxSendRequest.JSON_PROPERTY_RECIPIENT, - FaxSendRequest.JSON_PROPERTY_SENDER, - FaxSendRequest.JSON_PROPERTY_FILES, - FaxSendRequest.JSON_PROPERTY_FILE_URLS, - FaxSendRequest.JSON_PROPERTY_TEST_MODE, - FaxSendRequest.JSON_PROPERTY_COVER_PAGE_TO, - FaxSendRequest.JSON_PROPERTY_COVER_PAGE_FROM, - FaxSendRequest.JSON_PROPERTY_COVER_PAGE_MESSAGE, - FaxSendRequest.JSON_PROPERTY_TITLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FaxSendRequest { - public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; - - public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; - private String coverPageTo; - - public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; - private String coverPageFrom; - - public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; - private String coverPageMessage; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public FaxSendRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FaxSendRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FaxSendRequest.class); - } - - public static FaxSendRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FaxSendRequest.class); - } - - public FaxSendRequest recipient(String recipient) { - this.recipient = recipient; - return this; - } - - /** - * Recipient of the fax Can be a phone number in E.164 format or email address - * - * @return recipient - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_RECIPIENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRecipient() { - return recipient; - } - - @JsonProperty(JSON_PROPERTY_RECIPIENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { - this.recipient = recipient; - } - - public FaxSendRequest sender(String sender) { - this.sender = sender; - return this; - } - - /** - * Fax Send From Sender (used only with fax number) - * - * @return sender - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSender() { - return sender; - } - - @JsonProperty(JSON_PROPERTY_SENDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSender(String sender) { - this.sender = sender; - } - - public FaxSendRequest files(List files) { - this.files = files; - return this; - } - - public FaxSendRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to fax This endpoint requires either - * **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public FaxSendRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public FaxSendRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Fax download the file(s) to fax This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public FaxSendRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * API Test Mode Setting - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public FaxSendRequest coverPageTo(String coverPageTo) { - this.coverPageTo = coverPageTo; - return this; - } - - /** - * Fax cover page recipient information - * - * @return coverPageTo - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCoverPageTo() { - return coverPageTo; - } - - @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageTo(String coverPageTo) { - this.coverPageTo = coverPageTo; - } - - public FaxSendRequest coverPageFrom(String coverPageFrom) { - this.coverPageFrom = coverPageFrom; - return this; - } - - /** - * Fax cover page sender information - * - * @return coverPageFrom - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCoverPageFrom() { - return coverPageFrom; - } - - @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageFrom(String coverPageFrom) { - this.coverPageFrom = coverPageFrom; - } - - public FaxSendRequest coverPageMessage(String coverPageMessage) { - this.coverPageMessage = coverPageMessage; - return this; - } - - /** - * Fax Cover Page Message - * - * @return coverPageMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCoverPageMessage() { - return coverPageMessage; - } - - @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageMessage(String coverPageMessage) { - this.coverPageMessage = coverPageMessage; - } - - public FaxSendRequest title(String title) { - this.title = title; - return this; - } - - /** - * Fax Title - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - /** Return true if this FaxSendRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FaxSendRequest faxSendRequest = (FaxSendRequest) o; - return Objects.equals(this.recipient, faxSendRequest.recipient) - && Objects.equals(this.sender, faxSendRequest.sender) - && Objects.equals(this.files, faxSendRequest.files) - && Objects.equals(this.fileUrls, faxSendRequest.fileUrls) - && Objects.equals(this.testMode, faxSendRequest.testMode) - && Objects.equals(this.coverPageTo, faxSendRequest.coverPageTo) - && Objects.equals(this.coverPageFrom, faxSendRequest.coverPageFrom) - && Objects.equals(this.coverPageMessage, faxSendRequest.coverPageMessage) - && Objects.equals(this.title, faxSendRequest.title); - } - - @Override - public int hashCode() { - return Objects.hash( - recipient, - sender, - files, - fileUrls, - testMode, - coverPageTo, - coverPageFrom, - coverPageMessage, - title); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FaxSendRequest {\n"); - sb.append(" recipient: ").append(toIndentedString(recipient)).append("\n"); - sb.append(" sender: ").append(toIndentedString(sender)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" coverPageTo: ").append(toIndentedString(coverPageTo)).append("\n"); - sb.append(" coverPageFrom: ").append(toIndentedString(coverPageFrom)).append("\n"); - sb.append(" coverPageMessage: ").append(toIndentedString(coverPageMessage)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (recipient != null) { - if (isFileTypeOrListOfFiles(recipient)) { - fileTypeFound = true; - } - - if (recipient.getClass().equals(java.io.File.class) - || recipient.getClass().equals(Integer.class) - || recipient.getClass().equals(String.class) - || recipient.getClass().isEnum()) { - map.put("recipient", recipient); - } else if (isListOfFile(recipient)) { - for (int i = 0; i < getListSize(recipient); i++) { - map.put("recipient[" + i + "]", getFromList(recipient, i)); - } - } else { - map.put( - "recipient", - JSON.getDefault().getMapper().writeValueAsString(recipient)); - } - } - if (sender != null) { - if (isFileTypeOrListOfFiles(sender)) { - fileTypeFound = true; - } - - if (sender.getClass().equals(java.io.File.class) - || sender.getClass().equals(Integer.class) - || sender.getClass().equals(String.class) - || sender.getClass().isEnum()) { - map.put("sender", sender); - } else if (isListOfFile(sender)) { - for (int i = 0; i < getListSize(sender); i++) { - map.put("sender[" + i + "]", getFromList(sender, i)); - } - } else { - map.put("sender", JSON.getDefault().getMapper().writeValueAsString(sender)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (coverPageTo != null) { - if (isFileTypeOrListOfFiles(coverPageTo)) { - fileTypeFound = true; - } - - if (coverPageTo.getClass().equals(java.io.File.class) - || coverPageTo.getClass().equals(Integer.class) - || coverPageTo.getClass().equals(String.class) - || coverPageTo.getClass().isEnum()) { - map.put("cover_page_to", coverPageTo); - } else if (isListOfFile(coverPageTo)) { - for (int i = 0; i < getListSize(coverPageTo); i++) { - map.put("cover_page_to[" + i + "]", getFromList(coverPageTo, i)); - } - } else { - map.put( - "cover_page_to", - JSON.getDefault().getMapper().writeValueAsString(coverPageTo)); - } - } - if (coverPageFrom != null) { - if (isFileTypeOrListOfFiles(coverPageFrom)) { - fileTypeFound = true; - } - - if (coverPageFrom.getClass().equals(java.io.File.class) - || coverPageFrom.getClass().equals(Integer.class) - || coverPageFrom.getClass().equals(String.class) - || coverPageFrom.getClass().isEnum()) { - map.put("cover_page_from", coverPageFrom); - } else if (isListOfFile(coverPageFrom)) { - for (int i = 0; i < getListSize(coverPageFrom); i++) { - map.put("cover_page_from[" + i + "]", getFromList(coverPageFrom, i)); - } - } else { - map.put( - "cover_page_from", - JSON.getDefault().getMapper().writeValueAsString(coverPageFrom)); - } - } - if (coverPageMessage != null) { - if (isFileTypeOrListOfFiles(coverPageMessage)) { - fileTypeFound = true; - } - - if (coverPageMessage.getClass().equals(java.io.File.class) - || coverPageMessage.getClass().equals(Integer.class) - || coverPageMessage.getClass().equals(String.class) - || coverPageMessage.getClass().isEnum()) { - map.put("cover_page_message", coverPageMessage); - } else if (isListOfFile(coverPageMessage)) { - for (int i = 0; i < getListSize(coverPageMessage); i++) { - map.put("cover_page_message[" + i + "]", getFromList(coverPageMessage, i)); - } - } else { - map.put( - "cover_page_message", - JSON.getDefault().getMapper().writeValueAsString(coverPageMessage)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java deleted file mode 100644 index 15282d488..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FileResponse */ -@JsonPropertyOrder({FileResponse.JSON_PROPERTY_FILE_URL, FileResponse.JSON_PROPERTY_EXPIRES_AT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FileResponse { - public static final String JSON_PROPERTY_FILE_URL = "file_url"; - private String fileUrl; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public FileResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FileResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FileResponse.class); - } - - public static FileResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FileResponse.class); - } - - public FileResponse fileUrl(String fileUrl) { - this.fileUrl = fileUrl; - return this; - } - - /** - * URL to the file. - * - * @return fileUrl - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FILE_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getFileUrl() { - return fileUrl; - } - - @JsonProperty(JSON_PROPERTY_FILE_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFileUrl(String fileUrl) { - this.fileUrl = fileUrl; - } - - public FileResponse expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the link expires. - * - * @return expiresAt - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this FileResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileResponse fileResponse = (FileResponse) o; - return Objects.equals(this.fileUrl, fileResponse.fileUrl) - && Objects.equals(this.expiresAt, fileResponse.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash(fileUrl, expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileResponse {\n"); - sb.append(" fileUrl: ").append(toIndentedString(fileUrl)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (fileUrl != null) { - if (isFileTypeOrListOfFiles(fileUrl)) { - fileTypeFound = true; - } - - if (fileUrl.getClass().equals(java.io.File.class) - || fileUrl.getClass().equals(Integer.class) - || fileUrl.getClass().equals(String.class) - || fileUrl.getClass().isEnum()) { - map.put("file_url", fileUrl); - } else if (isListOfFile(fileUrl)) { - for (int i = 0; i < getListSize(fileUrl); i++) { - map.put("file_url[" + i + "]", getFromList(fileUrl, i)); - } - } else { - map.put("file_url", JSON.getDefault().getMapper().writeValueAsString(fileUrl)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java deleted file mode 100644 index 995fca5c7..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** FileResponseDataUri */ -@JsonPropertyOrder({FileResponseDataUri.JSON_PROPERTY_DATA_URI}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class FileResponseDataUri { - public static final String JSON_PROPERTY_DATA_URI = "data_uri"; - private String dataUri; - - public FileResponseDataUri() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static FileResponseDataUri init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, FileResponseDataUri.class); - } - - public static FileResponseDataUri init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), FileResponseDataUri.class); - } - - public FileResponseDataUri dataUri(String dataUri) { - this.dataUri = dataUri; - return this; - } - - /** - * File as base64 encoded string. - * - * @return dataUri - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DATA_URI) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDataUri() { - return dataUri; - } - - @JsonProperty(JSON_PROPERTY_DATA_URI) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDataUri(String dataUri) { - this.dataUri = dataUri; - } - - /** Return true if this FileResponseDataUri object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileResponseDataUri fileResponseDataUri = (FileResponseDataUri) o; - return Objects.equals(this.dataUri, fileResponseDataUri.dataUri); - } - - @Override - public int hashCode() { - return Objects.hash(dataUri); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileResponseDataUri {\n"); - sb.append(" dataUri: ").append(toIndentedString(dataUri)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (dataUri != null) { - if (isFileTypeOrListOfFiles(dataUri)) { - fileTypeFound = true; - } - - if (dataUri.getClass().equals(java.io.File.class) - || dataUri.getClass().equals(Integer.class) - || dataUri.getClass().equals(String.class) - || dataUri.getClass().isEnum()) { - map.put("data_uri", dataUri); - } else if (isListOfFile(dataUri)) { - for (int i = 0; i < getListSize(dataUri); i++) { - map.put("data_uri[" + i + "]", getFromList(dataUri, i)); - } - } else { - map.put("data_uri", JSON.getDefault().getMapper().writeValueAsString(dataUri)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java deleted file mode 100644 index f8647d314..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Contains pagination information about the data returned. */ -@JsonPropertyOrder({ - ListInfoResponse.JSON_PROPERTY_NUM_PAGES, - ListInfoResponse.JSON_PROPERTY_NUM_RESULTS, - ListInfoResponse.JSON_PROPERTY_PAGE, - ListInfoResponse.JSON_PROPERTY_PAGE_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ListInfoResponse { - public static final String JSON_PROPERTY_NUM_PAGES = "num_pages"; - private Integer numPages; - - public static final String JSON_PROPERTY_NUM_RESULTS = "num_results"; - private Integer numResults; - - public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; - - public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; - private Integer pageSize; - - public ListInfoResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ListInfoResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ListInfoResponse.class); - } - - public static ListInfoResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ListInfoResponse.class); - } - - public ListInfoResponse numPages(Integer numPages) { - this.numPages = numPages; - return this; - } - - /** - * Total number of pages available. - * - * @return numPages - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_PAGES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumPages() { - return numPages; - } - - @JsonProperty(JSON_PROPERTY_NUM_PAGES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumPages(Integer numPages) { - this.numPages = numPages; - } - - public ListInfoResponse numResults(Integer numResults) { - this.numResults = numResults; - return this; - } - - /** - * Total number of objects available. - * - * @return numResults - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumResults() { - return numResults; - } - - @JsonProperty(JSON_PROPERTY_NUM_RESULTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumResults(Integer numResults) { - this.numResults = numResults; - } - - public ListInfoResponse page(Integer page) { - this.page = page; - return this; - } - - /** - * Number of the page being returned. - * - * @return page - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPage() { - return page; - } - - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { - this.page = page; - } - - public ListInfoResponse pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Objects returned per page. - * - * @return pageSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAGE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPageSize() { - return pageSize; - } - - @JsonProperty(JSON_PROPERTY_PAGE_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; - } - - /** Return true if this ListInfoResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListInfoResponse listInfoResponse = (ListInfoResponse) o; - return Objects.equals(this.numPages, listInfoResponse.numPages) - && Objects.equals(this.numResults, listInfoResponse.numResults) - && Objects.equals(this.page, listInfoResponse.page) - && Objects.equals(this.pageSize, listInfoResponse.pageSize); - } - - @Override - public int hashCode() { - return Objects.hash(numPages, numResults, page, pageSize); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListInfoResponse {\n"); - sb.append(" numPages: ").append(toIndentedString(numPages)).append("\n"); - sb.append(" numResults: ").append(toIndentedString(numResults)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (numPages != null) { - if (isFileTypeOrListOfFiles(numPages)) { - fileTypeFound = true; - } - - if (numPages.getClass().equals(java.io.File.class) - || numPages.getClass().equals(Integer.class) - || numPages.getClass().equals(String.class) - || numPages.getClass().isEnum()) { - map.put("num_pages", numPages); - } else if (isListOfFile(numPages)) { - for (int i = 0; i < getListSize(numPages); i++) { - map.put("num_pages[" + i + "]", getFromList(numPages, i)); - } - } else { - map.put( - "num_pages", - JSON.getDefault().getMapper().writeValueAsString(numPages)); - } - } - if (numResults != null) { - if (isFileTypeOrListOfFiles(numResults)) { - fileTypeFound = true; - } - - if (numResults.getClass().equals(java.io.File.class) - || numResults.getClass().equals(Integer.class) - || numResults.getClass().equals(String.class) - || numResults.getClass().isEnum()) { - map.put("num_results", numResults); - } else if (isListOfFile(numResults)) { - for (int i = 0; i < getListSize(numResults); i++) { - map.put("num_results[" + i + "]", getFromList(numResults, i)); - } - } else { - map.put( - "num_results", - JSON.getDefault().getMapper().writeValueAsString(numResults)); - } - } - if (page != null) { - if (isFileTypeOrListOfFiles(page)) { - fileTypeFound = true; - } - - if (page.getClass().equals(java.io.File.class) - || page.getClass().equals(Integer.class) - || page.getClass().equals(String.class) - || page.getClass().isEnum()) { - map.put("page", page); - } else if (isListOfFile(page)) { - for (int i = 0; i < getListSize(page); i++) { - map.put("page[" + i + "]", getFromList(page, i)); - } - } else { - map.put("page", JSON.getDefault().getMapper().writeValueAsString(page)); - } - } - if (pageSize != null) { - if (isFileTypeOrListOfFiles(pageSize)) { - fileTypeFound = true; - } - - if (pageSize.getClass().equals(java.io.File.class) - || pageSize.getClass().equals(Integer.class) - || pageSize.getClass().equals(String.class) - || pageSize.getClass().isEnum()) { - map.put("page_size", pageSize); - } else if (isListOfFile(pageSize)) { - for (int i = 0; i < getListSize(pageSize); i++) { - map.put("page_size[" + i + "]", getFromList(pageSize, i)); - } - } else { - map.put( - "page_size", - JSON.getDefault().getMapper().writeValueAsString(pageSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java deleted file mode 100644 index b3dd4a140..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** OAuthTokenGenerateRequest */ -@JsonPropertyOrder({ - OAuthTokenGenerateRequest.JSON_PROPERTY_CLIENT_ID, - OAuthTokenGenerateRequest.JSON_PROPERTY_CLIENT_SECRET, - OAuthTokenGenerateRequest.JSON_PROPERTY_CODE, - OAuthTokenGenerateRequest.JSON_PROPERTY_GRANT_TYPE, - OAuthTokenGenerateRequest.JSON_PROPERTY_STATE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class OAuthTokenGenerateRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; - - public static final String JSON_PROPERTY_CODE = "code"; - private String code; - - public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "authorization_code"; - - public static final String JSON_PROPERTY_STATE = "state"; - private String state; - - public OAuthTokenGenerateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static OAuthTokenGenerateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthTokenGenerateRequest.class); - } - - public static OAuthTokenGenerateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - OAuthTokenGenerateRequest.class); - } - - public OAuthTokenGenerateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The client id of the app requesting authorization. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public OAuthTokenGenerateRequest clientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * The secret token of your app. - * - * @return clientSecret - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - } - - public OAuthTokenGenerateRequest code(String code) { - this.code = code; - return this; - } - - /** - * The code passed to your callback when the user granted access. - * - * @return code - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { - return code; - } - - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { - this.code = code; - } - - public OAuthTokenGenerateRequest grantType(String grantType) { - this.grantType = grantType; - return this; - } - - /** - * When generating a new token use `authorization_code`. - * - * @return grantType - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GRANT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGrantType() { - return grantType; - } - - @JsonProperty(JSON_PROPERTY_GRANT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { - this.grantType = grantType; - } - - public OAuthTokenGenerateRequest state(String state) { - this.state = state; - return this; - } - - /** - * Same as the state you specified earlier. - * - * @return state - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getState() { - return state; - } - - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setState(String state) { - this.state = state; - } - - /** Return true if this OAuthTokenGenerateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthTokenGenerateRequest oauthTokenGenerateRequest = (OAuthTokenGenerateRequest) o; - return Objects.equals(this.clientId, oauthTokenGenerateRequest.clientId) - && Objects.equals(this.clientSecret, oauthTokenGenerateRequest.clientSecret) - && Objects.equals(this.code, oauthTokenGenerateRequest.code) - && Objects.equals(this.grantType, oauthTokenGenerateRequest.grantType) - && Objects.equals(this.state, oauthTokenGenerateRequest.state); - } - - @Override - public int hashCode() { - return Objects.hash(clientId, clientSecret, code, grantType, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthTokenGenerateRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (clientSecret != null) { - if (isFileTypeOrListOfFiles(clientSecret)) { - fileTypeFound = true; - } - - if (clientSecret.getClass().equals(java.io.File.class) - || clientSecret.getClass().equals(Integer.class) - || clientSecret.getClass().equals(String.class) - || clientSecret.getClass().isEnum()) { - map.put("client_secret", clientSecret); - } else if (isListOfFile(clientSecret)) { - for (int i = 0; i < getListSize(clientSecret); i++) { - map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); - } - } else { - map.put( - "client_secret", - JSON.getDefault().getMapper().writeValueAsString(clientSecret)); - } - } - if (code != null) { - if (isFileTypeOrListOfFiles(code)) { - fileTypeFound = true; - } - - if (code.getClass().equals(java.io.File.class) - || code.getClass().equals(Integer.class) - || code.getClass().equals(String.class) - || code.getClass().isEnum()) { - map.put("code", code); - } else if (isListOfFile(code)) { - for (int i = 0; i < getListSize(code); i++) { - map.put("code[" + i + "]", getFromList(code, i)); - } - } else { - map.put("code", JSON.getDefault().getMapper().writeValueAsString(code)); - } - } - if (grantType != null) { - if (isFileTypeOrListOfFiles(grantType)) { - fileTypeFound = true; - } - - if (grantType.getClass().equals(java.io.File.class) - || grantType.getClass().equals(Integer.class) - || grantType.getClass().equals(String.class) - || grantType.getClass().isEnum()) { - map.put("grant_type", grantType); - } else if (isListOfFile(grantType)) { - for (int i = 0; i < getListSize(grantType); i++) { - map.put("grant_type[" + i + "]", getFromList(grantType, i)); - } - } else { - map.put( - "grant_type", - JSON.getDefault().getMapper().writeValueAsString(grantType)); - } - } - if (state != null) { - if (isFileTypeOrListOfFiles(state)) { - fileTypeFound = true; - } - - if (state.getClass().equals(java.io.File.class) - || state.getClass().equals(Integer.class) - || state.getClass().equals(String.class) - || state.getClass().isEnum()) { - map.put("state", state); - } else if (isListOfFile(state)) { - for (int i = 0; i < getListSize(state); i++) { - map.put("state[" + i + "]", getFromList(state, i)); - } - } else { - map.put("state", JSON.getDefault().getMapper().writeValueAsString(state)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java deleted file mode 100644 index 75979827e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** OAuthTokenRefreshRequest */ -@JsonPropertyOrder({ - OAuthTokenRefreshRequest.JSON_PROPERTY_GRANT_TYPE, - OAuthTokenRefreshRequest.JSON_PROPERTY_REFRESH_TOKEN, - OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_ID, - OAuthTokenRefreshRequest.JSON_PROPERTY_CLIENT_SECRET -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class OAuthTokenRefreshRequest { - public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "refresh_token"; - - public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; - - public OAuthTokenRefreshRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static OAuthTokenRefreshRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthTokenRefreshRequest.class); - } - - public static OAuthTokenRefreshRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - OAuthTokenRefreshRequest.class); - } - - public OAuthTokenRefreshRequest grantType(String grantType) { - this.grantType = grantType; - return this; - } - - /** - * When refreshing an existing token use `refresh_token`. - * - * @return grantType - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GRANT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGrantType() { - return grantType; - } - - @JsonProperty(JSON_PROPERTY_GRANT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { - this.grantType = grantType; - } - - public OAuthTokenRefreshRequest refreshToken(String refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - /** - * The token provided when you got the expired access token. - * - * @return refreshToken - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRefreshToken() { - return refreshToken; - } - - @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - public OAuthTokenRefreshRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the - * \"Client Credentials Required\" setting is enabled for token refresh; optional if - * disabled. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public OAuthTokenRefreshRequest clientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if - * the \"Client Credentials Required\" setting is enabled for token refresh; optional - * if disabled. - * - * @return clientSecret - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientSecret() { - return clientSecret; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - } - - /** Return true if this OAuthTokenRefreshRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthTokenRefreshRequest oauthTokenRefreshRequest = (OAuthTokenRefreshRequest) o; - return Objects.equals(this.grantType, oauthTokenRefreshRequest.grantType) - && Objects.equals(this.refreshToken, oauthTokenRefreshRequest.refreshToken) - && Objects.equals(this.clientId, oauthTokenRefreshRequest.clientId) - && Objects.equals(this.clientSecret, oauthTokenRefreshRequest.clientSecret); - } - - @Override - public int hashCode() { - return Objects.hash(grantType, refreshToken, clientId, clientSecret); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthTokenRefreshRequest {\n"); - sb.append(" grantType: ").append(toIndentedString(grantType)).append("\n"); - sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" clientSecret: ").append(toIndentedString(clientSecret)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (grantType != null) { - if (isFileTypeOrListOfFiles(grantType)) { - fileTypeFound = true; - } - - if (grantType.getClass().equals(java.io.File.class) - || grantType.getClass().equals(Integer.class) - || grantType.getClass().equals(String.class) - || grantType.getClass().isEnum()) { - map.put("grant_type", grantType); - } else if (isListOfFile(grantType)) { - for (int i = 0; i < getListSize(grantType); i++) { - map.put("grant_type[" + i + "]", getFromList(grantType, i)); - } - } else { - map.put( - "grant_type", - JSON.getDefault().getMapper().writeValueAsString(grantType)); - } - } - if (refreshToken != null) { - if (isFileTypeOrListOfFiles(refreshToken)) { - fileTypeFound = true; - } - - if (refreshToken.getClass().equals(java.io.File.class) - || refreshToken.getClass().equals(Integer.class) - || refreshToken.getClass().equals(String.class) - || refreshToken.getClass().isEnum()) { - map.put("refresh_token", refreshToken); - } else if (isListOfFile(refreshToken)) { - for (int i = 0; i < getListSize(refreshToken); i++) { - map.put("refresh_token[" + i + "]", getFromList(refreshToken, i)); - } - } else { - map.put( - "refresh_token", - JSON.getDefault().getMapper().writeValueAsString(refreshToken)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (clientSecret != null) { - if (isFileTypeOrListOfFiles(clientSecret)) { - fileTypeFound = true; - } - - if (clientSecret.getClass().equals(java.io.File.class) - || clientSecret.getClass().equals(Integer.class) - || clientSecret.getClass().equals(String.class) - || clientSecret.getClass().isEnum()) { - map.put("client_secret", clientSecret); - } else if (isListOfFile(clientSecret)) { - for (int i = 0; i < getListSize(clientSecret); i++) { - map.put("client_secret[" + i + "]", getFromList(clientSecret, i)); - } - } else { - map.put( - "client_secret", - JSON.getDefault().getMapper().writeValueAsString(clientSecret)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java deleted file mode 100644 index f7392f322..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java +++ /dev/null @@ -1,359 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** OAuthTokenResponse */ -@JsonPropertyOrder({ - OAuthTokenResponse.JSON_PROPERTY_ACCESS_TOKEN, - OAuthTokenResponse.JSON_PROPERTY_TOKEN_TYPE, - OAuthTokenResponse.JSON_PROPERTY_REFRESH_TOKEN, - OAuthTokenResponse.JSON_PROPERTY_EXPIRES_IN, - OAuthTokenResponse.JSON_PROPERTY_STATE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class OAuthTokenResponse { - public static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token"; - private String accessToken; - - public static final String JSON_PROPERTY_TOKEN_TYPE = "token_type"; - private String tokenType; - - public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; - - public static final String JSON_PROPERTY_EXPIRES_IN = "expires_in"; - private Integer expiresIn; - - public static final String JSON_PROPERTY_STATE = "state"; - private String state; - - public OAuthTokenResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static OAuthTokenResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, OAuthTokenResponse.class); - } - - public static OAuthTokenResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), OAuthTokenResponse.class); - } - - public OAuthTokenResponse accessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Get accessToken - * - * @return accessToken - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccessToken() { - return accessToken; - } - - @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public OAuthTokenResponse tokenType(String tokenType) { - this.tokenType = tokenType; - return this; - } - - /** - * Get tokenType - * - * @return tokenType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTokenType() { - return tokenType; - } - - @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenType(String tokenType) { - this.tokenType = tokenType; - } - - public OAuthTokenResponse refreshToken(String refreshToken) { - this.refreshToken = refreshToken; - return this; - } - - /** - * Get refreshToken - * - * @return refreshToken - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRefreshToken() { - return refreshToken; - } - - @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRefreshToken(String refreshToken) { - this.refreshToken = refreshToken; - } - - public OAuthTokenResponse expiresIn(Integer expiresIn) { - this.expiresIn = expiresIn; - return this; - } - - /** - * Number of seconds until the `access_token` expires. Uses epoch time. - * - * @return expiresIn - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_IN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresIn() { - return expiresIn; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_IN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresIn(Integer expiresIn) { - this.expiresIn = expiresIn; - } - - public OAuthTokenResponse state(String state) { - this.state = state; - return this; - } - - /** - * Get state - * - * @return state - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getState() { - return state; - } - - @JsonProperty(JSON_PROPERTY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setState(String state) { - this.state = state; - } - - /** Return true if this OAuthTokenResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OAuthTokenResponse oauthTokenResponse = (OAuthTokenResponse) o; - return Objects.equals(this.accessToken, oauthTokenResponse.accessToken) - && Objects.equals(this.tokenType, oauthTokenResponse.tokenType) - && Objects.equals(this.refreshToken, oauthTokenResponse.refreshToken) - && Objects.equals(this.expiresIn, oauthTokenResponse.expiresIn) - && Objects.equals(this.state, oauthTokenResponse.state); - } - - @Override - public int hashCode() { - return Objects.hash(accessToken, tokenType, refreshToken, expiresIn, state); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OAuthTokenResponse {\n"); - sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n"); - sb.append(" tokenType: ").append(toIndentedString(tokenType)).append("\n"); - sb.append(" refreshToken: ").append(toIndentedString(refreshToken)).append("\n"); - sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); - sb.append(" state: ").append(toIndentedString(state)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accessToken != null) { - if (isFileTypeOrListOfFiles(accessToken)) { - fileTypeFound = true; - } - - if (accessToken.getClass().equals(java.io.File.class) - || accessToken.getClass().equals(Integer.class) - || accessToken.getClass().equals(String.class) - || accessToken.getClass().isEnum()) { - map.put("access_token", accessToken); - } else if (isListOfFile(accessToken)) { - for (int i = 0; i < getListSize(accessToken); i++) { - map.put("access_token[" + i + "]", getFromList(accessToken, i)); - } - } else { - map.put( - "access_token", - JSON.getDefault().getMapper().writeValueAsString(accessToken)); - } - } - if (tokenType != null) { - if (isFileTypeOrListOfFiles(tokenType)) { - fileTypeFound = true; - } - - if (tokenType.getClass().equals(java.io.File.class) - || tokenType.getClass().equals(Integer.class) - || tokenType.getClass().equals(String.class) - || tokenType.getClass().isEnum()) { - map.put("token_type", tokenType); - } else if (isListOfFile(tokenType)) { - for (int i = 0; i < getListSize(tokenType); i++) { - map.put("token_type[" + i + "]", getFromList(tokenType, i)); - } - } else { - map.put( - "token_type", - JSON.getDefault().getMapper().writeValueAsString(tokenType)); - } - } - if (refreshToken != null) { - if (isFileTypeOrListOfFiles(refreshToken)) { - fileTypeFound = true; - } - - if (refreshToken.getClass().equals(java.io.File.class) - || refreshToken.getClass().equals(Integer.class) - || refreshToken.getClass().equals(String.class) - || refreshToken.getClass().isEnum()) { - map.put("refresh_token", refreshToken); - } else if (isListOfFile(refreshToken)) { - for (int i = 0; i < getListSize(refreshToken); i++) { - map.put("refresh_token[" + i + "]", getFromList(refreshToken, i)); - } - } else { - map.put( - "refresh_token", - JSON.getDefault().getMapper().writeValueAsString(refreshToken)); - } - } - if (expiresIn != null) { - if (isFileTypeOrListOfFiles(expiresIn)) { - fileTypeFound = true; - } - - if (expiresIn.getClass().equals(java.io.File.class) - || expiresIn.getClass().equals(Integer.class) - || expiresIn.getClass().equals(String.class) - || expiresIn.getClass().isEnum()) { - map.put("expires_in", expiresIn); - } else if (isListOfFile(expiresIn)) { - for (int i = 0; i < getListSize(expiresIn); i++) { - map.put("expires_in[" + i + "]", getFromList(expiresIn, i)); - } - } else { - map.put( - "expires_in", - JSON.getDefault().getMapper().writeValueAsString(expiresIn)); - } - } - if (state != null) { - if (isFileTypeOrListOfFiles(state)) { - fileTypeFound = true; - } - - if (state.getClass().equals(java.io.File.class) - || state.getClass().equals(Integer.class) - || state.getClass().equals(String.class) - || state.getClass().isEnum()) { - map.put("state", state); - } else if (isListOfFile(state)) { - for (int i = 0; i < getListSize(state); i++) { - map.put("state[" + i + "]", getFromList(state, i)); - } - } else { - map.put("state", JSON.getDefault().getMapper().writeValueAsString(state)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java deleted file mode 100644 index 293fd1568..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ReportCreateRequest */ -@JsonPropertyOrder({ - ReportCreateRequest.JSON_PROPERTY_END_DATE, - ReportCreateRequest.JSON_PROPERTY_REPORT_TYPE, - ReportCreateRequest.JSON_PROPERTY_START_DATE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportCreateRequest { - public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; - - /** Gets or Sets reportType */ - public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), - - DOCUMENT_STATUS("document_status"); - - private String value; - - ReportTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ReportTypeEnum fromValue(String value) { - for (ReportTypeEnum b : ReportTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = new ArrayList<>(); - - public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; - - public ReportCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ReportCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ReportCreateRequest.class); - } - - public static ReportCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateRequest.class); - } - - public ReportCreateRequest endDate(String endDate) { - this.endDate = endDate; - return this; - } - - /** - * The (inclusive) end date for the report data in `MM/DD/YYYY` format. - * - * @return endDate - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEndDate() { - return endDate; - } - - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - public ReportCreateRequest reportType(List reportType) { - this.reportType = reportType; - return this; - } - - public ReportCreateRequest addReportTypeItem(ReportTypeEnum reportTypeItem) { - if (this.reportType == null) { - this.reportType = new ArrayList<>(); - } - this.reportType.add(reportTypeItem); - return this; - } - - /** - * The type(s) of the report you are requesting. Allowed values are `user_activity` - * and `document_status`. User activity reports contain list of all users and their - * activity during the specified date range. Document status report contain a list of signature - * requests created in the specified time range (and their status). - * - * @return reportType - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REPORT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getReportType() { - return reportType; - } - - @JsonProperty(JSON_PROPERTY_REPORT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReportType(List reportType) { - this.reportType = reportType; - } - - public ReportCreateRequest startDate(String startDate) { - this.startDate = startDate; - return this; - } - - /** - * The (inclusive) start date for the report data in `MM/DD/YYYY` format. - * - * @return startDate - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getStartDate() { - return startDate; - } - - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - /** Return true if this ReportCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReportCreateRequest reportCreateRequest = (ReportCreateRequest) o; - return Objects.equals(this.endDate, reportCreateRequest.endDate) - && Objects.equals(this.reportType, reportCreateRequest.reportType) - && Objects.equals(this.startDate, reportCreateRequest.startDate); - } - - @Override - public int hashCode() { - return Objects.hash(endDate, reportType, startDate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReportCreateRequest {\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" reportType: ").append(toIndentedString(reportType)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (endDate != null) { - if (isFileTypeOrListOfFiles(endDate)) { - fileTypeFound = true; - } - - if (endDate.getClass().equals(java.io.File.class) - || endDate.getClass().equals(Integer.class) - || endDate.getClass().equals(String.class) - || endDate.getClass().isEnum()) { - map.put("end_date", endDate); - } else if (isListOfFile(endDate)) { - for (int i = 0; i < getListSize(endDate); i++) { - map.put("end_date[" + i + "]", getFromList(endDate, i)); - } - } else { - map.put("end_date", JSON.getDefault().getMapper().writeValueAsString(endDate)); - } - } - if (reportType != null) { - if (isFileTypeOrListOfFiles(reportType)) { - fileTypeFound = true; - } - - if (reportType.getClass().equals(java.io.File.class) - || reportType.getClass().equals(Integer.class) - || reportType.getClass().equals(String.class) - || reportType.getClass().isEnum()) { - map.put("report_type", reportType); - } else if (isListOfFile(reportType)) { - for (int i = 0; i < getListSize(reportType); i++) { - map.put("report_type[" + i + "]", getFromList(reportType, i)); - } - } else { - map.put( - "report_type", - JSON.getDefault().getMapper().writeValueAsString(reportType)); - } - } - if (startDate != null) { - if (isFileTypeOrListOfFiles(startDate)) { - fileTypeFound = true; - } - - if (startDate.getClass().equals(java.io.File.class) - || startDate.getClass().equals(Integer.class) - || startDate.getClass().equals(String.class) - || startDate.getClass().isEnum()) { - map.put("start_date", startDate); - } else if (isListOfFile(startDate)) { - for (int i = 0; i < getListSize(startDate); i++) { - map.put("start_date[" + i + "]", getFromList(startDate, i)); - } - } else { - map.put( - "start_date", - JSON.getDefault().getMapper().writeValueAsString(startDate)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java deleted file mode 100644 index 526daf04a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** ReportCreateResponse */ -@JsonPropertyOrder({ - ReportCreateResponse.JSON_PROPERTY_REPORT, - ReportCreateResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportCreateResponse { - public static final String JSON_PROPERTY_REPORT = "report"; - private ReportResponse report; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public ReportCreateResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ReportCreateResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ReportCreateResponse.class); - } - - public static ReportCreateResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateResponse.class); - } - - public ReportCreateResponse report(ReportResponse report) { - this.report = report; - return this; - } - - /** - * Get report - * - * @return report - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REPORT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ReportResponse getReport() { - return report; - } - - @JsonProperty(JSON_PROPERTY_REPORT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReport(ReportResponse report) { - this.report = report; - } - - public ReportCreateResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public ReportCreateResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this ReportCreateResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReportCreateResponse reportCreateResponse = (ReportCreateResponse) o; - return Objects.equals(this.report, reportCreateResponse.report) - && Objects.equals(this.warnings, reportCreateResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(report, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReportCreateResponse {\n"); - sb.append(" report: ").append(toIndentedString(report)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (report != null) { - if (isFileTypeOrListOfFiles(report)) { - fileTypeFound = true; - } - - if (report.getClass().equals(java.io.File.class) - || report.getClass().equals(Integer.class) - || report.getClass().equals(String.class) - || report.getClass().isEnum()) { - map.put("report", report); - } else if (isListOfFile(report)) { - for (int i = 0; i < getListSize(report); i++) { - map.put("report[" + i + "]", getFromList(report, i)); - } - } else { - map.put("report", JSON.getDefault().getMapper().writeValueAsString(report)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java deleted file mode 100644 index aec19023a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains information about the report request. */ -@JsonPropertyOrder({ - ReportResponse.JSON_PROPERTY_SUCCESS, - ReportResponse.JSON_PROPERTY_START_DATE, - ReportResponse.JSON_PROPERTY_END_DATE, - ReportResponse.JSON_PROPERTY_REPORT_TYPE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class ReportResponse { - public static final String JSON_PROPERTY_SUCCESS = "success"; - private String success; - - public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; - - public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; - - /** Gets or Sets reportType */ - public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), - - DOCUMENT_STATUS("document_status"); - - private String value; - - ReportTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ReportTypeEnum fromValue(String value) { - for (ReportTypeEnum b : ReportTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = null; - - public ReportResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static ReportResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, ReportResponse.class); - } - - public static ReportResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), ReportResponse.class); - } - - public ReportResponse success(String success) { - this.success = success; - return this; - } - - /** - * A message indicating the requested operation's success - * - * @return success - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUCCESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSuccess() { - return success; - } - - @JsonProperty(JSON_PROPERTY_SUCCESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(String success) { - this.success = success; - } - - public ReportResponse startDate(String startDate) { - this.startDate = startDate; - return this; - } - - /** - * The (inclusive) start date for the report data in MM/DD/YYYY format. - * - * @return startDate - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStartDate() { - return startDate; - } - - @JsonProperty(JSON_PROPERTY_START_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - public ReportResponse endDate(String endDate) { - this.endDate = endDate; - return this; - } - - /** - * The (inclusive) end date for the report data in MM/DD/YYYY format. - * - * @return endDate - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEndDate() { - return endDate; - } - - @JsonProperty(JSON_PROPERTY_END_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - public ReportResponse reportType(List reportType) { - this.reportType = reportType; - return this; - } - - public ReportResponse addReportTypeItem(ReportTypeEnum reportTypeItem) { - if (this.reportType == null) { - this.reportType = new ArrayList<>(); - } - this.reportType.add(reportTypeItem); - return this; - } - - /** - * The type(s) of the report you are requesting. Allowed values are \"user_activity\" - * and \"document_status\". User activity reports contain list of all users and their - * activity during the specified date range. Document status report contain a list of signature - * requests created in the specified time range (and their status). - * - * @return reportType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REPORT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getReportType() { - return reportType; - } - - @JsonProperty(JSON_PROPERTY_REPORT_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportType(List reportType) { - this.reportType = reportType; - } - - /** Return true if this ReportResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReportResponse reportResponse = (ReportResponse) o; - return Objects.equals(this.success, reportResponse.success) - && Objects.equals(this.startDate, reportResponse.startDate) - && Objects.equals(this.endDate, reportResponse.endDate) - && Objects.equals(this.reportType, reportResponse.reportType); - } - - @Override - public int hashCode() { - return Objects.hash(success, startDate, endDate, reportType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReportResponse {\n"); - sb.append(" success: ").append(toIndentedString(success)).append("\n"); - sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); - sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); - sb.append(" reportType: ").append(toIndentedString(reportType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (success != null) { - if (isFileTypeOrListOfFiles(success)) { - fileTypeFound = true; - } - - if (success.getClass().equals(java.io.File.class) - || success.getClass().equals(Integer.class) - || success.getClass().equals(String.class) - || success.getClass().isEnum()) { - map.put("success", success); - } else if (isListOfFile(success)) { - for (int i = 0; i < getListSize(success); i++) { - map.put("success[" + i + "]", getFromList(success, i)); - } - } else { - map.put("success", JSON.getDefault().getMapper().writeValueAsString(success)); - } - } - if (startDate != null) { - if (isFileTypeOrListOfFiles(startDate)) { - fileTypeFound = true; - } - - if (startDate.getClass().equals(java.io.File.class) - || startDate.getClass().equals(Integer.class) - || startDate.getClass().equals(String.class) - || startDate.getClass().isEnum()) { - map.put("start_date", startDate); - } else if (isListOfFile(startDate)) { - for (int i = 0; i < getListSize(startDate); i++) { - map.put("start_date[" + i + "]", getFromList(startDate, i)); - } - } else { - map.put( - "start_date", - JSON.getDefault().getMapper().writeValueAsString(startDate)); - } - } - if (endDate != null) { - if (isFileTypeOrListOfFiles(endDate)) { - fileTypeFound = true; - } - - if (endDate.getClass().equals(java.io.File.class) - || endDate.getClass().equals(Integer.class) - || endDate.getClass().equals(String.class) - || endDate.getClass().isEnum()) { - map.put("end_date", endDate); - } else if (isListOfFile(endDate)) { - for (int i = 0; i < getListSize(endDate); i++) { - map.put("end_date[" + i + "]", getFromList(endDate, i)); - } - } else { - map.put("end_date", JSON.getDefault().getMapper().writeValueAsString(endDate)); - } - } - if (reportType != null) { - if (isFileTypeOrListOfFiles(reportType)) { - fileTypeFound = true; - } - - if (reportType.getClass().equals(java.io.File.class) - || reportType.getClass().equals(Integer.class) - || reportType.getClass().equals(String.class) - || reportType.getClass().isEnum()) { - map.put("report_type", reportType); - } else if (isListOfFile(reportType)) { - for (int i = 0; i < getListSize(reportType); i++) { - map.put("report_type[" + i + "]", getFromList(reportType, i)); - } - } else { - map.put( - "report_type", - JSON.getDefault().getMapper().writeValueAsString(reportType)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java deleted file mode 100644 index d1d74538d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ /dev/null @@ -1,875 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestBulkCreateEmbeddedWithTemplateRequest */ -@JsonPropertyOrder({ - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNER_FILE, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNER_LIST, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; - - public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestBulkCreateEmbeddedWithTemplateRequest.class); - } - - public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestBulkCreateEmbeddedWithTemplateRequest.class); - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest templateIds( - List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest addTemplateIdsItem( - String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this embedded signature request. Used for - * security purposes. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile(File signerFile) { - this.signerFile = signerFile; - return this; - } - - /** - * `signer_file` is a CSV file defining values and options for signer fields. Required - * unless a `signer_list` is used, you may not use both. The CSV can have the - * following columns: - `name`: the name of the signer filling the role of RoleName - - * `email_address`: email address of the signer filling the role of RoleName - - * `pin`: the 4- to 12-character access code that will secure this signer's - * signature page (optional) - `sms_phone_number`: An E.164 formatted phone number - * that will receive a code via SMS to access this signer's signature page. (optional) By - * using the feature, you agree you are responsible for obtaining a signer's consent to - * receive text messages from Dropbox Sign related to this signature request and confirm you - * have obtained such consent from all signers prior to enabling SMS delivery for this signature - * request. [Learn - * more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). - * **NOTE:** Not available in test mode and requires a Standard plan or higher. - - * `*_field`: any column with a _field\" suffix will be treated as a custom field - * (optional) You may only specify field values here, any other options should be set in the - * custom_fields request parameter. Example CSV: ``` name, email_address, pin, - * company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, - * 123 LLC ``` - * - * @return signerFile - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getSignerFile() { - return signerFile; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { - this.signerFile = signerFile; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerList( - List signerList) { - this.signerList = signerList; - return this; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest addSignerListItem( - SubBulkSignerList signerListItem) { - if (this.signerList == null) { - this.signerList = new ArrayList<>(); - } - this.signerList.add(signerListItem); - return this; - } - - /** - * `signer_list` is an array defining values and options for signer fields. Required - * unless a `signer_file` is used, you may not use both. - * - * @return signerList - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignerList() { - return signerList; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { - this.signerList = signerList; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest allowDecline( - Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - /** - * Return true if this SignatureRequestBulkCreateEmbeddedWithTemplateRequest object is equal to - * o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestBulkCreateEmbeddedWithTemplateRequest - signatureRequestBulkCreateEmbeddedWithTemplateRequest = - (SignatureRequestBulkCreateEmbeddedWithTemplateRequest) o; - return Objects.equals( - this.templateIds, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds) - && Objects.equals( - this.clientId, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId) - && Objects.equals( - this.signerFile, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerFile) - && Objects.equals( - this.signerList, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList) - && Objects.equals( - this.allowDecline, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.allowDecline) - && Objects.equals( - this.ccs, signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs) - && Objects.equals( - this.customFields, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.customFields) - && Objects.equals( - this.message, signatureRequestBulkCreateEmbeddedWithTemplateRequest.message) - && Objects.equals( - this.metadata, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.metadata) - && Objects.equals( - this.signingRedirectUrl, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.signingRedirectUrl) - && Objects.equals( - this.subject, signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject) - && Objects.equals( - this.testMode, - signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode) - && Objects.equals( - this.title, signatureRequestBulkCreateEmbeddedWithTemplateRequest.title); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - clientId, - signerFile, - signerList, - allowDecline, - ccs, - customFields, - message, - metadata, - signingRedirectUrl, - subject, - testMode, - title); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestBulkCreateEmbeddedWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" signerFile: ").append(toIndentedString(signerFile)).append("\n"); - sb.append(" signerList: ").append(toIndentedString(signerList)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (signerFile != null) { - if (isFileTypeOrListOfFiles(signerFile)) { - fileTypeFound = true; - } - - if (signerFile.getClass().equals(java.io.File.class) - || signerFile.getClass().equals(Integer.class) - || signerFile.getClass().equals(String.class) - || signerFile.getClass().isEnum()) { - map.put("signer_file", signerFile); - } else if (isListOfFile(signerFile)) { - for (int i = 0; i < getListSize(signerFile); i++) { - map.put("signer_file[" + i + "]", getFromList(signerFile, i)); - } - } else { - map.put( - "signer_file", - JSON.getDefault().getMapper().writeValueAsString(signerFile)); - } - } - if (signerList != null) { - if (isFileTypeOrListOfFiles(signerList)) { - fileTypeFound = true; - } - - if (signerList.getClass().equals(java.io.File.class) - || signerList.getClass().equals(Integer.class) - || signerList.getClass().equals(String.class) - || signerList.getClass().isEnum()) { - map.put("signer_list", signerList); - } else if (isListOfFile(signerList)) { - for (int i = 0; i < getListSize(signerList); i++) { - map.put("signer_list[" + i + "]", getFromList(signerList, i)); - } - } else { - map.put( - "signer_list", - JSON.getDefault().getMapper().writeValueAsString(signerList)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java deleted file mode 100644 index 0d61875e3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ /dev/null @@ -1,853 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestBulkSendWithTemplateRequest */ -@JsonPropertyOrder({ - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_SIGNER_FILE, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_SIGNER_LIST, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestBulkSendWithTemplateRequest.JSON_PROPERTY_TITLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestBulkSendWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; - - public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public SignatureRequestBulkSendWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestBulkSendWithTemplateRequest init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestBulkSendWithTemplateRequest.class); - } - - public static SignatureRequestBulkSendWithTemplateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestBulkSendWithTemplateRequest.class); - } - - public SignatureRequestBulkSendWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestBulkSendWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestBulkSendWithTemplateRequest signerFile(File signerFile) { - this.signerFile = signerFile; - return this; - } - - /** - * `signer_file` is a CSV file defining values and options for signer fields. Required - * unless a `signer_list` is used, you may not use both. The CSV can have the - * following columns: - `name`: the name of the signer filling the role of RoleName - - * `email_address`: email address of the signer filling the role of RoleName - - * `pin`: the 4- to 12-character access code that will secure this signer's - * signature page (optional) - `sms_phone_number`: An E.164 formatted phone number - * that will receive a code via SMS to access this signer's signature page. (optional) By - * using the feature, you agree you are responsible for obtaining a signer's consent to - * receive text messages from Dropbox Sign related to this signature request and confirm you - * have obtained such consent from all signers prior to enabling SMS delivery for this signature - * request. [Learn - * more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). - * **NOTE:** Not available in test mode and requires a Standard plan or higher. - - * `*_field`: any column with a _field\" suffix will be treated as a custom field - * (optional) You may only specify field values here, any other options should be set in the - * custom_fields request parameter. Example CSV: ``` name, email_address, pin, - * company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, - * 123 LLC ``` - * - * @return signerFile - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public File getSignerFile() { - return signerFile; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { - this.signerFile = signerFile; - } - - public SignatureRequestBulkSendWithTemplateRequest signerList( - List signerList) { - this.signerList = signerList; - return this; - } - - public SignatureRequestBulkSendWithTemplateRequest addSignerListItem( - SubBulkSignerList signerListItem) { - if (this.signerList == null) { - this.signerList = new ArrayList<>(); - } - this.signerList.add(signerListItem); - return this; - } - - /** - * `signer_list` is an array defining values and options for signer fields. Required - * unless a `signer_file` is used, you may not use both. - * - * @return signerList - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignerList() { - return signerList; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { - this.signerList = signerList; - } - - public SignatureRequestBulkSendWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestBulkSendWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestBulkSendWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestBulkSendWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The client id of the API App you want to associate with this request. Used to apply the - * branding and callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestBulkSendWithTemplateRequest customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestBulkSendWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestBulkSendWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestBulkSendWithTemplateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestBulkSendWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestBulkSendWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestBulkSendWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestBulkSendWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestBulkSendWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - /** Return true if this SignatureRequestBulkSendWithTemplateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestBulkSendWithTemplateRequest signatureRequestBulkSendWithTemplateRequest = - (SignatureRequestBulkSendWithTemplateRequest) o; - return Objects.equals( - this.templateIds, signatureRequestBulkSendWithTemplateRequest.templateIds) - && Objects.equals( - this.signerFile, signatureRequestBulkSendWithTemplateRequest.signerFile) - && Objects.equals( - this.signerList, signatureRequestBulkSendWithTemplateRequest.signerList) - && Objects.equals( - this.allowDecline, signatureRequestBulkSendWithTemplateRequest.allowDecline) - && Objects.equals(this.ccs, signatureRequestBulkSendWithTemplateRequest.ccs) - && Objects.equals( - this.clientId, signatureRequestBulkSendWithTemplateRequest.clientId) - && Objects.equals( - this.customFields, signatureRequestBulkSendWithTemplateRequest.customFields) - && Objects.equals(this.message, signatureRequestBulkSendWithTemplateRequest.message) - && Objects.equals( - this.metadata, signatureRequestBulkSendWithTemplateRequest.metadata) - && Objects.equals( - this.signingRedirectUrl, - signatureRequestBulkSendWithTemplateRequest.signingRedirectUrl) - && Objects.equals(this.subject, signatureRequestBulkSendWithTemplateRequest.subject) - && Objects.equals( - this.testMode, signatureRequestBulkSendWithTemplateRequest.testMode) - && Objects.equals(this.title, signatureRequestBulkSendWithTemplateRequest.title); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - signerFile, - signerList, - allowDecline, - ccs, - clientId, - customFields, - message, - metadata, - signingRedirectUrl, - subject, - testMode, - title); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestBulkSendWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" signerFile: ").append(toIndentedString(signerFile)).append("\n"); - sb.append(" signerList: ").append(toIndentedString(signerList)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (signerFile != null) { - if (isFileTypeOrListOfFiles(signerFile)) { - fileTypeFound = true; - } - - if (signerFile.getClass().equals(java.io.File.class) - || signerFile.getClass().equals(Integer.class) - || signerFile.getClass().equals(String.class) - || signerFile.getClass().isEnum()) { - map.put("signer_file", signerFile); - } else if (isListOfFile(signerFile)) { - for (int i = 0; i < getListSize(signerFile); i++) { - map.put("signer_file[" + i + "]", getFromList(signerFile, i)); - } - } else { - map.put( - "signer_file", - JSON.getDefault().getMapper().writeValueAsString(signerFile)); - } - } - if (signerList != null) { - if (isFileTypeOrListOfFiles(signerList)) { - fileTypeFound = true; - } - - if (signerList.getClass().equals(java.io.File.class) - || signerList.getClass().equals(Integer.class) - || signerList.getClass().equals(String.class) - || signerList.getClass().isEnum()) { - map.put("signer_list", signerList); - } else if (isListOfFile(signerList)) { - for (int i = 0; i < getListSize(signerList); i++) { - map.put("signer_list[" + i + "]", getFromList(signerList, i)); - } - } else { - map.put( - "signer_list", - JSON.getDefault().getMapper().writeValueAsString(signerList)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java deleted file mode 100644 index 6652702fb..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java +++ /dev/null @@ -1,1474 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestCreateEmbeddedRequest */ -@JsonPropertyOrder({ - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FILES, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_GROUPED_SIGNERS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_ALLOW_REASSIGN, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_ATTACHMENTS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FIELD_OPTIONS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_RULES, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_METADATA, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_TITLE, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_USE_TEXT_TAGS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, - SignatureRequestCreateEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestCreateEmbeddedRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public SignatureRequestCreateEmbeddedRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestCreateEmbeddedRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestCreateEmbeddedRequest.class); - } - - public static SignatureRequestCreateEmbeddedRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestCreateEmbeddedRequest.class); - } - - public SignatureRequestCreateEmbeddedRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this embedded signature request. Used for - * security purposes. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestCreateEmbeddedRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestCreateEmbeddedRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestCreateEmbeddedRequest signers(List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addSignersItem( - SubSignatureRequestSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestCreateEmbeddedRequest groupedSigners( - List groupedSigners) { - this.groupedSigners = groupedSigners; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addGroupedSignersItem( - SubSignatureRequestGroupedSigners groupedSignersItem) { - if (this.groupedSigners == null) { - this.groupedSigners = new ArrayList<>(); - } - this.groupedSigners.add(groupedSignersItem); - return this; - } - - /** - * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return groupedSigners - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupedSigners() { - return groupedSigners; - } - - @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { - this.groupedSigners = groupedSigners; - } - - public SignatureRequestCreateEmbeddedRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestCreateEmbeddedRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public SignatureRequestCreateEmbeddedRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public SignatureRequestCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addCcEmailAddressesItem( - String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public SignatureRequestCreateEmbeddedRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public SignatureRequestCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public SignatureRequestCreateEmbeddedRequest formFieldRules( - List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addFormFieldRulesItem( - SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public SignatureRequestCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public SignatureRequestCreateEmbeddedRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public SignatureRequestCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way - * can cause unwanted clipping. We recommend leaving this setting on `false` and - * instead hiding your text tags using white text or a similar approach. See the [Text Tags - * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more - * information. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - public SignatureRequestCreateEmbeddedRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestCreateEmbeddedRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestCreateEmbeddedRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestCreateEmbeddedRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestCreateEmbeddedRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestCreateEmbeddedRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestCreateEmbeddedRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document. Defaults to disabled, or `false`. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public SignatureRequestCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - public SignatureRequestCreateEmbeddedRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this SignatureRequestCreateEmbeddedRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestCreateEmbeddedRequest signatureRequestCreateEmbeddedRequest = - (SignatureRequestCreateEmbeddedRequest) o; - return Objects.equals(this.clientId, signatureRequestCreateEmbeddedRequest.clientId) - && Objects.equals(this.files, signatureRequestCreateEmbeddedRequest.files) - && Objects.equals(this.fileUrls, signatureRequestCreateEmbeddedRequest.fileUrls) - && Objects.equals(this.signers, signatureRequestCreateEmbeddedRequest.signers) - && Objects.equals( - this.groupedSigners, signatureRequestCreateEmbeddedRequest.groupedSigners) - && Objects.equals( - this.allowDecline, signatureRequestCreateEmbeddedRequest.allowDecline) - && Objects.equals( - this.allowReassign, signatureRequestCreateEmbeddedRequest.allowReassign) - && Objects.equals( - this.attachments, signatureRequestCreateEmbeddedRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, - signatureRequestCreateEmbeddedRequest.ccEmailAddresses) - && Objects.equals( - this.customFields, signatureRequestCreateEmbeddedRequest.customFields) - && Objects.equals( - this.fieldOptions, signatureRequestCreateEmbeddedRequest.fieldOptions) - && Objects.equals( - this.formFieldGroups, signatureRequestCreateEmbeddedRequest.formFieldGroups) - && Objects.equals( - this.formFieldRules, signatureRequestCreateEmbeddedRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - signatureRequestCreateEmbeddedRequest.formFieldsPerDocument) - && Objects.equals( - this.hideTextTags, signatureRequestCreateEmbeddedRequest.hideTextTags) - && Objects.equals(this.message, signatureRequestCreateEmbeddedRequest.message) - && Objects.equals(this.metadata, signatureRequestCreateEmbeddedRequest.metadata) - && Objects.equals( - this.signingOptions, signatureRequestCreateEmbeddedRequest.signingOptions) - && Objects.equals(this.subject, signatureRequestCreateEmbeddedRequest.subject) - && Objects.equals(this.testMode, signatureRequestCreateEmbeddedRequest.testMode) - && Objects.equals(this.title, signatureRequestCreateEmbeddedRequest.title) - && Objects.equals( - this.useTextTags, signatureRequestCreateEmbeddedRequest.useTextTags) - && Objects.equals( - this.populateAutoFillFields, - signatureRequestCreateEmbeddedRequest.populateAutoFillFields) - && Objects.equals(this.expiresAt, signatureRequestCreateEmbeddedRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - files, - fileUrls, - signers, - groupedSigners, - allowDecline, - allowReassign, - attachments, - ccEmailAddresses, - customFields, - fieldOptions, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - message, - metadata, - signingOptions, - subject, - testMode, - title, - useTextTags, - populateAutoFillFields, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestCreateEmbeddedRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (groupedSigners != null) { - if (isFileTypeOrListOfFiles(groupedSigners)) { - fileTypeFound = true; - } - - if (groupedSigners.getClass().equals(java.io.File.class) - || groupedSigners.getClass().equals(Integer.class) - || groupedSigners.getClass().equals(String.class) - || groupedSigners.getClass().isEnum()) { - map.put("grouped_signers", groupedSigners); - } else if (isListOfFile(groupedSigners)) { - for (int i = 0; i < getListSize(groupedSigners); i++) { - map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); - } - } else { - map.put( - "grouped_signers", - JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java deleted file mode 100644 index 7769adeab..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java +++ /dev/null @@ -1,963 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestCreateEmbeddedWithTemplateRequest */ -@JsonPropertyOrder({ - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FILES, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, - SignatureRequestCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestCreateEmbeddedWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public SignatureRequestCreateEmbeddedWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestCreateEmbeddedWithTemplateRequest init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestCreateEmbeddedWithTemplateRequest.class); - } - - public static SignatureRequestCreateEmbeddedWithTemplateRequest init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestCreateEmbeddedWithTemplateRequest.class); - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addTemplateIdsItem( - String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this embedded signature request. Used for - * security purposes. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest signers( - List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addSignersItem( - SubSignatureRequestTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. - * - * @return signers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array defining values and options for custom fields. Required when a custom field exists - * in the Template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - /** - * Return true if this SignatureRequestCreateEmbeddedWithTemplateRequest object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestCreateEmbeddedWithTemplateRequest - signatureRequestCreateEmbeddedWithTemplateRequest = - (SignatureRequestCreateEmbeddedWithTemplateRequest) o; - return Objects.equals( - this.templateIds, - signatureRequestCreateEmbeddedWithTemplateRequest.templateIds) - && Objects.equals( - this.clientId, signatureRequestCreateEmbeddedWithTemplateRequest.clientId) - && Objects.equals( - this.signers, signatureRequestCreateEmbeddedWithTemplateRequest.signers) - && Objects.equals( - this.allowDecline, - signatureRequestCreateEmbeddedWithTemplateRequest.allowDecline) - && Objects.equals(this.ccs, signatureRequestCreateEmbeddedWithTemplateRequest.ccs) - && Objects.equals( - this.customFields, - signatureRequestCreateEmbeddedWithTemplateRequest.customFields) - && Objects.equals( - this.files, signatureRequestCreateEmbeddedWithTemplateRequest.files) - && Objects.equals( - this.fileUrls, signatureRequestCreateEmbeddedWithTemplateRequest.fileUrls) - && Objects.equals( - this.message, signatureRequestCreateEmbeddedWithTemplateRequest.message) - && Objects.equals( - this.metadata, signatureRequestCreateEmbeddedWithTemplateRequest.metadata) - && Objects.equals( - this.signingOptions, - signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions) - && Objects.equals( - this.subject, signatureRequestCreateEmbeddedWithTemplateRequest.subject) - && Objects.equals( - this.testMode, signatureRequestCreateEmbeddedWithTemplateRequest.testMode) - && Objects.equals( - this.title, signatureRequestCreateEmbeddedWithTemplateRequest.title) - && Objects.equals( - this.populateAutoFillFields, - signatureRequestCreateEmbeddedWithTemplateRequest.populateAutoFillFields); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - clientId, - signers, - allowDecline, - ccs, - customFields, - files, - fileUrls, - message, - metadata, - signingOptions, - subject, - testMode, - title, - populateAutoFillFields); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestCreateEmbeddedWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java deleted file mode 100644 index 6da72cb0f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java +++ /dev/null @@ -1,1471 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestEditEmbeddedRequest */ -@JsonPropertyOrder({ - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILES, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_GROUPED_SIGNERS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ALLOW_REASSIGN, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_ATTACHMENTS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FIELD_OPTIONS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_RULES, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_METADATA, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_TITLE, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_USE_TEXT_TAGS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, - SignatureRequestEditEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestEditEmbeddedRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public SignatureRequestEditEmbeddedRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestEditEmbeddedRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestEditEmbeddedRequest.class); - } - - public static SignatureRequestEditEmbeddedRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestEditEmbeddedRequest.class); - } - - public SignatureRequestEditEmbeddedRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this embedded signature request. Used for - * security purposes. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestEditEmbeddedRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestEditEmbeddedRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestEditEmbeddedRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestEditEmbeddedRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestEditEmbeddedRequest signers(List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestEditEmbeddedRequest addSignersItem( - SubSignatureRequestSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestEditEmbeddedRequest groupedSigners( - List groupedSigners) { - this.groupedSigners = groupedSigners; - return this; - } - - public SignatureRequestEditEmbeddedRequest addGroupedSignersItem( - SubSignatureRequestGroupedSigners groupedSignersItem) { - if (this.groupedSigners == null) { - this.groupedSigners = new ArrayList<>(); - } - this.groupedSigners.add(groupedSignersItem); - return this; - } - - /** - * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return groupedSigners - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupedSigners() { - return groupedSigners; - } - - @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { - this.groupedSigners = groupedSigners; - } - - public SignatureRequestEditEmbeddedRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestEditEmbeddedRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public SignatureRequestEditEmbeddedRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public SignatureRequestEditEmbeddedRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public SignatureRequestEditEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public SignatureRequestEditEmbeddedRequest addCcEmailAddressesItem( - String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public SignatureRequestEditEmbeddedRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestEditEmbeddedRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestEditEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public SignatureRequestEditEmbeddedRequest formFieldGroups( - List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public SignatureRequestEditEmbeddedRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public SignatureRequestEditEmbeddedRequest formFieldRules( - List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public SignatureRequestEditEmbeddedRequest addFormFieldRulesItem( - SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public SignatureRequestEditEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public SignatureRequestEditEmbeddedRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public SignatureRequestEditEmbeddedRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way - * can cause unwanted clipping. We recommend leaving this setting on `false` and - * instead hiding your text tags using white text or a similar approach. See the [Text Tags - * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more - * information. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - public SignatureRequestEditEmbeddedRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestEditEmbeddedRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestEditEmbeddedRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestEditEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestEditEmbeddedRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestEditEmbeddedRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestEditEmbeddedRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestEditEmbeddedRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document. Defaults to disabled, or `false`. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public SignatureRequestEditEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - public SignatureRequestEditEmbeddedRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this SignatureRequestEditEmbeddedRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestEditEmbeddedRequest signatureRequestEditEmbeddedRequest = - (SignatureRequestEditEmbeddedRequest) o; - return Objects.equals(this.clientId, signatureRequestEditEmbeddedRequest.clientId) - && Objects.equals(this.files, signatureRequestEditEmbeddedRequest.files) - && Objects.equals(this.fileUrls, signatureRequestEditEmbeddedRequest.fileUrls) - && Objects.equals(this.signers, signatureRequestEditEmbeddedRequest.signers) - && Objects.equals( - this.groupedSigners, signatureRequestEditEmbeddedRequest.groupedSigners) - && Objects.equals( - this.allowDecline, signatureRequestEditEmbeddedRequest.allowDecline) - && Objects.equals( - this.allowReassign, signatureRequestEditEmbeddedRequest.allowReassign) - && Objects.equals(this.attachments, signatureRequestEditEmbeddedRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, signatureRequestEditEmbeddedRequest.ccEmailAddresses) - && Objects.equals( - this.customFields, signatureRequestEditEmbeddedRequest.customFields) - && Objects.equals( - this.fieldOptions, signatureRequestEditEmbeddedRequest.fieldOptions) - && Objects.equals( - this.formFieldGroups, signatureRequestEditEmbeddedRequest.formFieldGroups) - && Objects.equals( - this.formFieldRules, signatureRequestEditEmbeddedRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - signatureRequestEditEmbeddedRequest.formFieldsPerDocument) - && Objects.equals( - this.hideTextTags, signatureRequestEditEmbeddedRequest.hideTextTags) - && Objects.equals(this.message, signatureRequestEditEmbeddedRequest.message) - && Objects.equals(this.metadata, signatureRequestEditEmbeddedRequest.metadata) - && Objects.equals( - this.signingOptions, signatureRequestEditEmbeddedRequest.signingOptions) - && Objects.equals(this.subject, signatureRequestEditEmbeddedRequest.subject) - && Objects.equals(this.testMode, signatureRequestEditEmbeddedRequest.testMode) - && Objects.equals(this.title, signatureRequestEditEmbeddedRequest.title) - && Objects.equals(this.useTextTags, signatureRequestEditEmbeddedRequest.useTextTags) - && Objects.equals( - this.populateAutoFillFields, - signatureRequestEditEmbeddedRequest.populateAutoFillFields) - && Objects.equals(this.expiresAt, signatureRequestEditEmbeddedRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - files, - fileUrls, - signers, - groupedSigners, - allowDecline, - allowReassign, - attachments, - ccEmailAddresses, - customFields, - fieldOptions, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - message, - metadata, - signingOptions, - subject, - testMode, - title, - useTextTags, - populateAutoFillFields, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestEditEmbeddedRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (groupedSigners != null) { - if (isFileTypeOrListOfFiles(groupedSigners)) { - fileTypeFound = true; - } - - if (groupedSigners.getClass().equals(java.io.File.class) - || groupedSigners.getClass().equals(Integer.class) - || groupedSigners.getClass().equals(String.class) - || groupedSigners.getClass().isEnum()) { - map.put("grouped_signers", groupedSigners); - } else if (isListOfFile(groupedSigners)) { - for (int i = 0; i < getListSize(groupedSigners); i++) { - map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); - } - } else { - map.put( - "grouped_signers", - JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java deleted file mode 100644 index 03e4cccf7..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java +++ /dev/null @@ -1,958 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestEditEmbeddedWithTemplateRequest */ -@JsonPropertyOrder({ - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILES, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, - SignatureRequestEditEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestEditEmbeddedWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public SignatureRequestEditEmbeddedWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestEditEmbeddedWithTemplateRequest init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestEditEmbeddedWithTemplateRequest.class); - } - - public static SignatureRequestEditEmbeddedWithTemplateRequest init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestEditEmbeddedWithTemplateRequest.class); - } - - public SignatureRequestEditEmbeddedWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addTemplateIdsItem( - String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this embedded signature request. Used for - * security purposes. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest signers( - List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addSignersItem( - SubSignatureRequestTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. - * - * @return signers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array defining values and options for custom fields. Required when a custom field exists - * in the Template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestEditEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - /** Return true if this SignatureRequestEditEmbeddedWithTemplateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestEditEmbeddedWithTemplateRequest - signatureRequestEditEmbeddedWithTemplateRequest = - (SignatureRequestEditEmbeddedWithTemplateRequest) o; - return Objects.equals( - this.templateIds, - signatureRequestEditEmbeddedWithTemplateRequest.templateIds) - && Objects.equals( - this.clientId, signatureRequestEditEmbeddedWithTemplateRequest.clientId) - && Objects.equals( - this.signers, signatureRequestEditEmbeddedWithTemplateRequest.signers) - && Objects.equals( - this.allowDecline, - signatureRequestEditEmbeddedWithTemplateRequest.allowDecline) - && Objects.equals(this.ccs, signatureRequestEditEmbeddedWithTemplateRequest.ccs) - && Objects.equals( - this.customFields, - signatureRequestEditEmbeddedWithTemplateRequest.customFields) - && Objects.equals(this.files, signatureRequestEditEmbeddedWithTemplateRequest.files) - && Objects.equals( - this.fileUrls, signatureRequestEditEmbeddedWithTemplateRequest.fileUrls) - && Objects.equals( - this.message, signatureRequestEditEmbeddedWithTemplateRequest.message) - && Objects.equals( - this.metadata, signatureRequestEditEmbeddedWithTemplateRequest.metadata) - && Objects.equals( - this.signingOptions, - signatureRequestEditEmbeddedWithTemplateRequest.signingOptions) - && Objects.equals( - this.subject, signatureRequestEditEmbeddedWithTemplateRequest.subject) - && Objects.equals( - this.testMode, signatureRequestEditEmbeddedWithTemplateRequest.testMode) - && Objects.equals(this.title, signatureRequestEditEmbeddedWithTemplateRequest.title) - && Objects.equals( - this.populateAutoFillFields, - signatureRequestEditEmbeddedWithTemplateRequest.populateAutoFillFields); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - clientId, - signers, - allowDecline, - ccs, - customFields, - files, - fileUrls, - message, - metadata, - signingOptions, - subject, - testMode, - title, - populateAutoFillFields); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestEditEmbeddedWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java deleted file mode 100644 index 92427a9db..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java +++ /dev/null @@ -1,1497 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestEditRequest */ -@JsonPropertyOrder({ - SignatureRequestEditRequest.JSON_PROPERTY_FILES, - SignatureRequestEditRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestEditRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestEditRequest.JSON_PROPERTY_GROUPED_SIGNERS, - SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestEditRequest.JSON_PROPERTY_ALLOW_REASSIGN, - SignatureRequestEditRequest.JSON_PROPERTY_ATTACHMENTS, - SignatureRequestEditRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - SignatureRequestEditRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestEditRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestEditRequest.JSON_PROPERTY_FIELD_OPTIONS, - SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELD_RULES, - SignatureRequestEditRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - SignatureRequestEditRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - SignatureRequestEditRequest.JSON_PROPERTY_IS_EID, - SignatureRequestEditRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestEditRequest.JSON_PROPERTY_METADATA, - SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestEditRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestEditRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestEditRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestEditRequest.JSON_PROPERTY_TITLE, - SignatureRequestEditRequest.JSON_PROPERTY_USE_TEXT_TAGS, - SignatureRequestEditRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestEditRequest { - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public SignatureRequestEditRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestEditRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestEditRequest.class); - } - - public static SignatureRequestEditRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestEditRequest.class); - } - - public SignatureRequestEditRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestEditRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestEditRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestEditRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestEditRequest signers(List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestEditRequest addSignersItem(SubSignatureRequestSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestEditRequest groupedSigners( - List groupedSigners) { - this.groupedSigners = groupedSigners; - return this; - } - - public SignatureRequestEditRequest addGroupedSignersItem( - SubSignatureRequestGroupedSigners groupedSignersItem) { - if (this.groupedSigners == null) { - this.groupedSigners = new ArrayList<>(); - } - this.groupedSigners.add(groupedSignersItem); - return this; - } - - /** - * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return groupedSigners - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupedSigners() { - return groupedSigners; - } - - @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { - this.groupedSigners = groupedSigners; - } - - public SignatureRequestEditRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestEditRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public SignatureRequestEditRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public SignatureRequestEditRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public SignatureRequestEditRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public SignatureRequestEditRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public SignatureRequestEditRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The client id of the API App you want to associate with this request. Used to apply the - * branding and callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestEditRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestEditRequest addCustomFieldsItem(SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestEditRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public SignatureRequestEditRequest formFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public SignatureRequestEditRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public SignatureRequestEditRequest formFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public SignatureRequestEditRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public SignatureRequestEditRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public SignatureRequestEditRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public SignatureRequestEditRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way - * can cause unwanted clipping. We recommend leaving this setting on `false` and - * instead hiding your text tags using white text or a similar approach. See the [Text Tags - * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more - * information. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - public SignatureRequestEditRequest isEid(Boolean isEid) { - this.isEid = isEid; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [electronic identification - * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify - * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only - * available on the Premium API plan. Cannot be used in `test_mode`. Only works on - * requests with one signer. - * - * @return isEid - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEid() { - return isEid; - } - - @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { - this.isEid = isEid; - } - - public SignatureRequestEditRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestEditRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestEditRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestEditRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestEditRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestEditRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestEditRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestEditRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestEditRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document. Defaults to disabled, or `false`. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public SignatureRequestEditRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this SignatureRequestEditRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestEditRequest signatureRequestEditRequest = (SignatureRequestEditRequest) o; - return Objects.equals(this.files, signatureRequestEditRequest.files) - && Objects.equals(this.fileUrls, signatureRequestEditRequest.fileUrls) - && Objects.equals(this.signers, signatureRequestEditRequest.signers) - && Objects.equals(this.groupedSigners, signatureRequestEditRequest.groupedSigners) - && Objects.equals(this.allowDecline, signatureRequestEditRequest.allowDecline) - && Objects.equals(this.allowReassign, signatureRequestEditRequest.allowReassign) - && Objects.equals(this.attachments, signatureRequestEditRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, signatureRequestEditRequest.ccEmailAddresses) - && Objects.equals(this.clientId, signatureRequestEditRequest.clientId) - && Objects.equals(this.customFields, signatureRequestEditRequest.customFields) - && Objects.equals(this.fieldOptions, signatureRequestEditRequest.fieldOptions) - && Objects.equals(this.formFieldGroups, signatureRequestEditRequest.formFieldGroups) - && Objects.equals(this.formFieldRules, signatureRequestEditRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - signatureRequestEditRequest.formFieldsPerDocument) - && Objects.equals(this.hideTextTags, signatureRequestEditRequest.hideTextTags) - && Objects.equals(this.isEid, signatureRequestEditRequest.isEid) - && Objects.equals(this.message, signatureRequestEditRequest.message) - && Objects.equals(this.metadata, signatureRequestEditRequest.metadata) - && Objects.equals(this.signingOptions, signatureRequestEditRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, signatureRequestEditRequest.signingRedirectUrl) - && Objects.equals(this.subject, signatureRequestEditRequest.subject) - && Objects.equals(this.testMode, signatureRequestEditRequest.testMode) - && Objects.equals(this.title, signatureRequestEditRequest.title) - && Objects.equals(this.useTextTags, signatureRequestEditRequest.useTextTags) - && Objects.equals(this.expiresAt, signatureRequestEditRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - files, - fileUrls, - signers, - groupedSigners, - allowDecline, - allowReassign, - attachments, - ccEmailAddresses, - clientId, - customFields, - fieldOptions, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - isEid, - message, - metadata, - signingOptions, - signingRedirectUrl, - subject, - testMode, - title, - useTextTags, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestEditRequest {\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (groupedSigners != null) { - if (isFileTypeOrListOfFiles(groupedSigners)) { - fileTypeFound = true; - } - - if (groupedSigners.getClass().equals(java.io.File.class) - || groupedSigners.getClass().equals(Integer.class) - || groupedSigners.getClass().equals(String.class) - || groupedSigners.getClass().isEnum()) { - map.put("grouped_signers", groupedSigners); - } else if (isListOfFile(groupedSigners)) { - for (int i = 0; i < getListSize(groupedSigners); i++) { - map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); - } - } else { - map.put( - "grouped_signers", - JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (isEid != null) { - if (isFileTypeOrListOfFiles(isEid)) { - fileTypeFound = true; - } - - if (isEid.getClass().equals(java.io.File.class) - || isEid.getClass().equals(Integer.class) - || isEid.getClass().equals(String.class) - || isEid.getClass().isEnum()) { - map.put("is_eid", isEid); - } else if (isListOfFile(isEid)) { - for (int i = 0; i < getListSize(isEid); i++) { - map.put("is_eid[" + i + "]", getFromList(isEid, i)); - } - } else { - map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java deleted file mode 100644 index 3621d0d2f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java +++ /dev/null @@ -1,983 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** */ -@JsonPropertyOrder({ - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILES, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_IS_EID, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestEditWithTemplateRequest.JSON_PROPERTY_TITLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestEditWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public SignatureRequestEditWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestEditWithTemplateRequest init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestEditWithTemplateRequest.class); - } - - public static SignatureRequestEditWithTemplateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestEditWithTemplateRequest.class); - } - - public SignatureRequestEditWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestEditWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestEditWithTemplateRequest signers( - List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestEditWithTemplateRequest addSignersItem( - SubSignatureRequestTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. - * - * @return signers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestEditWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestEditWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestEditWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestEditWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app to associate with the signature request. Used to apply the branding and - * callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestEditWithTemplateRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestEditWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array defining values and options for custom fields. Required when a custom field exists - * in the Template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestEditWithTemplateRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestEditWithTemplateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestEditWithTemplateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestEditWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestEditWithTemplateRequest isEid(Boolean isEid) { - this.isEid = isEid; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [electronic identification - * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify - * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only - * available on the Premium API plan. Cannot be used in `test_mode`. Only works on - * requests with one signer. - * - * @return isEid - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEid() { - return isEid; - } - - @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { - this.isEid = isEid; - } - - public SignatureRequestEditWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestEditWithTemplateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestEditWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestEditWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestEditWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestEditWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestEditWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestEditWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - /** Return true if this SignatureRequestEditWithTemplateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestEditWithTemplateRequest signatureRequestEditWithTemplateRequest = - (SignatureRequestEditWithTemplateRequest) o; - return Objects.equals(this.templateIds, signatureRequestEditWithTemplateRequest.templateIds) - && Objects.equals(this.signers, signatureRequestEditWithTemplateRequest.signers) - && Objects.equals( - this.allowDecline, signatureRequestEditWithTemplateRequest.allowDecline) - && Objects.equals(this.ccs, signatureRequestEditWithTemplateRequest.ccs) - && Objects.equals(this.clientId, signatureRequestEditWithTemplateRequest.clientId) - && Objects.equals( - this.customFields, signatureRequestEditWithTemplateRequest.customFields) - && Objects.equals(this.files, signatureRequestEditWithTemplateRequest.files) - && Objects.equals(this.fileUrls, signatureRequestEditWithTemplateRequest.fileUrls) - && Objects.equals(this.isEid, signatureRequestEditWithTemplateRequest.isEid) - && Objects.equals(this.message, signatureRequestEditWithTemplateRequest.message) - && Objects.equals(this.metadata, signatureRequestEditWithTemplateRequest.metadata) - && Objects.equals( - this.signingOptions, signatureRequestEditWithTemplateRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, - signatureRequestEditWithTemplateRequest.signingRedirectUrl) - && Objects.equals(this.subject, signatureRequestEditWithTemplateRequest.subject) - && Objects.equals(this.testMode, signatureRequestEditWithTemplateRequest.testMode) - && Objects.equals(this.title, signatureRequestEditWithTemplateRequest.title); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - signers, - allowDecline, - ccs, - clientId, - customFields, - files, - fileUrls, - isEid, - message, - metadata, - signingOptions, - signingRedirectUrl, - subject, - testMode, - title); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestEditWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (isEid != null) { - if (isFileTypeOrListOfFiles(isEid)) { - fileTypeFound = true; - } - - if (isEid.getClass().equals(java.io.File.class) - || isEid.getClass().equals(Integer.class) - || isEid.getClass().equals(String.class) - || isEid.getClass().isEnum()) { - map.put("is_eid", isEid); - } else if (isListOfFile(isEid)) { - for (int i = 0; i < getListSize(isEid); i++) { - map.put("is_eid[" + i + "]", getFromList(isEid, i)); - } - } else { - map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java deleted file mode 100644 index 3e7064c63..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestGetResponse */ -@JsonPropertyOrder({ - SignatureRequestGetResponse.JSON_PROPERTY_SIGNATURE_REQUEST, - SignatureRequestGetResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestGetResponse { - public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public SignatureRequestGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestGetResponse.class); - } - - public static SignatureRequestGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestGetResponse.class); - } - - public SignatureRequestGetResponse signatureRequest(SignatureRequestResponse signatureRequest) { - this.signatureRequest = signatureRequest; - return this; - } - - /** - * Get signatureRequest - * - * @return signatureRequest - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SignatureRequestResponse getSignatureRequest() { - return signatureRequest; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { - this.signatureRequest = signatureRequest; - } - - public SignatureRequestGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public SignatureRequestGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this SignatureRequestGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestGetResponse signatureRequestGetResponse = (SignatureRequestGetResponse) o; - return Objects.equals(this.signatureRequest, signatureRequestGetResponse.signatureRequest) - && Objects.equals(this.warnings, signatureRequestGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(signatureRequest, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestGetResponse {\n"); - sb.append(" signatureRequest: ").append(toIndentedString(signatureRequest)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signatureRequest != null) { - if (isFileTypeOrListOfFiles(signatureRequest)) { - fileTypeFound = true; - } - - if (signatureRequest.getClass().equals(java.io.File.class) - || signatureRequest.getClass().equals(Integer.class) - || signatureRequest.getClass().equals(String.class) - || signatureRequest.getClass().isEnum()) { - map.put("signature_request", signatureRequest); - } else if (isListOfFile(signatureRequest)) { - for (int i = 0; i < getListSize(signatureRequest); i++) { - map.put("signature_request[" + i + "]", getFromList(signatureRequest, i)); - } - } else { - map.put( - "signature_request", - JSON.getDefault().getMapper().writeValueAsString(signatureRequest)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java deleted file mode 100644 index 4ae97121d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestListResponse */ -@JsonPropertyOrder({ - SignatureRequestListResponse.JSON_PROPERTY_SIGNATURE_REQUESTS, - SignatureRequestListResponse.JSON_PROPERTY_LIST_INFO, - SignatureRequestListResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestListResponse { - public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; - private List signatureRequests = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public SignatureRequestListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestListResponse.class); - } - - public static SignatureRequestListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestListResponse.class); - } - - public SignatureRequestListResponse signatureRequests( - List signatureRequests) { - this.signatureRequests = signatureRequests; - return this; - } - - public SignatureRequestListResponse addSignatureRequestsItem( - SignatureRequestResponse signatureRequestsItem) { - if (this.signatureRequests == null) { - this.signatureRequests = new ArrayList<>(); - } - this.signatureRequests.add(signatureRequestsItem); - return this; - } - - /** - * Contains information about signature requests. - * - * @return signatureRequests - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignatureRequests() { - return signatureRequests; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests(List signatureRequests) { - this.signatureRequests = signatureRequests; - } - - public SignatureRequestListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public SignatureRequestListResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public SignatureRequestListResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this SignatureRequestListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestListResponse signatureRequestListResponse = - (SignatureRequestListResponse) o; - return Objects.equals( - this.signatureRequests, signatureRequestListResponse.signatureRequests) - && Objects.equals(this.listInfo, signatureRequestListResponse.listInfo) - && Objects.equals(this.warnings, signatureRequestListResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(signatureRequests, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestListResponse {\n"); - sb.append(" signatureRequests: ") - .append(toIndentedString(signatureRequests)) - .append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signatureRequests != null) { - if (isFileTypeOrListOfFiles(signatureRequests)) { - fileTypeFound = true; - } - - if (signatureRequests.getClass().equals(java.io.File.class) - || signatureRequests.getClass().equals(Integer.class) - || signatureRequests.getClass().equals(String.class) - || signatureRequests.getClass().isEnum()) { - map.put("signature_requests", signatureRequests); - } else if (isListOfFile(signatureRequests)) { - for (int i = 0; i < getListSize(signatureRequests); i++) { - map.put("signature_requests[" + i + "]", getFromList(signatureRequests, i)); - } - } else { - map.put( - "signature_requests", - JSON.getDefault().getMapper().writeValueAsString(signatureRequests)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java deleted file mode 100644 index b4343b7b3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestRemindRequest */ -@JsonPropertyOrder({ - SignatureRequestRemindRequest.JSON_PROPERTY_EMAIL_ADDRESS, - SignatureRequestRemindRequest.JSON_PROPERTY_NAME -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestRemindRequest { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public SignatureRequestRemindRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestRemindRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestRemindRequest.class); - } - - public static SignatureRequestRemindRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestRemindRequest.class); - } - - public SignatureRequestRemindRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the signer to send a reminder to. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public SignatureRequestRemindRequest name(String name) { - this.name = name; - return this; - } - - /** - * The name of the signer to send a reminder to. Include if two or more signers share an email - * address. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this SignatureRequestRemindRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestRemindRequest signatureRequestRemindRequest = - (SignatureRequestRemindRequest) o; - return Objects.equals(this.emailAddress, signatureRequestRemindRequest.emailAddress) - && Objects.equals(this.name, signatureRequestRemindRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestRemindRequest {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java deleted file mode 100644 index ed78327dc..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java +++ /dev/null @@ -1,1434 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains information about a signature request. */ -@JsonPropertyOrder({ - SignatureRequestResponse.JSON_PROPERTY_TEST_MODE, - SignatureRequestResponse.JSON_PROPERTY_SIGNATURE_REQUEST_ID, - SignatureRequestResponse.JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS, - SignatureRequestResponse.JSON_PROPERTY_TITLE, - SignatureRequestResponse.JSON_PROPERTY_ORIGINAL_TITLE, - SignatureRequestResponse.JSON_PROPERTY_SUBJECT, - SignatureRequestResponse.JSON_PROPERTY_MESSAGE, - SignatureRequestResponse.JSON_PROPERTY_METADATA, - SignatureRequestResponse.JSON_PROPERTY_CREATED_AT, - SignatureRequestResponse.JSON_PROPERTY_EXPIRES_AT, - SignatureRequestResponse.JSON_PROPERTY_IS_COMPLETE, - SignatureRequestResponse.JSON_PROPERTY_IS_DECLINED, - SignatureRequestResponse.JSON_PROPERTY_HAS_ERROR, - SignatureRequestResponse.JSON_PROPERTY_FILES_URL, - SignatureRequestResponse.JSON_PROPERTY_SIGNING_URL, - SignatureRequestResponse.JSON_PROPERTY_DETAILS_URL, - SignatureRequestResponse.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - SignatureRequestResponse.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestResponse.JSON_PROPERTY_FINAL_COPY_URI, - SignatureRequestResponse.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestResponse.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestResponse.JSON_PROPERTY_ATTACHMENTS, - SignatureRequestResponse.JSON_PROPERTY_RESPONSE_DATA, - SignatureRequestResponse.JSON_PROPERTY_SIGNATURES, - SignatureRequestResponse.JSON_PROPERTY_BULK_SEND_JOB_ID -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestResponse { - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; - - public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; - - public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; - - public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; - - public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; - - public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; - - public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; - - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; - - public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; - - public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; - - public SignatureRequestResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponse.class); - } - - public static SignatureRequestResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponse.class); - } - - public SignatureRequestResponse testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test signature request. Test requests have no legal value. Defaults to - * `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestResponse signatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - return this; - } - - /** - * The id of the SignatureRequest. - * - * @return signatureRequestId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignatureRequestId() { - return signatureRequestId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - } - - public SignatureRequestResponse requesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - return this; - } - - /** - * The email address of the initiator of the SignatureRequest. - * - * @return requesterEmailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequesterEmailAddress() { - return requesterEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - } - - public SignatureRequestResponse title(String title) { - this.title = title; - return this; - } - - /** - * The title the specified Account uses for the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestResponse originalTitle(String originalTitle) { - this.originalTitle = originalTitle; - return this; - } - - /** - * Default Label for account. - * - * @return originalTitle - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOriginalTitle() { - return originalTitle; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { - this.originalTitle = originalTitle; - } - - public SignatureRequestResponse subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that was initially sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestResponse message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that was initially sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestResponse metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestResponse putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * The metadata attached to the signature request. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestResponse createdAt(Integer createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Time the signature request was created. - * - * @return createdAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { - this.createdAt = createdAt; - } - - public SignatureRequestResponse expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * The time when the signature request will expire unsigned signatures. See [Signature Request - * Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for - * details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - public SignatureRequestResponse isComplete(Boolean isComplete) { - this.isComplete = isComplete; - return this; - } - - /** - * Whether or not the SignatureRequest has been fully executed by all signers. - * - * @return isComplete - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsComplete() { - return isComplete; - } - - @JsonProperty(JSON_PROPERTY_IS_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { - this.isComplete = isComplete; - } - - public SignatureRequestResponse isDeclined(Boolean isDeclined) { - this.isDeclined = isDeclined; - return this; - } - - /** - * Whether or not the SignatureRequest has been declined by a signer. - * - * @return isDeclined - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_DECLINED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDeclined() { - return isDeclined; - } - - @JsonProperty(JSON_PROPERTY_IS_DECLINED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { - this.isDeclined = isDeclined; - } - - public SignatureRequestResponse hasError(Boolean hasError) { - this.hasError = hasError; - return this; - } - - /** - * Whether or not an error occurred (either during the creation of the SignatureRequest or - * during one of the signings). - * - * @return hasError - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HAS_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasError() { - return hasError; - } - - @JsonProperty(JSON_PROPERTY_HAS_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { - this.hasError = hasError; - } - - public SignatureRequestResponse filesUrl(String filesUrl) { - this.filesUrl = filesUrl; - return this; - } - - /** - * The URL where a copy of the request's documents can be downloaded. - * - * @return filesUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFilesUrl() { - return filesUrl; - } - - @JsonProperty(JSON_PROPERTY_FILES_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { - this.filesUrl = filesUrl; - } - - public SignatureRequestResponse signingUrl(String signingUrl) { - this.signingUrl = signingUrl; - return this; - } - - /** - * The URL where a signer, after authenticating, can sign the documents. This should only be - * used by users with existing Dropbox Sign accounts as they will be required to log in before - * signing. - * - * @return signingUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningUrl() { - return signingUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { - this.signingUrl = signingUrl; - } - - public SignatureRequestResponse detailsUrl(String detailsUrl) { - this.detailsUrl = detailsUrl; - return this; - } - - /** - * The URL where the requester and the signers can view the current status of the - * SignatureRequest. - * - * @return detailsUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DETAILS_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetailsUrl() { - return detailsUrl; - } - - @JsonProperty(JSON_PROPERTY_DETAILS_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { - this.detailsUrl = detailsUrl; - } - - public SignatureRequestResponse ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public SignatureRequestResponse addCcEmailAddressesItem(String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of - * the final PDF once all the signers have signed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public SignatureRequestResponse signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want the signer redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestResponse finalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - return this; - } - - /** - * The path where the completed document can be downloaded - * - * @return finalCopyUri - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFinalCopyUri() { - return finalCopyUri; - } - - @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { - this.finalCopyUri = finalCopyUri; - } - - public SignatureRequestResponse templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestResponse addTemplateIdsItem(String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Templates IDs used in this SignatureRequest (if any). - * - * @return templateIds - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestResponse customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestResponse addCustomFieldsItem( - SignatureRequestResponseCustomFieldBase customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array of Custom Field objects containing the name and type of each custom field. * Text - * Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses - * `SignatureRequestResponseCustomFieldCheckbox` - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestResponse attachments( - List attachments) { - this.attachments = attachments; - return this; - } - - public SignatureRequestResponse addAttachmentsItem( - SignatureRequestResponseAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * Signer attachments. - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public SignatureRequestResponse responseData( - List responseData) { - this.responseData = responseData; - return this; - } - - public SignatureRequestResponse addResponseDataItem( - SignatureRequestResponseDataBase responseDataItem) { - if (this.responseData == null) { - this.responseData = new ArrayList<>(); - } - this.responseData.add(responseDataItem); - return this; - } - - /** - * An array of form field objects containing the name, value, and type of each textbox or - * checkmark field filled in by the signers. - * - * @return responseData - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getResponseData() { - return responseData; - } - - @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { - this.responseData = responseData; - } - - public SignatureRequestResponse signatures( - List signatures) { - this.signatures = signatures; - return this; - } - - public SignatureRequestResponse addSignaturesItem( - SignatureRequestResponseSignatures signaturesItem) { - if (this.signatures == null) { - this.signatures = new ArrayList<>(); - } - this.signatures.add(signaturesItem); - return this; - } - - /** - * An array of signature objects, 1 for each signer. - * - * @return signatures - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignatures() { - return signatures; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { - this.signatures = signatures; - } - - public SignatureRequestResponse bulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - return this; - } - - /** - * The ID of the Bulk Send job which sent the signature request, if applicable. - * - * @return bulkSendJobId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBulkSendJobId() { - return bulkSendJobId; - } - - @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { - this.bulkSendJobId = bulkSendJobId; - } - - /** Return true if this SignatureRequestResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponse signatureRequestResponse = (SignatureRequestResponse) o; - return Objects.equals(this.testMode, signatureRequestResponse.testMode) - && Objects.equals( - this.signatureRequestId, signatureRequestResponse.signatureRequestId) - && Objects.equals( - this.requesterEmailAddress, signatureRequestResponse.requesterEmailAddress) - && Objects.equals(this.title, signatureRequestResponse.title) - && Objects.equals(this.originalTitle, signatureRequestResponse.originalTitle) - && Objects.equals(this.subject, signatureRequestResponse.subject) - && Objects.equals(this.message, signatureRequestResponse.message) - && Objects.equals(this.metadata, signatureRequestResponse.metadata) - && Objects.equals(this.createdAt, signatureRequestResponse.createdAt) - && Objects.equals(this.expiresAt, signatureRequestResponse.expiresAt) - && Objects.equals(this.isComplete, signatureRequestResponse.isComplete) - && Objects.equals(this.isDeclined, signatureRequestResponse.isDeclined) - && Objects.equals(this.hasError, signatureRequestResponse.hasError) - && Objects.equals(this.filesUrl, signatureRequestResponse.filesUrl) - && Objects.equals(this.signingUrl, signatureRequestResponse.signingUrl) - && Objects.equals(this.detailsUrl, signatureRequestResponse.detailsUrl) - && Objects.equals(this.ccEmailAddresses, signatureRequestResponse.ccEmailAddresses) - && Objects.equals( - this.signingRedirectUrl, signatureRequestResponse.signingRedirectUrl) - && Objects.equals(this.finalCopyUri, signatureRequestResponse.finalCopyUri) - && Objects.equals(this.templateIds, signatureRequestResponse.templateIds) - && Objects.equals(this.customFields, signatureRequestResponse.customFields) - && Objects.equals(this.attachments, signatureRequestResponse.attachments) - && Objects.equals(this.responseData, signatureRequestResponse.responseData) - && Objects.equals(this.signatures, signatureRequestResponse.signatures) - && Objects.equals(this.bulkSendJobId, signatureRequestResponse.bulkSendJobId); - } - - @Override - public int hashCode() { - return Objects.hash( - testMode, - signatureRequestId, - requesterEmailAddress, - title, - originalTitle, - subject, - message, - metadata, - createdAt, - expiresAt, - isComplete, - isDeclined, - hasError, - filesUrl, - signingUrl, - detailsUrl, - ccEmailAddresses, - signingRedirectUrl, - finalCopyUri, - templateIds, - customFields, - attachments, - responseData, - signatures, - bulkSendJobId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponse {\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" signatureRequestId: ") - .append(toIndentedString(signatureRequestId)) - .append("\n"); - sb.append(" requesterEmailAddress: ") - .append(toIndentedString(requesterEmailAddress)) - .append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" originalTitle: ").append(toIndentedString(originalTitle)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" isComplete: ").append(toIndentedString(isComplete)).append("\n"); - sb.append(" isDeclined: ").append(toIndentedString(isDeclined)).append("\n"); - sb.append(" hasError: ").append(toIndentedString(hasError)).append("\n"); - sb.append(" filesUrl: ").append(toIndentedString(filesUrl)).append("\n"); - sb.append(" signingUrl: ").append(toIndentedString(signingUrl)).append("\n"); - sb.append(" detailsUrl: ").append(toIndentedString(detailsUrl)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" finalCopyUri: ").append(toIndentedString(finalCopyUri)).append("\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" responseData: ").append(toIndentedString(responseData)).append("\n"); - sb.append(" signatures: ").append(toIndentedString(signatures)).append("\n"); - sb.append(" bulkSendJobId: ").append(toIndentedString(bulkSendJobId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (signatureRequestId != null) { - if (isFileTypeOrListOfFiles(signatureRequestId)) { - fileTypeFound = true; - } - - if (signatureRequestId.getClass().equals(java.io.File.class) - || signatureRequestId.getClass().equals(Integer.class) - || signatureRequestId.getClass().equals(String.class) - || signatureRequestId.getClass().isEnum()) { - map.put("signature_request_id", signatureRequestId); - } else if (isListOfFile(signatureRequestId)) { - for (int i = 0; i < getListSize(signatureRequestId); i++) { - map.put( - "signature_request_id[" + i + "]", - getFromList(signatureRequestId, i)); - } - } else { - map.put( - "signature_request_id", - JSON.getDefault().getMapper().writeValueAsString(signatureRequestId)); - } - } - if (requesterEmailAddress != null) { - if (isFileTypeOrListOfFiles(requesterEmailAddress)) { - fileTypeFound = true; - } - - if (requesterEmailAddress.getClass().equals(java.io.File.class) - || requesterEmailAddress.getClass().equals(Integer.class) - || requesterEmailAddress.getClass().equals(String.class) - || requesterEmailAddress.getClass().isEnum()) { - map.put("requester_email_address", requesterEmailAddress); - } else if (isListOfFile(requesterEmailAddress)) { - for (int i = 0; i < getListSize(requesterEmailAddress); i++) { - map.put( - "requester_email_address[" + i + "]", - getFromList(requesterEmailAddress, i)); - } - } else { - map.put( - "requester_email_address", - JSON.getDefault() - .getMapper() - .writeValueAsString(requesterEmailAddress)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (originalTitle != null) { - if (isFileTypeOrListOfFiles(originalTitle)) { - fileTypeFound = true; - } - - if (originalTitle.getClass().equals(java.io.File.class) - || originalTitle.getClass().equals(Integer.class) - || originalTitle.getClass().equals(String.class) - || originalTitle.getClass().isEnum()) { - map.put("original_title", originalTitle); - } else if (isListOfFile(originalTitle)) { - for (int i = 0; i < getListSize(originalTitle); i++) { - map.put("original_title[" + i + "]", getFromList(originalTitle, i)); - } - } else { - map.put( - "original_title", - JSON.getDefault().getMapper().writeValueAsString(originalTitle)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (createdAt != null) { - if (isFileTypeOrListOfFiles(createdAt)) { - fileTypeFound = true; - } - - if (createdAt.getClass().equals(java.io.File.class) - || createdAt.getClass().equals(Integer.class) - || createdAt.getClass().equals(String.class) - || createdAt.getClass().isEnum()) { - map.put("created_at", createdAt); - } else if (isListOfFile(createdAt)) { - for (int i = 0; i < getListSize(createdAt); i++) { - map.put("created_at[" + i + "]", getFromList(createdAt, i)); - } - } else { - map.put( - "created_at", - JSON.getDefault().getMapper().writeValueAsString(createdAt)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - if (isComplete != null) { - if (isFileTypeOrListOfFiles(isComplete)) { - fileTypeFound = true; - } - - if (isComplete.getClass().equals(java.io.File.class) - || isComplete.getClass().equals(Integer.class) - || isComplete.getClass().equals(String.class) - || isComplete.getClass().isEnum()) { - map.put("is_complete", isComplete); - } else if (isListOfFile(isComplete)) { - for (int i = 0; i < getListSize(isComplete); i++) { - map.put("is_complete[" + i + "]", getFromList(isComplete, i)); - } - } else { - map.put( - "is_complete", - JSON.getDefault().getMapper().writeValueAsString(isComplete)); - } - } - if (isDeclined != null) { - if (isFileTypeOrListOfFiles(isDeclined)) { - fileTypeFound = true; - } - - if (isDeclined.getClass().equals(java.io.File.class) - || isDeclined.getClass().equals(Integer.class) - || isDeclined.getClass().equals(String.class) - || isDeclined.getClass().isEnum()) { - map.put("is_declined", isDeclined); - } else if (isListOfFile(isDeclined)) { - for (int i = 0; i < getListSize(isDeclined); i++) { - map.put("is_declined[" + i + "]", getFromList(isDeclined, i)); - } - } else { - map.put( - "is_declined", - JSON.getDefault().getMapper().writeValueAsString(isDeclined)); - } - } - if (hasError != null) { - if (isFileTypeOrListOfFiles(hasError)) { - fileTypeFound = true; - } - - if (hasError.getClass().equals(java.io.File.class) - || hasError.getClass().equals(Integer.class) - || hasError.getClass().equals(String.class) - || hasError.getClass().isEnum()) { - map.put("has_error", hasError); - } else if (isListOfFile(hasError)) { - for (int i = 0; i < getListSize(hasError); i++) { - map.put("has_error[" + i + "]", getFromList(hasError, i)); - } - } else { - map.put( - "has_error", - JSON.getDefault().getMapper().writeValueAsString(hasError)); - } - } - if (filesUrl != null) { - if (isFileTypeOrListOfFiles(filesUrl)) { - fileTypeFound = true; - } - - if (filesUrl.getClass().equals(java.io.File.class) - || filesUrl.getClass().equals(Integer.class) - || filesUrl.getClass().equals(String.class) - || filesUrl.getClass().isEnum()) { - map.put("files_url", filesUrl); - } else if (isListOfFile(filesUrl)) { - for (int i = 0; i < getListSize(filesUrl); i++) { - map.put("files_url[" + i + "]", getFromList(filesUrl, i)); - } - } else { - map.put( - "files_url", - JSON.getDefault().getMapper().writeValueAsString(filesUrl)); - } - } - if (signingUrl != null) { - if (isFileTypeOrListOfFiles(signingUrl)) { - fileTypeFound = true; - } - - if (signingUrl.getClass().equals(java.io.File.class) - || signingUrl.getClass().equals(Integer.class) - || signingUrl.getClass().equals(String.class) - || signingUrl.getClass().isEnum()) { - map.put("signing_url", signingUrl); - } else if (isListOfFile(signingUrl)) { - for (int i = 0; i < getListSize(signingUrl); i++) { - map.put("signing_url[" + i + "]", getFromList(signingUrl, i)); - } - } else { - map.put( - "signing_url", - JSON.getDefault().getMapper().writeValueAsString(signingUrl)); - } - } - if (detailsUrl != null) { - if (isFileTypeOrListOfFiles(detailsUrl)) { - fileTypeFound = true; - } - - if (detailsUrl.getClass().equals(java.io.File.class) - || detailsUrl.getClass().equals(Integer.class) - || detailsUrl.getClass().equals(String.class) - || detailsUrl.getClass().isEnum()) { - map.put("details_url", detailsUrl); - } else if (isListOfFile(detailsUrl)) { - for (int i = 0; i < getListSize(detailsUrl); i++) { - map.put("details_url[" + i + "]", getFromList(detailsUrl, i)); - } - } else { - map.put( - "details_url", - JSON.getDefault().getMapper().writeValueAsString(detailsUrl)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (finalCopyUri != null) { - if (isFileTypeOrListOfFiles(finalCopyUri)) { - fileTypeFound = true; - } - - if (finalCopyUri.getClass().equals(java.io.File.class) - || finalCopyUri.getClass().equals(Integer.class) - || finalCopyUri.getClass().equals(String.class) - || finalCopyUri.getClass().isEnum()) { - map.put("final_copy_uri", finalCopyUri); - } else if (isListOfFile(finalCopyUri)) { - for (int i = 0; i < getListSize(finalCopyUri); i++) { - map.put("final_copy_uri[" + i + "]", getFromList(finalCopyUri, i)); - } - } else { - map.put( - "final_copy_uri", - JSON.getDefault().getMapper().writeValueAsString(finalCopyUri)); - } - } - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (responseData != null) { - if (isFileTypeOrListOfFiles(responseData)) { - fileTypeFound = true; - } - - if (responseData.getClass().equals(java.io.File.class) - || responseData.getClass().equals(Integer.class) - || responseData.getClass().equals(String.class) - || responseData.getClass().isEnum()) { - map.put("response_data", responseData); - } else if (isListOfFile(responseData)) { - for (int i = 0; i < getListSize(responseData); i++) { - map.put("response_data[" + i + "]", getFromList(responseData, i)); - } - } else { - map.put( - "response_data", - JSON.getDefault().getMapper().writeValueAsString(responseData)); - } - } - if (signatures != null) { - if (isFileTypeOrListOfFiles(signatures)) { - fileTypeFound = true; - } - - if (signatures.getClass().equals(java.io.File.class) - || signatures.getClass().equals(Integer.class) - || signatures.getClass().equals(String.class) - || signatures.getClass().isEnum()) { - map.put("signatures", signatures); - } else if (isListOfFile(signatures)) { - for (int i = 0; i < getListSize(signatures); i++) { - map.put("signatures[" + i + "]", getFromList(signatures, i)); - } - } else { - map.put( - "signatures", - JSON.getDefault().getMapper().writeValueAsString(signatures)); - } - } - if (bulkSendJobId != null) { - if (isFileTypeOrListOfFiles(bulkSendJobId)) { - fileTypeFound = true; - } - - if (bulkSendJobId.getClass().equals(java.io.File.class) - || bulkSendJobId.getClass().equals(Integer.class) - || bulkSendJobId.getClass().equals(String.class) - || bulkSendJobId.getClass().isEnum()) { - map.put("bulk_send_job_id", bulkSendJobId); - } else if (isListOfFile(bulkSendJobId)) { - for (int i = 0; i < getListSize(bulkSendJobId); i++) { - map.put("bulk_send_job_id[" + i + "]", getFromList(bulkSendJobId, i)); - } - } else { - map.put( - "bulk_send_job_id", - JSON.getDefault().getMapper().writeValueAsString(bulkSendJobId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java deleted file mode 100644 index 8d4e942e3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java +++ /dev/null @@ -1,418 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Signer attachments. */ -@JsonPropertyOrder({ - SignatureRequestResponseAttachment.JSON_PROPERTY_ID, - SignatureRequestResponseAttachment.JSON_PROPERTY_SIGNER, - SignatureRequestResponseAttachment.JSON_PROPERTY_NAME, - SignatureRequestResponseAttachment.JSON_PROPERTY_REQUIRED, - SignatureRequestResponseAttachment.JSON_PROPERTY_INSTRUCTIONS, - SignatureRequestResponseAttachment.JSON_PROPERTY_UPLOADED_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestResponseAttachment { - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; - - public static final String JSON_PROPERTY_UPLOADED_AT = "uploaded_at"; - private Integer uploadedAt; - - public SignatureRequestResponseAttachment() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseAttachment init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponseAttachment.class); - } - - public static SignatureRequestResponseAttachment init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseAttachment.class); - } - - public SignatureRequestResponseAttachment id(String id) { - this.id = id; - return this; - } - - /** - * The unique ID for this attachment. - * - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { - this.id = id; - } - - public SignatureRequestResponseAttachment signer(String signer) { - this.signer = signer; - return this; - } - - public SignatureRequestResponseAttachment signer(Integer signer) { - this.signer = String.valueOf(signer); - return this; - } - - /** - * The Signer this attachment is assigned to. - * - * @return signer - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSigner() { - return signer; - } - - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { - this.signer = signer; - } - - public void setSigner(Integer signer) { - this.signer = String.valueOf(signer); - } - - public SignatureRequestResponseAttachment name(String name) { - this.name = name; - return this; - } - - /** - * The name of this attachment. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SignatureRequestResponseAttachment required(Boolean required) { - this.required = required; - return this; - } - - /** - * A boolean value denoting if this attachment is required. - * - * @return required - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { - this.required = required; - } - - public SignatureRequestResponseAttachment instructions(String instructions) { - this.instructions = instructions; - return this; - } - - /** - * Instructions for Signer. - * - * @return instructions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInstructions() { - return instructions; - } - - @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { - this.instructions = instructions; - } - - public SignatureRequestResponseAttachment uploadedAt(Integer uploadedAt) { - this.uploadedAt = uploadedAt; - return this; - } - - /** - * Timestamp when attachment was uploaded by Signer. - * - * @return uploadedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UPLOADED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUploadedAt() { - return uploadedAt; - } - - @JsonProperty(JSON_PROPERTY_UPLOADED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUploadedAt(Integer uploadedAt) { - this.uploadedAt = uploadedAt; - } - - /** Return true if this SignatureRequestResponseAttachment object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseAttachment signatureRequestResponseAttachment = - (SignatureRequestResponseAttachment) o; - return Objects.equals(this.id, signatureRequestResponseAttachment.id) - && Objects.equals(this.signer, signatureRequestResponseAttachment.signer) - && Objects.equals(this.name, signatureRequestResponseAttachment.name) - && Objects.equals(this.required, signatureRequestResponseAttachment.required) - && Objects.equals( - this.instructions, signatureRequestResponseAttachment.instructions) - && Objects.equals(this.uploadedAt, signatureRequestResponseAttachment.uploadedAt); - } - - @Override - public int hashCode() { - return Objects.hash(id, signer, name, required, instructions, uploadedAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseAttachment {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); - sb.append(" uploadedAt: ").append(toIndentedString(uploadedAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (id != null) { - if (isFileTypeOrListOfFiles(id)) { - fileTypeFound = true; - } - - if (id.getClass().equals(java.io.File.class) - || id.getClass().equals(Integer.class) - || id.getClass().equals(String.class) - || id.getClass().isEnum()) { - map.put("id", id); - } else if (isListOfFile(id)) { - for (int i = 0; i < getListSize(id); i++) { - map.put("id[" + i + "]", getFromList(id, i)); - } - } else { - map.put("id", JSON.getDefault().getMapper().writeValueAsString(id)); - } - } - if (signer != null) { - if (isFileTypeOrListOfFiles(signer)) { - fileTypeFound = true; - } - - if (signer.getClass().equals(java.io.File.class) - || signer.getClass().equals(Integer.class) - || signer.getClass().equals(String.class) - || signer.getClass().isEnum()) { - map.put("signer", signer); - } else if (isListOfFile(signer)) { - for (int i = 0; i < getListSize(signer); i++) { - map.put("signer[" + i + "]", getFromList(signer, i)); - } - } else { - map.put("signer", JSON.getDefault().getMapper().writeValueAsString(signer)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (instructions != null) { - if (isFileTypeOrListOfFiles(instructions)) { - fileTypeFound = true; - } - - if (instructions.getClass().equals(java.io.File.class) - || instructions.getClass().equals(Integer.class) - || instructions.getClass().equals(String.class) - || instructions.getClass().isEnum()) { - map.put("instructions", instructions); - } else if (isListOfFile(instructions)) { - for (int i = 0; i < getListSize(instructions); i++) { - map.put("instructions[" + i + "]", getFromList(instructions, i)); - } - } else { - map.put( - "instructions", - JSON.getDefault().getMapper().writeValueAsString(instructions)); - } - } - if (uploadedAt != null) { - if (isFileTypeOrListOfFiles(uploadedAt)) { - fileTypeFound = true; - } - - if (uploadedAt.getClass().equals(java.io.File.class) - || uploadedAt.getClass().equals(Integer.class) - || uploadedAt.getClass().equals(String.class) - || uploadedAt.getClass().isEnum()) { - map.put("uploaded_at", uploadedAt); - } else if (isListOfFile(uploadedAt)) { - for (int i = 0; i < getListSize(uploadedAt); i++) { - map.put("uploaded_at[" + i + "]", getFromList(uploadedAt, i)); - } - } else { - map.put( - "uploaded_at", - JSON.getDefault().getMapper().writeValueAsString(uploadedAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java deleted file mode 100644 index eff161450..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * An array of Custom Field objects containing the name and type of each custom field. * Text Field - * uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses - * `SignatureRequestResponseCustomFieldCheckbox` - */ -@JsonPropertyOrder({ - SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_TYPE, - SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_NAME, - SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_REQUIRED, - SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_API_ID, - SignatureRequestResponseCustomFieldBase.JSON_PROPERTY_EDITOR -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type( - value = SignatureRequestResponseCustomFieldCheckbox.class, - name = "checkbox"), - @JsonSubTypes.Type(value = SignatureRequestResponseCustomFieldText.class, name = "text"), -}) -public class SignatureRequestResponseCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; - - public SignatureRequestResponseCustomFieldBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseCustomFieldBase init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseCustomFieldBase.class); - } - - public static SignatureRequestResponseCustomFieldBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseCustomFieldBase.class); - } - - public SignatureRequestResponseCustomFieldBase type(String type) { - this.type = type; - return this; - } - - /** - * The type of this Custom Field. Only 'text' and 'checkbox' are currently - * supported. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseCustomFieldBase name(String name) { - this.name = name; - return this; - } - - /** - * The name of the Custom Field. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SignatureRequestResponseCustomFieldBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * A boolean value denoting if this field is required. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - public SignatureRequestResponseCustomFieldBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * The unique ID for this field. - * - * @return apiId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public SignatureRequestResponseCustomFieldBase editor(String editor) { - this.editor = editor; - return this; - } - - /** - * The name of the Role that is able to edit this field. - * - * @return editor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEditor() { - return editor; - } - - @JsonProperty(JSON_PROPERTY_EDITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { - this.editor = editor; - } - - /** Return true if this SignatureRequestResponseCustomFieldBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseCustomFieldBase signatureRequestResponseCustomFieldBase = - (SignatureRequestResponseCustomFieldBase) o; - return Objects.equals(this.type, signatureRequestResponseCustomFieldBase.type) - && Objects.equals(this.name, signatureRequestResponseCustomFieldBase.name) - && Objects.equals(this.required, signatureRequestResponseCustomFieldBase.required) - && Objects.equals(this.apiId, signatureRequestResponseCustomFieldBase.apiId) - && Objects.equals(this.editor, signatureRequestResponseCustomFieldBase.editor); - } - - @Override - public int hashCode() { - return Objects.hash(type, name, required, apiId, editor); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseCustomFieldBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" editor: ").append(toIndentedString(editor)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (editor != null) { - if (isFileTypeOrListOfFiles(editor)) { - fileTypeFound = true; - } - - if (editor.getClass().equals(java.io.File.class) - || editor.getClass().equals(Integer.class) - || editor.getClass().equals(String.class) - || editor.getClass().isEnum()) { - map.put("editor", editor); - } else if (isListOfFile(editor)) { - for (int i = 0; i < getListSize(editor); i++) { - map.put("editor[" + i + "]", getFromList(editor, i)); - } - } else { - map.put("editor", JSON.getDefault().getMapper().writeValueAsString(editor)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", SignatureRequestResponseCustomFieldCheckbox.class); - mappings.put("text", SignatureRequestResponseCustomFieldText.class); - mappings.put( - "SignatureRequestResponseCustomFieldBase", - SignatureRequestResponseCustomFieldBase.class); - JSON.registerDiscriminator(SignatureRequestResponseCustomFieldBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java deleted file mode 100644 index f2f207ebf..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SignatureRequestResponseCustomFieldBase`. */ -@JsonPropertyOrder({ - SignatureRequestResponseCustomFieldCheckbox.JSON_PROPERTY_TYPE, - SignatureRequestResponseCustomFieldCheckbox.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseCustomFieldCheckbox - extends SignatureRequestResponseCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; - - public SignatureRequestResponseCustomFieldCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseCustomFieldCheckbox init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseCustomFieldCheckbox.class); - } - - public static SignatureRequestResponseCustomFieldCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseCustomFieldCheckbox.class); - } - - public SignatureRequestResponseCustomFieldCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * The type of this Custom Field. Only 'text' and 'checkbox' are currently - * supported. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseCustomFieldCheckbox value(Boolean value) { - this.value = value; - return this; - } - - /** - * A true/false for checkbox fields - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseCustomFieldCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseCustomFieldCheckbox signatureRequestResponseCustomFieldCheckbox = - (SignatureRequestResponseCustomFieldCheckbox) o; - return Objects.equals(this.type, signatureRequestResponseCustomFieldCheckbox.type) - && Objects.equals(this.value, signatureRequestResponseCustomFieldCheckbox.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseCustomFieldCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseCustomFieldCheckbox", - SignatureRequestResponseCustomFieldCheckbox.class); - JSON.registerDiscriminator( - SignatureRequestResponseCustomFieldCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java deleted file mode 100644 index 31c911d42..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SignatureRequestResponseCustomFieldBase`. */ -@JsonPropertyOrder({ - SignatureRequestResponseCustomFieldText.JSON_PROPERTY_TYPE, - SignatureRequestResponseCustomFieldText.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseCustomFieldText - extends SignatureRequestResponseCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseCustomFieldText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseCustomFieldText init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseCustomFieldText.class); - } - - public static SignatureRequestResponseCustomFieldText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseCustomFieldText.class); - } - - public SignatureRequestResponseCustomFieldText type(String type) { - this.type = type; - return this; - } - - /** - * The type of this Custom Field. Only 'text' and 'checkbox' are currently - * supported. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseCustomFieldText value(String value) { - this.value = value; - return this; - } - - /** - * A text string for text fields - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseCustomFieldText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseCustomFieldText signatureRequestResponseCustomFieldText = - (SignatureRequestResponseCustomFieldText) o; - return Objects.equals(this.type, signatureRequestResponseCustomFieldText.type) - && Objects.equals(this.value, signatureRequestResponseCustomFieldText.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseCustomFieldText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseCustomFieldText", - SignatureRequestResponseCustomFieldText.class); - JSON.registerDiscriminator(SignatureRequestResponseCustomFieldText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java deleted file mode 100644 index 356385d32..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets SignatureRequestResponseCustomFieldTypeEnum */ -public enum SignatureRequestResponseCustomFieldTypeEnum { - TEXT("text"), - - CHECKBOX("checkbox"); - - private String value; - - SignatureRequestResponseCustomFieldTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SignatureRequestResponseCustomFieldTypeEnum fromValue(String value) { - for (SignatureRequestResponseCustomFieldTypeEnum b : - SignatureRequestResponseCustomFieldTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java deleted file mode 100644 index 1b5606c45..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * An array of form field objects containing the name, value, and type of each textbox or checkmark - * field filled in by the signers. - */ -@JsonPropertyOrder({ - SignatureRequestResponseDataBase.JSON_PROPERTY_API_ID, - SignatureRequestResponseDataBase.JSON_PROPERTY_SIGNATURE_ID, - SignatureRequestResponseDataBase.JSON_PROPERTY_NAME, - SignatureRequestResponseDataBase.JSON_PROPERTY_REQUIRED, - SignatureRequestResponseDataBase.JSON_PROPERTY_TYPE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = SignatureRequestResponseDataValueCheckbox.class, name = "checkbox"), - @JsonSubTypes.Type( - value = SignatureRequestResponseDataValueCheckboxMerge.class, - name = "checkbox-merge"), - @JsonSubTypes.Type( - value = SignatureRequestResponseDataValueDateSigned.class, - name = "date_signed"), - @JsonSubTypes.Type(value = SignatureRequestResponseDataValueDropdown.class, name = "dropdown"), - @JsonSubTypes.Type(value = SignatureRequestResponseDataValueInitials.class, name = "initials"), - @JsonSubTypes.Type(value = SignatureRequestResponseDataValueRadio.class, name = "radio"), - @JsonSubTypes.Type( - value = SignatureRequestResponseDataValueSignature.class, - name = "signature"), - @JsonSubTypes.Type(value = SignatureRequestResponseDataValueText.class, name = "text"), - @JsonSubTypes.Type( - value = SignatureRequestResponseDataValueTextMerge.class, - name = "text-merge"), -}) -public class SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public SignatureRequestResponseDataBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataBase init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponseDataBase.class); - } - - public static SignatureRequestResponseDataBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataBase.class); - } - - public SignatureRequestResponseDataBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * The unique ID for this field. - * - * @return apiId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public SignatureRequestResponseDataBase signatureId(String signatureId) { - this.signatureId = signatureId; - return this; - } - - /** - * The ID of the signature to which this response is linked. - * - * @return signatureId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignatureId() { - return signatureId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { - this.signatureId = signatureId; - } - - public SignatureRequestResponseDataBase name(String name) { - this.name = name; - return this; - } - - /** - * The name of the form field. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public SignatureRequestResponseDataBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * A boolean value denoting if this field is required. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - public SignatureRequestResponseDataBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this SignatureRequestResponseDataBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataBase signatureRequestResponseDataBase = - (SignatureRequestResponseDataBase) o; - return Objects.equals(this.apiId, signatureRequestResponseDataBase.apiId) - && Objects.equals(this.signatureId, signatureRequestResponseDataBase.signatureId) - && Objects.equals(this.name, signatureRequestResponseDataBase.name) - && Objects.equals(this.required, signatureRequestResponseDataBase.required) - && Objects.equals(this.type, signatureRequestResponseDataBase.type); - } - - @Override - public int hashCode() { - return Objects.hash(apiId, signatureId, name, required, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataBase {\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" signatureId: ").append(toIndentedString(signatureId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (signatureId != null) { - if (isFileTypeOrListOfFiles(signatureId)) { - fileTypeFound = true; - } - - if (signatureId.getClass().equals(java.io.File.class) - || signatureId.getClass().equals(Integer.class) - || signatureId.getClass().equals(String.class) - || signatureId.getClass().isEnum()) { - map.put("signature_id", signatureId); - } else if (isListOfFile(signatureId)) { - for (int i = 0; i < getListSize(signatureId); i++) { - map.put("signature_id[" + i + "]", getFromList(signatureId, i)); - } - } else { - map.put( - "signature_id", - JSON.getDefault().getMapper().writeValueAsString(signatureId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", SignatureRequestResponseDataValueCheckbox.class); - mappings.put("checkbox-merge", SignatureRequestResponseDataValueCheckboxMerge.class); - mappings.put("date_signed", SignatureRequestResponseDataValueDateSigned.class); - mappings.put("dropdown", SignatureRequestResponseDataValueDropdown.class); - mappings.put("initials", SignatureRequestResponseDataValueInitials.class); - mappings.put("radio", SignatureRequestResponseDataValueRadio.class); - mappings.put("signature", SignatureRequestResponseDataValueSignature.class); - mappings.put("text", SignatureRequestResponseDataValueText.class); - mappings.put("text-merge", SignatureRequestResponseDataValueTextMerge.class); - mappings.put("SignatureRequestResponseDataBase", SignatureRequestResponseDataBase.class); - JSON.registerDiscriminator(SignatureRequestResponseDataBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java deleted file mode 100644 index 35e89e061..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets SignatureRequestResponseDataTypeEnum */ -public enum SignatureRequestResponseDataTypeEnum { - TEXT("text"), - - CHECKBOX("checkbox"), - - DATE_SIGNED("date_signed"), - - DROPDOWN("dropdown"), - - INITIALS("initials"), - - RADIO("radio"), - - SIGNATURE("signature"), - - TEXT_MERGE("text-merge"), - - CHECKBOX_MERGE("checkbox-merge"); - - private String value; - - SignatureRequestResponseDataTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SignatureRequestResponseDataTypeEnum fromValue(String value) { - for (SignatureRequestResponseDataTypeEnum b : - SignatureRequestResponseDataTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java deleted file mode 100644 index 656b82718..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueCheckbox */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueCheckbox.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueCheckbox.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; - - public SignatureRequestResponseDataValueCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueCheckbox init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueCheckbox.class); - } - - public static SignatureRequestResponseDataValueCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueCheckbox.class); - } - - public SignatureRequestResponseDataValueCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * A yes/no checkbox - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueCheckbox value(Boolean value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueCheckbox signatureRequestResponseDataValueCheckbox = - (SignatureRequestResponseDataValueCheckbox) o; - return Objects.equals(this.type, signatureRequestResponseDataValueCheckbox.type) - && Objects.equals(this.value, signatureRequestResponseDataValueCheckbox.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueCheckbox", - SignatureRequestResponseDataValueCheckbox.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java deleted file mode 100644 index 9127f681c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueCheckboxMerge */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueCheckboxMerge.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueCheckboxMerge.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueCheckboxMerge - extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseDataValueCheckboxMerge() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueCheckboxMerge init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueCheckboxMerge.class); - } - - public static SignatureRequestResponseDataValueCheckboxMerge init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueCheckboxMerge.class); - } - - public SignatureRequestResponseDataValueCheckboxMerge type(String type) { - this.type = type; - return this; - } - - /** - * A checkbox field that has default value set by the api - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueCheckboxMerge value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueCheckboxMerge object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueCheckboxMerge - signatureRequestResponseDataValueCheckboxMerge = - (SignatureRequestResponseDataValueCheckboxMerge) o; - return Objects.equals(this.type, signatureRequestResponseDataValueCheckboxMerge.type) - && Objects.equals(this.value, signatureRequestResponseDataValueCheckboxMerge.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueCheckboxMerge {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueCheckboxMerge", - SignatureRequestResponseDataValueCheckboxMerge.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueCheckboxMerge.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java deleted file mode 100644 index b93a26238..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueDateSigned */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueDateSigned.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueDateSigned.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseDataValueDateSigned() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueDateSigned init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueDateSigned.class); - } - - public static SignatureRequestResponseDataValueDateSigned init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueDateSigned.class); - } - - public SignatureRequestResponseDataValueDateSigned type(String type) { - this.type = type; - return this; - } - - /** - * A date - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueDateSigned value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueDateSigned object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueDateSigned signatureRequestResponseDataValueDateSigned = - (SignatureRequestResponseDataValueDateSigned) o; - return Objects.equals(this.type, signatureRequestResponseDataValueDateSigned.type) - && Objects.equals(this.value, signatureRequestResponseDataValueDateSigned.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueDateSigned {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueDateSigned", - SignatureRequestResponseDataValueDateSigned.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueDateSigned.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java deleted file mode 100644 index b52dee36f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueDropdown */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueDropdown.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueDropdown.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseDataValueDropdown() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueDropdown init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueDropdown.class); - } - - public static SignatureRequestResponseDataValueDropdown init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueDropdown.class); - } - - public SignatureRequestResponseDataValueDropdown type(String type) { - this.type = type; - return this; - } - - /** - * An input field for dropdowns - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueDropdown value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueDropdown object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueDropdown signatureRequestResponseDataValueDropdown = - (SignatureRequestResponseDataValueDropdown) o; - return Objects.equals(this.type, signatureRequestResponseDataValueDropdown.type) - && Objects.equals(this.value, signatureRequestResponseDataValueDropdown.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueDropdown {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueDropdown", - SignatureRequestResponseDataValueDropdown.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueDropdown.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java deleted file mode 100644 index 28262ccf4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueInitials */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueInitials.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueInitials.JSON_PROPERTY_VALUE, - SignatureRequestResponseDataValueInitials.JSON_PROPERTY_IS_SIGNED -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; - - public SignatureRequestResponseDataValueInitials() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueInitials init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueInitials.class); - } - - public static SignatureRequestResponseDataValueInitials init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueInitials.class); - } - - public SignatureRequestResponseDataValueInitials type(String type) { - this.type = type; - return this; - } - - /** - * An input field for initials - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueInitials value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - public SignatureRequestResponseDataValueInitials isSigned(Boolean isSigned) { - this.isSigned = isSigned; - return this; - } - - /** - * This field contains the boolean true if the field is signed. - * - * @return isSigned - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_SIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsSigned() { - return isSigned; - } - - @JsonProperty(JSON_PROPERTY_IS_SIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { - this.isSigned = isSigned; - } - - /** Return true if this SignatureRequestResponseDataValueInitials object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueInitials signatureRequestResponseDataValueInitials = - (SignatureRequestResponseDataValueInitials) o; - return Objects.equals(this.type, signatureRequestResponseDataValueInitials.type) - && Objects.equals(this.value, signatureRequestResponseDataValueInitials.value) - && Objects.equals(this.isSigned, signatureRequestResponseDataValueInitials.isSigned) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, isSigned, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueInitials {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" isSigned: ").append(toIndentedString(isSigned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - if (isSigned != null) { - if (isFileTypeOrListOfFiles(isSigned)) { - fileTypeFound = true; - } - - if (isSigned.getClass().equals(java.io.File.class) - || isSigned.getClass().equals(Integer.class) - || isSigned.getClass().equals(String.class) - || isSigned.getClass().isEnum()) { - map.put("is_signed", isSigned); - } else if (isListOfFile(isSigned)) { - for (int i = 0; i < getListSize(isSigned); i++) { - map.put("is_signed[" + i + "]", getFromList(isSigned, i)); - } - } else { - map.put( - "is_signed", - JSON.getDefault().getMapper().writeValueAsString(isSigned)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueInitials", - SignatureRequestResponseDataValueInitials.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueInitials.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java deleted file mode 100644 index a5d63ae2c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueRadio */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueRadio.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueRadio.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; - - public SignatureRequestResponseDataValueRadio() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueRadio init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponseDataValueRadio.class); - } - - public static SignatureRequestResponseDataValueRadio init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueRadio.class); - } - - public SignatureRequestResponseDataValueRadio type(String type) { - this.type = type; - return this; - } - - /** - * An input field for radios - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueRadio value(Boolean value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueRadio object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueRadio signatureRequestResponseDataValueRadio = - (SignatureRequestResponseDataValueRadio) o; - return Objects.equals(this.type, signatureRequestResponseDataValueRadio.type) - && Objects.equals(this.value, signatureRequestResponseDataValueRadio.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueRadio {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueRadio", - SignatureRequestResponseDataValueRadio.class); - JSON.registerDiscriminator(SignatureRequestResponseDataValueRadio.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java deleted file mode 100644 index 657bc4864..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueSignature */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueSignature.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueSignature.JSON_PROPERTY_VALUE, - SignatureRequestResponseDataValueSignature.JSON_PROPERTY_IS_SIGNED -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; - - public SignatureRequestResponseDataValueSignature() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueSignature init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueSignature.class); - } - - public static SignatureRequestResponseDataValueSignature init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueSignature.class); - } - - public SignatureRequestResponseDataValueSignature type(String type) { - this.type = type; - return this; - } - - /** - * A signature input field - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueSignature value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - public SignatureRequestResponseDataValueSignature isSigned(Boolean isSigned) { - this.isSigned = isSigned; - return this; - } - - /** - * This field contains the boolean true if the field is signed. - * - * @return isSigned - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_SIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsSigned() { - return isSigned; - } - - @JsonProperty(JSON_PROPERTY_IS_SIGNED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { - this.isSigned = isSigned; - } - - /** Return true if this SignatureRequestResponseDataValueSignature object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueSignature signatureRequestResponseDataValueSignature = - (SignatureRequestResponseDataValueSignature) o; - return Objects.equals(this.type, signatureRequestResponseDataValueSignature.type) - && Objects.equals(this.value, signatureRequestResponseDataValueSignature.value) - && Objects.equals( - this.isSigned, signatureRequestResponseDataValueSignature.isSigned) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, isSigned, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueSignature {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" isSigned: ").append(toIndentedString(isSigned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - if (isSigned != null) { - if (isFileTypeOrListOfFiles(isSigned)) { - fileTypeFound = true; - } - - if (isSigned.getClass().equals(java.io.File.class) - || isSigned.getClass().equals(Integer.class) - || isSigned.getClass().equals(String.class) - || isSigned.getClass().isEnum()) { - map.put("is_signed", isSigned); - } else if (isListOfFile(isSigned)) { - for (int i = 0; i < getListSize(isSigned); i++) { - map.put("is_signed[" + i + "]", getFromList(isSigned, i)); - } - } else { - map.put( - "is_signed", - JSON.getDefault().getMapper().writeValueAsString(isSigned)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueSignature", - SignatureRequestResponseDataValueSignature.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueSignature.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java deleted file mode 100644 index d9c7af057..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueText */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueText.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueText.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseDataValueText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueText init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponseDataValueText.class); - } - - public static SignatureRequestResponseDataValueText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueText.class); - } - - public SignatureRequestResponseDataValueText type(String type) { - this.type = type; - return this; - } - - /** - * A text input field - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueText value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueText signatureRequestResponseDataValueText = - (SignatureRequestResponseDataValueText) o; - return Objects.equals(this.type, signatureRequestResponseDataValueText.type) - && Objects.equals(this.value, signatureRequestResponseDataValueText.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueText", - SignatureRequestResponseDataValueText.class); - JSON.registerDiscriminator(SignatureRequestResponseDataValueText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java deleted file mode 100644 index 1b796dbd6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestResponseDataValueTextMerge */ -@JsonPropertyOrder({ - SignatureRequestResponseDataValueTextMerge.JSON_PROPERTY_TYPE, - SignatureRequestResponseDataValueTextMerge.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SignatureRequestResponseDataValueTextMerge() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseDataValueTextMerge init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestResponseDataValueTextMerge.class); - } - - public static SignatureRequestResponseDataValueTextMerge init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseDataValueTextMerge.class); - } - - public SignatureRequestResponseDataValueTextMerge type(String type) { - this.type = type; - return this; - } - - /** - * A text field that has default text set by the api - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - public SignatureRequestResponseDataValueTextMerge value(String value) { - this.value = value; - return this; - } - - /** - * The value of the form field. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SignatureRequestResponseDataValueTextMerge object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseDataValueTextMerge signatureRequestResponseDataValueTextMerge = - (SignatureRequestResponseDataValueTextMerge) o; - return Objects.equals(this.type, signatureRequestResponseDataValueTextMerge.type) - && Objects.equals(this.value, signatureRequestResponseDataValueTextMerge.value) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, value, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseDataValueTextMerge {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SignatureRequestResponseDataValueTextMerge", - SignatureRequestResponseDataValueTextMerge.class); - JSON.registerDiscriminator( - SignatureRequestResponseDataValueTextMerge.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java deleted file mode 100644 index 6dbe1116f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java +++ /dev/null @@ -1,1069 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An array of signature objects, 1 for each signer. */ -@JsonPropertyOrder({ - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNATURE_ID, - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNER_GROUP_GUID, - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNER_EMAIL_ADDRESS, - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNER_NAME, - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNER_ROLE, - SignatureRequestResponseSignatures.JSON_PROPERTY_ORDER, - SignatureRequestResponseSignatures.JSON_PROPERTY_STATUS_CODE, - SignatureRequestResponseSignatures.JSON_PROPERTY_DECLINE_REASON, - SignatureRequestResponseSignatures.JSON_PROPERTY_SIGNED_AT, - SignatureRequestResponseSignatures.JSON_PROPERTY_LAST_VIEWED_AT, - SignatureRequestResponseSignatures.JSON_PROPERTY_LAST_REMINDED_AT, - SignatureRequestResponseSignatures.JSON_PROPERTY_HAS_PIN, - SignatureRequestResponseSignatures.JSON_PROPERTY_HAS_SMS_AUTH, - SignatureRequestResponseSignatures.JSON_PROPERTY_HAS_SMS_DELIVERY, - SignatureRequestResponseSignatures.JSON_PROPERTY_SMS_PHONE_NUMBER, - SignatureRequestResponseSignatures.JSON_PROPERTY_REASSIGNED_BY, - SignatureRequestResponseSignatures.JSON_PROPERTY_REASSIGNMENT_REASON, - SignatureRequestResponseSignatures.JSON_PROPERTY_REASSIGNED_FROM, - SignatureRequestResponseSignatures.JSON_PROPERTY_ERROR -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestResponseSignatures { - public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; - - public static final String JSON_PROPERTY_SIGNER_GROUP_GUID = "signer_group_guid"; - private String signerGroupGuid; - - public static final String JSON_PROPERTY_SIGNER_EMAIL_ADDRESS = "signer_email_address"; - private String signerEmailAddress; - - public static final String JSON_PROPERTY_SIGNER_NAME = "signer_name"; - private String signerName; - - public static final String JSON_PROPERTY_SIGNER_ROLE = "signer_role"; - private String signerRole; - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private String statusCode; - - public static final String JSON_PROPERTY_DECLINE_REASON = "decline_reason"; - private String declineReason; - - public static final String JSON_PROPERTY_SIGNED_AT = "signed_at"; - private Integer signedAt; - - public static final String JSON_PROPERTY_LAST_VIEWED_AT = "last_viewed_at"; - private Integer lastViewedAt; - - public static final String JSON_PROPERTY_LAST_REMINDED_AT = "last_reminded_at"; - private Integer lastRemindedAt; - - public static final String JSON_PROPERTY_HAS_PIN = "has_pin"; - private Boolean hasPin; - - public static final String JSON_PROPERTY_HAS_SMS_AUTH = "has_sms_auth"; - private Boolean hasSmsAuth; - - public static final String JSON_PROPERTY_HAS_SMS_DELIVERY = "has_sms_delivery"; - private Boolean hasSmsDelivery; - - public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; - - public static final String JSON_PROPERTY_REASSIGNED_BY = "reassigned_by"; - private String reassignedBy; - - public static final String JSON_PROPERTY_REASSIGNMENT_REASON = "reassignment_reason"; - private String reassignmentReason; - - public static final String JSON_PROPERTY_REASSIGNED_FROM = "reassigned_from"; - private String reassignedFrom; - - public static final String JSON_PROPERTY_ERROR = "error"; - private String error; - - public SignatureRequestResponseSignatures() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestResponseSignatures init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestResponseSignatures.class); - } - - public static SignatureRequestResponseSignatures init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestResponseSignatures.class); - } - - public SignatureRequestResponseSignatures signatureId(String signatureId) { - this.signatureId = signatureId; - return this; - } - - /** - * Signature identifier. - * - * @return signatureId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignatureId() { - return signatureId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { - this.signatureId = signatureId; - } - - public SignatureRequestResponseSignatures signerGroupGuid(String signerGroupGuid) { - this.signerGroupGuid = signerGroupGuid; - return this; - } - - /** - * Signer Group GUID - * - * @return signerGroupGuid - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_GROUP_GUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignerGroupGuid() { - return signerGroupGuid; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_GROUP_GUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerGroupGuid(String signerGroupGuid) { - this.signerGroupGuid = signerGroupGuid; - } - - public SignatureRequestResponseSignatures signerEmailAddress(String signerEmailAddress) { - this.signerEmailAddress = signerEmailAddress; - return this; - } - - /** - * The email address of the signer. - * - * @return signerEmailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignerEmailAddress() { - return signerEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerEmailAddress(String signerEmailAddress) { - this.signerEmailAddress = signerEmailAddress; - } - - public SignatureRequestResponseSignatures signerName(String signerName) { - this.signerName = signerName; - return this; - } - - /** - * The name of the signer. - * - * @return signerName - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignerName() { - return signerName; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerName(String signerName) { - this.signerName = signerName; - } - - public SignatureRequestResponseSignatures signerRole(String signerRole) { - this.signerRole = signerRole; - return this; - } - - /** - * The role of the signer. - * - * @return signerRole - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignerRole() { - return signerRole; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRole(String signerRole) { - this.signerRole = signerRole; - } - - public SignatureRequestResponseSignatures order(Integer order) { - this.order = order; - return this; - } - - /** - * If signer order is assigned this is the 0-based index for this signer. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - public SignatureRequestResponseSignatures statusCode(String statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * The current status of the signature. eg: awaiting_signature, signed, declined. - * - * @return statusCode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getStatusCode() { - return statusCode; - } - - @JsonProperty(JSON_PROPERTY_STATUS_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatusCode(String statusCode) { - this.statusCode = statusCode; - } - - public SignatureRequestResponseSignatures declineReason(String declineReason) { - this.declineReason = declineReason; - return this; - } - - /** - * The reason provided by the signer for declining the request. - * - * @return declineReason - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DECLINE_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeclineReason() { - return declineReason; - } - - @JsonProperty(JSON_PROPERTY_DECLINE_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclineReason(String declineReason) { - this.declineReason = declineReason; - } - - public SignatureRequestResponseSignatures signedAt(Integer signedAt) { - this.signedAt = signedAt; - return this; - } - - /** - * Time that the document was signed or null. - * - * @return signedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSignedAt() { - return signedAt; - } - - @JsonProperty(JSON_PROPERTY_SIGNED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignedAt(Integer signedAt) { - this.signedAt = signedAt; - } - - public SignatureRequestResponseSignatures lastViewedAt(Integer lastViewedAt) { - this.lastViewedAt = lastViewedAt; - return this; - } - - /** - * The time that the document was last viewed by this signer or null. - * - * @return lastViewedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LAST_VIEWED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLastViewedAt() { - return lastViewedAt; - } - - @JsonProperty(JSON_PROPERTY_LAST_VIEWED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastViewedAt(Integer lastViewedAt) { - this.lastViewedAt = lastViewedAt; - } - - public SignatureRequestResponseSignatures lastRemindedAt(Integer lastRemindedAt) { - this.lastRemindedAt = lastRemindedAt; - return this; - } - - /** - * The time the last reminder email was sent to the signer or null. - * - * @return lastRemindedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LAST_REMINDED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getLastRemindedAt() { - return lastRemindedAt; - } - - @JsonProperty(JSON_PROPERTY_LAST_REMINDED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastRemindedAt(Integer lastRemindedAt) { - this.lastRemindedAt = lastRemindedAt; - } - - public SignatureRequestResponseSignatures hasPin(Boolean hasPin) { - this.hasPin = hasPin; - return this; - } - - /** - * Boolean to indicate whether this signature requires a PIN to access. - * - * @return hasPin - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HAS_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasPin() { - return hasPin; - } - - @JsonProperty(JSON_PROPERTY_HAS_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasPin(Boolean hasPin) { - this.hasPin = hasPin; - } - - public SignatureRequestResponseSignatures hasSmsAuth(Boolean hasSmsAuth) { - this.hasSmsAuth = hasSmsAuth; - return this; - } - - /** - * Boolean to indicate whether this signature has SMS authentication enabled. - * - * @return hasSmsAuth - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HAS_SMS_AUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasSmsAuth() { - return hasSmsAuth; - } - - @JsonProperty(JSON_PROPERTY_HAS_SMS_AUTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsAuth(Boolean hasSmsAuth) { - this.hasSmsAuth = hasSmsAuth; - } - - public SignatureRequestResponseSignatures hasSmsDelivery(Boolean hasSmsDelivery) { - this.hasSmsDelivery = hasSmsDelivery; - return this; - } - - /** - * Boolean to indicate whether this signature has SMS delivery enabled. - * - * @return hasSmsDelivery - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HAS_SMS_DELIVERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHasSmsDelivery() { - return hasSmsDelivery; - } - - @JsonProperty(JSON_PROPERTY_HAS_SMS_DELIVERY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsDelivery(Boolean hasSmsDelivery) { - this.hasSmsDelivery = hasSmsDelivery; - } - - public SignatureRequestResponseSignatures smsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - return this; - } - - /** - * The SMS phone number used for authentication or signature request delivery. - * - * @return smsPhoneNumber - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmsPhoneNumber() { - return smsPhoneNumber; - } - - @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - } - - public SignatureRequestResponseSignatures reassignedBy(String reassignedBy) { - this.reassignedBy = reassignedBy; - return this; - } - - /** - * Email address of original signer who reassigned to this signer. - * - * @return reassignedBy - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REASSIGNED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReassignedBy() { - return reassignedBy; - } - - @JsonProperty(JSON_PROPERTY_REASSIGNED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedBy(String reassignedBy) { - this.reassignedBy = reassignedBy; - } - - public SignatureRequestResponseSignatures reassignmentReason(String reassignmentReason) { - this.reassignmentReason = reassignmentReason; - return this; - } - - /** - * Reason provided by original signer who reassigned to this signer. - * - * @return reassignmentReason - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REASSIGNMENT_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReassignmentReason() { - return reassignmentReason; - } - - @JsonProperty(JSON_PROPERTY_REASSIGNMENT_REASON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignmentReason(String reassignmentReason) { - this.reassignmentReason = reassignmentReason; - } - - public SignatureRequestResponseSignatures reassignedFrom(String reassignedFrom) { - this.reassignedFrom = reassignedFrom; - return this; - } - - /** - * Previous signature identifier. - * - * @return reassignedFrom - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REASSIGNED_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getReassignedFrom() { - return reassignedFrom; - } - - @JsonProperty(JSON_PROPERTY_REASSIGNED_FROM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedFrom(String reassignedFrom) { - this.reassignedFrom = reassignedFrom; - } - - public SignatureRequestResponseSignatures error(String error) { - this.error = error; - return this; - } - - /** - * Error message pertaining to this signer, or null. - * - * @return error - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getError() { - return error; - } - - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(String error) { - this.error = error; - } - - /** Return true if this SignatureRequestResponseSignatures object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestResponseSignatures signatureRequestResponseSignatures = - (SignatureRequestResponseSignatures) o; - return Objects.equals(this.signatureId, signatureRequestResponseSignatures.signatureId) - && Objects.equals( - this.signerGroupGuid, signatureRequestResponseSignatures.signerGroupGuid) - && Objects.equals( - this.signerEmailAddress, - signatureRequestResponseSignatures.signerEmailAddress) - && Objects.equals(this.signerName, signatureRequestResponseSignatures.signerName) - && Objects.equals(this.signerRole, signatureRequestResponseSignatures.signerRole) - && Objects.equals(this.order, signatureRequestResponseSignatures.order) - && Objects.equals(this.statusCode, signatureRequestResponseSignatures.statusCode) - && Objects.equals( - this.declineReason, signatureRequestResponseSignatures.declineReason) - && Objects.equals(this.signedAt, signatureRequestResponseSignatures.signedAt) - && Objects.equals( - this.lastViewedAt, signatureRequestResponseSignatures.lastViewedAt) - && Objects.equals( - this.lastRemindedAt, signatureRequestResponseSignatures.lastRemindedAt) - && Objects.equals(this.hasPin, signatureRequestResponseSignatures.hasPin) - && Objects.equals(this.hasSmsAuth, signatureRequestResponseSignatures.hasSmsAuth) - && Objects.equals( - this.hasSmsDelivery, signatureRequestResponseSignatures.hasSmsDelivery) - && Objects.equals( - this.smsPhoneNumber, signatureRequestResponseSignatures.smsPhoneNumber) - && Objects.equals( - this.reassignedBy, signatureRequestResponseSignatures.reassignedBy) - && Objects.equals( - this.reassignmentReason, - signatureRequestResponseSignatures.reassignmentReason) - && Objects.equals( - this.reassignedFrom, signatureRequestResponseSignatures.reassignedFrom) - && Objects.equals(this.error, signatureRequestResponseSignatures.error); - } - - @Override - public int hashCode() { - return Objects.hash( - signatureId, - signerGroupGuid, - signerEmailAddress, - signerName, - signerRole, - order, - statusCode, - declineReason, - signedAt, - lastViewedAt, - lastRemindedAt, - hasPin, - hasSmsAuth, - hasSmsDelivery, - smsPhoneNumber, - reassignedBy, - reassignmentReason, - reassignedFrom, - error); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestResponseSignatures {\n"); - sb.append(" signatureId: ").append(toIndentedString(signatureId)).append("\n"); - sb.append(" signerGroupGuid: ").append(toIndentedString(signerGroupGuid)).append("\n"); - sb.append(" signerEmailAddress: ") - .append(toIndentedString(signerEmailAddress)) - .append("\n"); - sb.append(" signerName: ").append(toIndentedString(signerName)).append("\n"); - sb.append(" signerRole: ").append(toIndentedString(signerRole)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); - sb.append(" declineReason: ").append(toIndentedString(declineReason)).append("\n"); - sb.append(" signedAt: ").append(toIndentedString(signedAt)).append("\n"); - sb.append(" lastViewedAt: ").append(toIndentedString(lastViewedAt)).append("\n"); - sb.append(" lastRemindedAt: ").append(toIndentedString(lastRemindedAt)).append("\n"); - sb.append(" hasPin: ").append(toIndentedString(hasPin)).append("\n"); - sb.append(" hasSmsAuth: ").append(toIndentedString(hasSmsAuth)).append("\n"); - sb.append(" hasSmsDelivery: ").append(toIndentedString(hasSmsDelivery)).append("\n"); - sb.append(" smsPhoneNumber: ").append(toIndentedString(smsPhoneNumber)).append("\n"); - sb.append(" reassignedBy: ").append(toIndentedString(reassignedBy)).append("\n"); - sb.append(" reassignmentReason: ") - .append(toIndentedString(reassignmentReason)) - .append("\n"); - sb.append(" reassignedFrom: ").append(toIndentedString(reassignedFrom)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signatureId != null) { - if (isFileTypeOrListOfFiles(signatureId)) { - fileTypeFound = true; - } - - if (signatureId.getClass().equals(java.io.File.class) - || signatureId.getClass().equals(Integer.class) - || signatureId.getClass().equals(String.class) - || signatureId.getClass().isEnum()) { - map.put("signature_id", signatureId); - } else if (isListOfFile(signatureId)) { - for (int i = 0; i < getListSize(signatureId); i++) { - map.put("signature_id[" + i + "]", getFromList(signatureId, i)); - } - } else { - map.put( - "signature_id", - JSON.getDefault().getMapper().writeValueAsString(signatureId)); - } - } - if (signerGroupGuid != null) { - if (isFileTypeOrListOfFiles(signerGroupGuid)) { - fileTypeFound = true; - } - - if (signerGroupGuid.getClass().equals(java.io.File.class) - || signerGroupGuid.getClass().equals(Integer.class) - || signerGroupGuid.getClass().equals(String.class) - || signerGroupGuid.getClass().isEnum()) { - map.put("signer_group_guid", signerGroupGuid); - } else if (isListOfFile(signerGroupGuid)) { - for (int i = 0; i < getListSize(signerGroupGuid); i++) { - map.put("signer_group_guid[" + i + "]", getFromList(signerGroupGuid, i)); - } - } else { - map.put( - "signer_group_guid", - JSON.getDefault().getMapper().writeValueAsString(signerGroupGuid)); - } - } - if (signerEmailAddress != null) { - if (isFileTypeOrListOfFiles(signerEmailAddress)) { - fileTypeFound = true; - } - - if (signerEmailAddress.getClass().equals(java.io.File.class) - || signerEmailAddress.getClass().equals(Integer.class) - || signerEmailAddress.getClass().equals(String.class) - || signerEmailAddress.getClass().isEnum()) { - map.put("signer_email_address", signerEmailAddress); - } else if (isListOfFile(signerEmailAddress)) { - for (int i = 0; i < getListSize(signerEmailAddress); i++) { - map.put( - "signer_email_address[" + i + "]", - getFromList(signerEmailAddress, i)); - } - } else { - map.put( - "signer_email_address", - JSON.getDefault().getMapper().writeValueAsString(signerEmailAddress)); - } - } - if (signerName != null) { - if (isFileTypeOrListOfFiles(signerName)) { - fileTypeFound = true; - } - - if (signerName.getClass().equals(java.io.File.class) - || signerName.getClass().equals(Integer.class) - || signerName.getClass().equals(String.class) - || signerName.getClass().isEnum()) { - map.put("signer_name", signerName); - } else if (isListOfFile(signerName)) { - for (int i = 0; i < getListSize(signerName); i++) { - map.put("signer_name[" + i + "]", getFromList(signerName, i)); - } - } else { - map.put( - "signer_name", - JSON.getDefault().getMapper().writeValueAsString(signerName)); - } - } - if (signerRole != null) { - if (isFileTypeOrListOfFiles(signerRole)) { - fileTypeFound = true; - } - - if (signerRole.getClass().equals(java.io.File.class) - || signerRole.getClass().equals(Integer.class) - || signerRole.getClass().equals(String.class) - || signerRole.getClass().isEnum()) { - map.put("signer_role", signerRole); - } else if (isListOfFile(signerRole)) { - for (int i = 0; i < getListSize(signerRole); i++) { - map.put("signer_role[" + i + "]", getFromList(signerRole, i)); - } - } else { - map.put( - "signer_role", - JSON.getDefault().getMapper().writeValueAsString(signerRole)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - if (statusCode != null) { - if (isFileTypeOrListOfFiles(statusCode)) { - fileTypeFound = true; - } - - if (statusCode.getClass().equals(java.io.File.class) - || statusCode.getClass().equals(Integer.class) - || statusCode.getClass().equals(String.class) - || statusCode.getClass().isEnum()) { - map.put("status_code", statusCode); - } else if (isListOfFile(statusCode)) { - for (int i = 0; i < getListSize(statusCode); i++) { - map.put("status_code[" + i + "]", getFromList(statusCode, i)); - } - } else { - map.put( - "status_code", - JSON.getDefault().getMapper().writeValueAsString(statusCode)); - } - } - if (declineReason != null) { - if (isFileTypeOrListOfFiles(declineReason)) { - fileTypeFound = true; - } - - if (declineReason.getClass().equals(java.io.File.class) - || declineReason.getClass().equals(Integer.class) - || declineReason.getClass().equals(String.class) - || declineReason.getClass().isEnum()) { - map.put("decline_reason", declineReason); - } else if (isListOfFile(declineReason)) { - for (int i = 0; i < getListSize(declineReason); i++) { - map.put("decline_reason[" + i + "]", getFromList(declineReason, i)); - } - } else { - map.put( - "decline_reason", - JSON.getDefault().getMapper().writeValueAsString(declineReason)); - } - } - if (signedAt != null) { - if (isFileTypeOrListOfFiles(signedAt)) { - fileTypeFound = true; - } - - if (signedAt.getClass().equals(java.io.File.class) - || signedAt.getClass().equals(Integer.class) - || signedAt.getClass().equals(String.class) - || signedAt.getClass().isEnum()) { - map.put("signed_at", signedAt); - } else if (isListOfFile(signedAt)) { - for (int i = 0; i < getListSize(signedAt); i++) { - map.put("signed_at[" + i + "]", getFromList(signedAt, i)); - } - } else { - map.put( - "signed_at", - JSON.getDefault().getMapper().writeValueAsString(signedAt)); - } - } - if (lastViewedAt != null) { - if (isFileTypeOrListOfFiles(lastViewedAt)) { - fileTypeFound = true; - } - - if (lastViewedAt.getClass().equals(java.io.File.class) - || lastViewedAt.getClass().equals(Integer.class) - || lastViewedAt.getClass().equals(String.class) - || lastViewedAt.getClass().isEnum()) { - map.put("last_viewed_at", lastViewedAt); - } else if (isListOfFile(lastViewedAt)) { - for (int i = 0; i < getListSize(lastViewedAt); i++) { - map.put("last_viewed_at[" + i + "]", getFromList(lastViewedAt, i)); - } - } else { - map.put( - "last_viewed_at", - JSON.getDefault().getMapper().writeValueAsString(lastViewedAt)); - } - } - if (lastRemindedAt != null) { - if (isFileTypeOrListOfFiles(lastRemindedAt)) { - fileTypeFound = true; - } - - if (lastRemindedAt.getClass().equals(java.io.File.class) - || lastRemindedAt.getClass().equals(Integer.class) - || lastRemindedAt.getClass().equals(String.class) - || lastRemindedAt.getClass().isEnum()) { - map.put("last_reminded_at", lastRemindedAt); - } else if (isListOfFile(lastRemindedAt)) { - for (int i = 0; i < getListSize(lastRemindedAt); i++) { - map.put("last_reminded_at[" + i + "]", getFromList(lastRemindedAt, i)); - } - } else { - map.put( - "last_reminded_at", - JSON.getDefault().getMapper().writeValueAsString(lastRemindedAt)); - } - } - if (hasPin != null) { - if (isFileTypeOrListOfFiles(hasPin)) { - fileTypeFound = true; - } - - if (hasPin.getClass().equals(java.io.File.class) - || hasPin.getClass().equals(Integer.class) - || hasPin.getClass().equals(String.class) - || hasPin.getClass().isEnum()) { - map.put("has_pin", hasPin); - } else if (isListOfFile(hasPin)) { - for (int i = 0; i < getListSize(hasPin); i++) { - map.put("has_pin[" + i + "]", getFromList(hasPin, i)); - } - } else { - map.put("has_pin", JSON.getDefault().getMapper().writeValueAsString(hasPin)); - } - } - if (hasSmsAuth != null) { - if (isFileTypeOrListOfFiles(hasSmsAuth)) { - fileTypeFound = true; - } - - if (hasSmsAuth.getClass().equals(java.io.File.class) - || hasSmsAuth.getClass().equals(Integer.class) - || hasSmsAuth.getClass().equals(String.class) - || hasSmsAuth.getClass().isEnum()) { - map.put("has_sms_auth", hasSmsAuth); - } else if (isListOfFile(hasSmsAuth)) { - for (int i = 0; i < getListSize(hasSmsAuth); i++) { - map.put("has_sms_auth[" + i + "]", getFromList(hasSmsAuth, i)); - } - } else { - map.put( - "has_sms_auth", - JSON.getDefault().getMapper().writeValueAsString(hasSmsAuth)); - } - } - if (hasSmsDelivery != null) { - if (isFileTypeOrListOfFiles(hasSmsDelivery)) { - fileTypeFound = true; - } - - if (hasSmsDelivery.getClass().equals(java.io.File.class) - || hasSmsDelivery.getClass().equals(Integer.class) - || hasSmsDelivery.getClass().equals(String.class) - || hasSmsDelivery.getClass().isEnum()) { - map.put("has_sms_delivery", hasSmsDelivery); - } else if (isListOfFile(hasSmsDelivery)) { - for (int i = 0; i < getListSize(hasSmsDelivery); i++) { - map.put("has_sms_delivery[" + i + "]", getFromList(hasSmsDelivery, i)); - } - } else { - map.put( - "has_sms_delivery", - JSON.getDefault().getMapper().writeValueAsString(hasSmsDelivery)); - } - } - if (smsPhoneNumber != null) { - if (isFileTypeOrListOfFiles(smsPhoneNumber)) { - fileTypeFound = true; - } - - if (smsPhoneNumber.getClass().equals(java.io.File.class) - || smsPhoneNumber.getClass().equals(Integer.class) - || smsPhoneNumber.getClass().equals(String.class) - || smsPhoneNumber.getClass().isEnum()) { - map.put("sms_phone_number", smsPhoneNumber); - } else if (isListOfFile(smsPhoneNumber)) { - for (int i = 0; i < getListSize(smsPhoneNumber); i++) { - map.put("sms_phone_number[" + i + "]", getFromList(smsPhoneNumber, i)); - } - } else { - map.put( - "sms_phone_number", - JSON.getDefault().getMapper().writeValueAsString(smsPhoneNumber)); - } - } - if (reassignedBy != null) { - if (isFileTypeOrListOfFiles(reassignedBy)) { - fileTypeFound = true; - } - - if (reassignedBy.getClass().equals(java.io.File.class) - || reassignedBy.getClass().equals(Integer.class) - || reassignedBy.getClass().equals(String.class) - || reassignedBy.getClass().isEnum()) { - map.put("reassigned_by", reassignedBy); - } else if (isListOfFile(reassignedBy)) { - for (int i = 0; i < getListSize(reassignedBy); i++) { - map.put("reassigned_by[" + i + "]", getFromList(reassignedBy, i)); - } - } else { - map.put( - "reassigned_by", - JSON.getDefault().getMapper().writeValueAsString(reassignedBy)); - } - } - if (reassignmentReason != null) { - if (isFileTypeOrListOfFiles(reassignmentReason)) { - fileTypeFound = true; - } - - if (reassignmentReason.getClass().equals(java.io.File.class) - || reassignmentReason.getClass().equals(Integer.class) - || reassignmentReason.getClass().equals(String.class) - || reassignmentReason.getClass().isEnum()) { - map.put("reassignment_reason", reassignmentReason); - } else if (isListOfFile(reassignmentReason)) { - for (int i = 0; i < getListSize(reassignmentReason); i++) { - map.put( - "reassignment_reason[" + i + "]", - getFromList(reassignmentReason, i)); - } - } else { - map.put( - "reassignment_reason", - JSON.getDefault().getMapper().writeValueAsString(reassignmentReason)); - } - } - if (reassignedFrom != null) { - if (isFileTypeOrListOfFiles(reassignedFrom)) { - fileTypeFound = true; - } - - if (reassignedFrom.getClass().equals(java.io.File.class) - || reassignedFrom.getClass().equals(Integer.class) - || reassignedFrom.getClass().equals(String.class) - || reassignedFrom.getClass().isEnum()) { - map.put("reassigned_from", reassignedFrom); - } else if (isListOfFile(reassignedFrom)) { - for (int i = 0; i < getListSize(reassignedFrom); i++) { - map.put("reassigned_from[" + i + "]", getFromList(reassignedFrom, i)); - } - } else { - map.put( - "reassigned_from", - JSON.getDefault().getMapper().writeValueAsString(reassignedFrom)); - } - } - if (error != null) { - if (isFileTypeOrListOfFiles(error)) { - fileTypeFound = true; - } - - if (error.getClass().equals(java.io.File.class) - || error.getClass().equals(Integer.class) - || error.getClass().equals(String.class) - || error.getClass().isEnum()) { - map.put("error", error); - } else if (isListOfFile(error)) { - for (int i = 0; i < getListSize(error); i++) { - map.put("error[" + i + "]", getFromList(error, i)); - } - } else { - map.put("error", JSON.getDefault().getMapper().writeValueAsString(error)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java deleted file mode 100644 index 06f7431dc..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java +++ /dev/null @@ -1,1559 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestSendRequest */ -@JsonPropertyOrder({ - SignatureRequestSendRequest.JSON_PROPERTY_FILES, - SignatureRequestSendRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestSendRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestSendRequest.JSON_PROPERTY_GROUPED_SIGNERS, - SignatureRequestSendRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestSendRequest.JSON_PROPERTY_ALLOW_REASSIGN, - SignatureRequestSendRequest.JSON_PROPERTY_ATTACHMENTS, - SignatureRequestSendRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - SignatureRequestSendRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestSendRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestSendRequest.JSON_PROPERTY_FIELD_OPTIONS, - SignatureRequestSendRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - SignatureRequestSendRequest.JSON_PROPERTY_FORM_FIELD_RULES, - SignatureRequestSendRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - SignatureRequestSendRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - SignatureRequestSendRequest.JSON_PROPERTY_IS_QUALIFIED_SIGNATURE, - SignatureRequestSendRequest.JSON_PROPERTY_IS_EID, - SignatureRequestSendRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestSendRequest.JSON_PROPERTY_METADATA, - SignatureRequestSendRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestSendRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestSendRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestSendRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestSendRequest.JSON_PROPERTY_TITLE, - SignatureRequestSendRequest.JSON_PROPERTY_USE_TEXT_TAGS, - SignatureRequestSendRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestSendRequest { - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; - - public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public SignatureRequestSendRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestSendRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestSendRequest.class); - } - - public static SignatureRequestSendRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestSendRequest.class); - } - - public SignatureRequestSendRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestSendRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestSendRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestSendRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public SignatureRequestSendRequest signers(List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestSendRequest addSignersItem(SubSignatureRequestSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestSendRequest groupedSigners( - List groupedSigners) { - this.groupedSigners = groupedSigners; - return this; - } - - public SignatureRequestSendRequest addGroupedSignersItem( - SubSignatureRequestGroupedSigners groupedSignersItem) { - if (this.groupedSigners == null) { - this.groupedSigners = new ArrayList<>(); - } - this.groupedSigners.add(groupedSignersItem); - return this; - } - - /** - * Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or - * **grouped_signers**, but not both. - * - * @return groupedSigners - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroupedSigners() { - return groupedSigners; - } - - @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { - this.groupedSigners = groupedSigners; - } - - public SignatureRequestSendRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestSendRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public SignatureRequestSendRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public SignatureRequestSendRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public SignatureRequestSendRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public SignatureRequestSendRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public SignatureRequestSendRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * The client id of the API App you want to associate with this request. Used to apply the - * branding and callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestSendRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestSendRequest addCustomFieldsItem(SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestSendRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public SignatureRequestSendRequest formFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public SignatureRequestSendRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public SignatureRequestSendRequest formFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public SignatureRequestSendRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public SignatureRequestSendRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public SignatureRequestSendRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public SignatureRequestSendRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way - * can cause unwanted clipping. We recommend leaving this setting on `false` and - * instead hiding your text tags using white text or a similar approach. See the [Text Tags - * Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more - * information. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - @Deprecated - public SignatureRequestSendRequest isQualifiedSignature(Boolean isQualifiedSignature) { - this.isQualifiedSignature = isQualifiedSignature; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Qualified Electronic - * Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which - * requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is - * only available on the Premium API plan as an add-on purchase. Cannot be used in - * `test_mode`. Only works on requests with one signer. - * - * @return isQualifiedSignature - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsQualifiedSignature() { - return isQualifiedSignature; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { - this.isQualifiedSignature = isQualifiedSignature; - } - - public SignatureRequestSendRequest isEid(Boolean isEid) { - this.isEid = isEid; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [electronic identification - * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify - * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only - * available on the Premium API plan. Cannot be used in `test_mode`. Only works on - * requests with one signer. - * - * @return isEid - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEid() { - return isEid; - } - - @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { - this.isEid = isEid; - } - - public SignatureRequestSendRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestSendRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestSendRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestSendRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestSendRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestSendRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestSendRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestSendRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public SignatureRequestSendRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document. Defaults to disabled, or `false`. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public SignatureRequestSendRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this SignatureRequestSendRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestSendRequest signatureRequestSendRequest = (SignatureRequestSendRequest) o; - return Objects.equals(this.files, signatureRequestSendRequest.files) - && Objects.equals(this.fileUrls, signatureRequestSendRequest.fileUrls) - && Objects.equals(this.signers, signatureRequestSendRequest.signers) - && Objects.equals(this.groupedSigners, signatureRequestSendRequest.groupedSigners) - && Objects.equals(this.allowDecline, signatureRequestSendRequest.allowDecline) - && Objects.equals(this.allowReassign, signatureRequestSendRequest.allowReassign) - && Objects.equals(this.attachments, signatureRequestSendRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, signatureRequestSendRequest.ccEmailAddresses) - && Objects.equals(this.clientId, signatureRequestSendRequest.clientId) - && Objects.equals(this.customFields, signatureRequestSendRequest.customFields) - && Objects.equals(this.fieldOptions, signatureRequestSendRequest.fieldOptions) - && Objects.equals(this.formFieldGroups, signatureRequestSendRequest.formFieldGroups) - && Objects.equals(this.formFieldRules, signatureRequestSendRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - signatureRequestSendRequest.formFieldsPerDocument) - && Objects.equals(this.hideTextTags, signatureRequestSendRequest.hideTextTags) - && Objects.equals( - this.isQualifiedSignature, signatureRequestSendRequest.isQualifiedSignature) - && Objects.equals(this.isEid, signatureRequestSendRequest.isEid) - && Objects.equals(this.message, signatureRequestSendRequest.message) - && Objects.equals(this.metadata, signatureRequestSendRequest.metadata) - && Objects.equals(this.signingOptions, signatureRequestSendRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, signatureRequestSendRequest.signingRedirectUrl) - && Objects.equals(this.subject, signatureRequestSendRequest.subject) - && Objects.equals(this.testMode, signatureRequestSendRequest.testMode) - && Objects.equals(this.title, signatureRequestSendRequest.title) - && Objects.equals(this.useTextTags, signatureRequestSendRequest.useTextTags) - && Objects.equals(this.expiresAt, signatureRequestSendRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - files, - fileUrls, - signers, - groupedSigners, - allowDecline, - allowReassign, - attachments, - ccEmailAddresses, - clientId, - customFields, - fieldOptions, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - isQualifiedSignature, - isEid, - message, - metadata, - signingOptions, - signingRedirectUrl, - subject, - testMode, - title, - useTextTags, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestSendRequest {\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" groupedSigners: ").append(toIndentedString(groupedSigners)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" isQualifiedSignature: ") - .append(toIndentedString(isQualifiedSignature)) - .append("\n"); - sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (groupedSigners != null) { - if (isFileTypeOrListOfFiles(groupedSigners)) { - fileTypeFound = true; - } - - if (groupedSigners.getClass().equals(java.io.File.class) - || groupedSigners.getClass().equals(Integer.class) - || groupedSigners.getClass().equals(String.class) - || groupedSigners.getClass().isEnum()) { - map.put("grouped_signers", groupedSigners); - } else if (isListOfFile(groupedSigners)) { - for (int i = 0; i < getListSize(groupedSigners); i++) { - map.put("grouped_signers[" + i + "]", getFromList(groupedSigners, i)); - } - } else { - map.put( - "grouped_signers", - JSON.getDefault().getMapper().writeValueAsString(groupedSigners)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (isQualifiedSignature != null) { - if (isFileTypeOrListOfFiles(isQualifiedSignature)) { - fileTypeFound = true; - } - - if (isQualifiedSignature.getClass().equals(java.io.File.class) - || isQualifiedSignature.getClass().equals(Integer.class) - || isQualifiedSignature.getClass().equals(String.class) - || isQualifiedSignature.getClass().isEnum()) { - map.put("is_qualified_signature", isQualifiedSignature); - } else if (isListOfFile(isQualifiedSignature)) { - for (int i = 0; i < getListSize(isQualifiedSignature); i++) { - map.put( - "is_qualified_signature[" + i + "]", - getFromList(isQualifiedSignature, i)); - } - } else { - map.put( - "is_qualified_signature", - JSON.getDefault().getMapper().writeValueAsString(isQualifiedSignature)); - } - } - if (isEid != null) { - if (isFileTypeOrListOfFiles(isEid)) { - fileTypeFound = true; - } - - if (isEid.getClass().equals(java.io.File.class) - || isEid.getClass().equals(Integer.class) - || isEid.getClass().equals(String.class) - || isEid.getClass().isEnum()) { - map.put("is_eid", isEid); - } else if (isListOfFile(isEid)) { - for (int i = 0; i < getListSize(isEid); i++) { - map.put("is_eid[" + i + "]", getFromList(isEid, i)); - } - } else { - map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java deleted file mode 100644 index f8ae12ab6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java +++ /dev/null @@ -1,1047 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** */ -@JsonPropertyOrder({ - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_SIGNERS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_CCS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_FILES, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_FILE_URLS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_IS_QUALIFIED_SIGNATURE, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_IS_EID, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_MESSAGE, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_METADATA, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_SUBJECT, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - SignatureRequestSendWithTemplateRequest.JSON_PROPERTY_TITLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestSendWithTemplateRequest { - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; - - public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public SignatureRequestSendWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestSendWithTemplateRequest init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, SignatureRequestSendWithTemplateRequest.class); - } - - public static SignatureRequestSendWithTemplateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestSendWithTemplateRequest.class); - } - - public SignatureRequestSendWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public SignatureRequestSendWithTemplateRequest addTemplateIdsItem(String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the template will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public SignatureRequestSendWithTemplateRequest signers( - List signers) { - this.signers = signers; - return this; - } - - public SignatureRequestSendWithTemplateRequest addSignersItem( - SubSignatureRequestTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. - * - * @return signers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SignatureRequestSendWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public SignatureRequestSendWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public SignatureRequestSendWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public SignatureRequestSendWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app to associate with the signature request. Used to apply the branding and - * callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public SignatureRequestSendWithTemplateRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SignatureRequestSendWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array defining values and options for custom fields. Required when a custom field exists - * in the Template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SignatureRequestSendWithTemplateRequest files(List files) { - this.files = files; - return this; - } - - public SignatureRequestSendWithTemplateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public SignatureRequestSendWithTemplateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public SignatureRequestSendWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - @Deprecated - public SignatureRequestSendWithTemplateRequest isQualifiedSignature( - Boolean isQualifiedSignature) { - this.isQualifiedSignature = isQualifiedSignature; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [Qualified Electronic - * Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which - * requires a face-to-face call to verify the signer's identity.<br> **NOTE:** QES is - * only available on the Premium API plan as an add-on purchase. Cannot be used in - * `test_mode`. Only works on requests with one signer. - * - * @return isQualifiedSignature - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsQualifiedSignature() { - return isQualifiedSignature; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { - this.isQualifiedSignature = isQualifiedSignature; - } - - public SignatureRequestSendWithTemplateRequest isEid(Boolean isEid) { - this.isEid = isEid; - return this; - } - - /** - * Send with a value of `true` if you wish to enable [electronic identification - * (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify - * their identity with an eID provider to sign a document.<br> **NOTE:** eID is only - * available on the Premium API plan. Cannot be used in `test_mode`. Only works on - * requests with one signer. - * - * @return isEid - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEid() { - return isEid; - } - - @JsonProperty(JSON_PROPERTY_IS_EID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { - this.isEid = isEid; - } - - public SignatureRequestSendWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public SignatureRequestSendWithTemplateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public SignatureRequestSendWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public SignatureRequestSendWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public SignatureRequestSendWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public SignatureRequestSendWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public SignatureRequestSendWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request will not be legally binding if set to - * `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public SignatureRequestSendWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - /** Return true if this SignatureRequestSendWithTemplateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestSendWithTemplateRequest signatureRequestSendWithTemplateRequest = - (SignatureRequestSendWithTemplateRequest) o; - return Objects.equals(this.templateIds, signatureRequestSendWithTemplateRequest.templateIds) - && Objects.equals(this.signers, signatureRequestSendWithTemplateRequest.signers) - && Objects.equals( - this.allowDecline, signatureRequestSendWithTemplateRequest.allowDecline) - && Objects.equals(this.ccs, signatureRequestSendWithTemplateRequest.ccs) - && Objects.equals(this.clientId, signatureRequestSendWithTemplateRequest.clientId) - && Objects.equals( - this.customFields, signatureRequestSendWithTemplateRequest.customFields) - && Objects.equals(this.files, signatureRequestSendWithTemplateRequest.files) - && Objects.equals(this.fileUrls, signatureRequestSendWithTemplateRequest.fileUrls) - && Objects.equals( - this.isQualifiedSignature, - signatureRequestSendWithTemplateRequest.isQualifiedSignature) - && Objects.equals(this.isEid, signatureRequestSendWithTemplateRequest.isEid) - && Objects.equals(this.message, signatureRequestSendWithTemplateRequest.message) - && Objects.equals(this.metadata, signatureRequestSendWithTemplateRequest.metadata) - && Objects.equals( - this.signingOptions, signatureRequestSendWithTemplateRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, - signatureRequestSendWithTemplateRequest.signingRedirectUrl) - && Objects.equals(this.subject, signatureRequestSendWithTemplateRequest.subject) - && Objects.equals(this.testMode, signatureRequestSendWithTemplateRequest.testMode) - && Objects.equals(this.title, signatureRequestSendWithTemplateRequest.title); - } - - @Override - public int hashCode() { - return Objects.hash( - templateIds, - signers, - allowDecline, - ccs, - clientId, - customFields, - files, - fileUrls, - isQualifiedSignature, - isEid, - message, - metadata, - signingOptions, - signingRedirectUrl, - subject, - testMode, - title); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestSendWithTemplateRequest {\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" isQualifiedSignature: ") - .append(toIndentedString(isQualifiedSignature)) - .append("\n"); - sb.append(" isEid: ").append(toIndentedString(isEid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (isQualifiedSignature != null) { - if (isFileTypeOrListOfFiles(isQualifiedSignature)) { - fileTypeFound = true; - } - - if (isQualifiedSignature.getClass().equals(java.io.File.class) - || isQualifiedSignature.getClass().equals(Integer.class) - || isQualifiedSignature.getClass().equals(String.class) - || isQualifiedSignature.getClass().isEnum()) { - map.put("is_qualified_signature", isQualifiedSignature); - } else if (isListOfFile(isQualifiedSignature)) { - for (int i = 0; i < getListSize(isQualifiedSignature); i++) { - map.put( - "is_qualified_signature[" + i + "]", - getFromList(isQualifiedSignature, i)); - } - } else { - map.put( - "is_qualified_signature", - JSON.getDefault().getMapper().writeValueAsString(isQualifiedSignature)); - } - } - if (isEid != null) { - if (isFileTypeOrListOfFiles(isEid)) { - fileTypeFound = true; - } - - if (isEid.getClass().equals(java.io.File.class) - || isEid.getClass().equals(Integer.class) - || isEid.getClass().equals(String.class) - || isEid.getClass().isEnum()) { - map.put("is_eid", isEid); - } else if (isListOfFile(isEid)) { - for (int i = 0; i < getListSize(isEid); i++) { - map.put("is_eid[" + i + "]", getFromList(isEid, i)); - } - } else { - map.put("is_eid", JSON.getDefault().getMapper().writeValueAsString(isEid)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java deleted file mode 100644 index 348174d71..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SignatureRequestUpdateRequest */ -@JsonPropertyOrder({ - SignatureRequestUpdateRequest.JSON_PROPERTY_SIGNATURE_ID, - SignatureRequestUpdateRequest.JSON_PROPERTY_EMAIL_ADDRESS, - SignatureRequestUpdateRequest.JSON_PROPERTY_NAME, - SignatureRequestUpdateRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SignatureRequestUpdateRequest { - public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public SignatureRequestUpdateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SignatureRequestUpdateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SignatureRequestUpdateRequest.class); - } - - public static SignatureRequestUpdateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SignatureRequestUpdateRequest.class); - } - - public SignatureRequestUpdateRequest signatureId(String signatureId) { - this.signatureId = signatureId; - return this; - } - - /** - * The signature ID for the recipient. - * - * @return signatureId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSignatureId() { - return signatureId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureId(String signatureId) { - this.signatureId = signatureId; - } - - public SignatureRequestUpdateRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The new email address for the recipient. This will generate a new `signature_id` - * value. **NOTE:** Optional if `name` is provided. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public SignatureRequestUpdateRequest name(String name) { - this.name = name; - return this; - } - - /** - * The new name for the recipient. **NOTE:** Optional if `email_address` is provided. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public SignatureRequestUpdateRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * The new time when the signature request will expire. Unsigned signatures will be moved to the - * expired status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this SignatureRequestUpdateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SignatureRequestUpdateRequest signatureRequestUpdateRequest = - (SignatureRequestUpdateRequest) o; - return Objects.equals(this.signatureId, signatureRequestUpdateRequest.signatureId) - && Objects.equals(this.emailAddress, signatureRequestUpdateRequest.emailAddress) - && Objects.equals(this.name, signatureRequestUpdateRequest.name) - && Objects.equals(this.expiresAt, signatureRequestUpdateRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash(signatureId, emailAddress, name, expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SignatureRequestUpdateRequest {\n"); - sb.append(" signatureId: ").append(toIndentedString(signatureId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signatureId != null) { - if (isFileTypeOrListOfFiles(signatureId)) { - fileTypeFound = true; - } - - if (signatureId.getClass().equals(java.io.File.class) - || signatureId.getClass().equals(Integer.class) - || signatureId.getClass().equals(String.class) - || signatureId.getClass().isEnum()) { - map.put("signature_id", signatureId); - } else if (isListOfFile(signatureId)) { - for (int i = 0; i < getListSize(signatureId); i++) { - map.put("signature_id[" + i + "]", getFromList(signatureId, i)); - } - } else { - map.put( - "signature_id", - JSON.getDefault().getMapper().writeValueAsString(signatureId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java deleted file mode 100644 index 80a59c963..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubAttachment */ -@JsonPropertyOrder({ - SubAttachment.JSON_PROPERTY_NAME, - SubAttachment.JSON_PROPERTY_SIGNER_INDEX, - SubAttachment.JSON_PROPERTY_INSTRUCTIONS, - SubAttachment.JSON_PROPERTY_REQUIRED -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubAttachment { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SIGNER_INDEX = "signer_index"; - private Integer signerIndex; - - public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; - - public SubAttachment() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubAttachment init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubAttachment.class); - } - - public static SubAttachment init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubAttachment.class); - } - - public SubAttachment name(String name) { - this.name = name; - return this; - } - - /** - * The name of attachment. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubAttachment signerIndex(Integer signerIndex) { - this.signerIndex = signerIndex; - return this; - } - - /** - * The signer's index in the `signers` parameter (0-based indexing). **NOTE:** - * Only one signer can be assigned per attachment. - * - * @return signerIndex - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNER_INDEX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getSignerIndex() { - return signerIndex; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_INDEX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerIndex(Integer signerIndex) { - this.signerIndex = signerIndex; - } - - public SubAttachment instructions(String instructions) { - this.instructions = instructions; - return this; - } - - /** - * The instructions for uploading the attachment. - * - * @return instructions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInstructions() { - return instructions; - } - - @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { - this.instructions = instructions; - } - - public SubAttachment required(Boolean required) { - this.required = required; - return this; - } - - /** - * Determines if the attachment must be uploaded. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - /** Return true if this SubAttachment object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubAttachment subAttachment = (SubAttachment) o; - return Objects.equals(this.name, subAttachment.name) - && Objects.equals(this.signerIndex, subAttachment.signerIndex) - && Objects.equals(this.instructions, subAttachment.instructions) - && Objects.equals(this.required, subAttachment.required); - } - - @Override - public int hashCode() { - return Objects.hash(name, signerIndex, instructions, required); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubAttachment {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" signerIndex: ").append(toIndentedString(signerIndex)).append("\n"); - sb.append(" instructions: ").append(toIndentedString(instructions)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (signerIndex != null) { - if (isFileTypeOrListOfFiles(signerIndex)) { - fileTypeFound = true; - } - - if (signerIndex.getClass().equals(java.io.File.class) - || signerIndex.getClass().equals(Integer.class) - || signerIndex.getClass().equals(String.class) - || signerIndex.getClass().isEnum()) { - map.put("signer_index", signerIndex); - } else if (isListOfFile(signerIndex)) { - for (int i = 0; i < getListSize(signerIndex); i++) { - map.put("signer_index[" + i + "]", getFromList(signerIndex, i)); - } - } else { - map.put( - "signer_index", - JSON.getDefault().getMapper().writeValueAsString(signerIndex)); - } - } - if (instructions != null) { - if (isFileTypeOrListOfFiles(instructions)) { - fileTypeFound = true; - } - - if (instructions.getClass().equals(java.io.File.class) - || instructions.getClass().equals(Integer.class) - || instructions.getClass().equals(String.class) - || instructions.getClass().isEnum()) { - map.put("instructions", instructions); - } else if (isListOfFile(instructions)) { - for (int i = 0; i < getListSize(instructions); i++) { - map.put("instructions[" + i + "]", getFromList(instructions, i)); - } - } else { - map.put( - "instructions", - JSON.getDefault().getMapper().writeValueAsString(instructions)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java deleted file mode 100644 index e857c2e64..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SubBulkSignerList */ -@JsonPropertyOrder({ - SubBulkSignerList.JSON_PROPERTY_CUSTOM_FIELDS, - SubBulkSignerList.JSON_PROPERTY_SIGNERS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubBulkSignerList { - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public SubBulkSignerList() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubBulkSignerList init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubBulkSignerList.class); - } - - public static SubBulkSignerList init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubBulkSignerList.class); - } - - public SubBulkSignerList customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public SubBulkSignerList addCustomFieldsItem(SubBulkSignerListCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array of custom field values. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public SubBulkSignerList signers(List signers) { - this.signers = signers; - return this; - } - - public SubBulkSignerList addSignersItem(SubSignatureRequestTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. Allows the requester to specify editor - * options when a preparing a document. Currently only templates with a single role are - * supported. All signers must have the same `role` value. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - /** Return true if this SubBulkSignerList object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubBulkSignerList subBulkSignerList = (SubBulkSignerList) o; - return Objects.equals(this.customFields, subBulkSignerList.customFields) - && Objects.equals(this.signers, subBulkSignerList.signers); - } - - @Override - public int hashCode() { - return Objects.hash(customFields, signers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubBulkSignerList {\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java deleted file mode 100644 index eb2ca9c7c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubBulkSignerListCustomField */ -@JsonPropertyOrder({ - SubBulkSignerListCustomField.JSON_PROPERTY_NAME, - SubBulkSignerListCustomField.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubBulkSignerListCustomField { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SubBulkSignerListCustomField() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubBulkSignerListCustomField init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubBulkSignerListCustomField.class); - } - - public static SubBulkSignerListCustomField init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubBulkSignerListCustomField.class); - } - - public SubBulkSignerListCustomField name(String name) { - this.name = name; - return this; - } - - /** - * The name of the custom field. Must be the field's `name` or `api_id`. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubBulkSignerListCustomField value(String value) { - this.value = value; - return this; - } - - /** - * The value of the custom field. - * - * @return value - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SubBulkSignerListCustomField object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubBulkSignerListCustomField subBulkSignerListCustomField = - (SubBulkSignerListCustomField) o; - return Objects.equals(this.name, subBulkSignerListCustomField.name) - && Objects.equals(this.value, subBulkSignerListCustomField.value); - } - - @Override - public int hashCode() { - return Objects.hash(name, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubBulkSignerListCustomField {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java deleted file mode 100644 index e84808261..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubCC */ -@JsonPropertyOrder({SubCC.JSON_PROPERTY_ROLE, SubCC.JSON_PROPERTY_EMAIL_ADDRESS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubCC { - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public SubCC() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubCC init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubCC.class); - } - - public static SubCC init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubCC.class); - } - - public SubCC role(String role) { - this.role = role; - return this; - } - - /** - * Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the - * same CC role. - * - * @return role - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { - this.role = role; - } - - public SubCC emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the CC recipient. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this SubCC object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubCC subCC = (SubCC) o; - return Objects.equals(this.role, subCC.role) - && Objects.equals(this.emailAddress, subCC.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(role, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubCC {\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java deleted file mode 100644 index a9a7d92f1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * When used together with merge fields, `custom_fields` allows users to add pre-filled - * data to their signature requests. Pre-filled data can be used with \"send-once\" - * signature requests by adding merge fields with `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back - * with `custom_fields` together in one API call. For using pre-filled on repeatable - * signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then - * passing `custom_fields` on subsequent signature requests referencing that template. - */ -@JsonPropertyOrder({ - SubCustomField.JSON_PROPERTY_NAME, - SubCustomField.JSON_PROPERTY_EDITOR, - SubCustomField.JSON_PROPERTY_REQUIRED, - SubCustomField.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubCustomField { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public SubCustomField() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubCustomField init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubCustomField.class); - } - - public static SubCustomField init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubCustomField.class); - } - - public SubCustomField name(String name) { - this.name = name; - return this; - } - - /** - * The name of a custom field. When working with pre-filled data, the custom field's name - * must have a matching merge field name or the field will remain empty on the document during - * signing. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubCustomField editor(String editor) { - this.editor = editor; - return this; - } - - /** - * Used to create editable merge fields. When the value matches a role passed in with - * `signers`, that role can edit the data that was pre-filled to that field. This - * field is optional, but required when this custom field object is set to `required = - * true`. **NOTE:** Editable merge fields are only supported for single signer requests (or - * the first signer in ordered signature requests). If used when there are multiple signers in - * an unordered signature request, the editor value is ignored and the field won't be - * editable. - * - * @return editor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEditor() { - return editor; - } - - @JsonProperty(JSON_PROPERTY_EDITOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { - this.editor = editor; - } - - public SubCustomField required(Boolean required) { - this.required = required; - return this; - } - - /** - * Used to set an editable merge field when working with pre-filled data. When `true`, - * the custom field must specify a signer role in `editor`. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - public SubCustomField value(String value) { - this.value = value; - return this; - } - - /** - * The string that resolves (aka \"pre-fills\") to the merge field on the final - * document(s) used for signing. - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - /** Return true if this SubCustomField object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubCustomField subCustomField = (SubCustomField) o; - return Objects.equals(this.name, subCustomField.name) - && Objects.equals(this.editor, subCustomField.editor) - && Objects.equals(this.required, subCustomField.required) - && Objects.equals(this.value, subCustomField.value); - } - - @Override - public int hashCode() { - return Objects.hash(name, editor, required, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubCustomField {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" editor: ").append(toIndentedString(editor)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (editor != null) { - if (isFileTypeOrListOfFiles(editor)) { - fileTypeFound = true; - } - - if (editor.getClass().equals(java.io.File.class) - || editor.getClass().equals(Integer.class) - || editor.getClass().equals(String.class) - || editor.getClass().isEnum()) { - map.put("editor", editor); - } else if (isListOfFile(editor)) { - for (int i = 0; i < getListSize(editor); i++) { - map.put("editor[" + i + "]", getFromList(editor, i)); - } - } else { - map.put("editor", JSON.getDefault().getMapper().writeValueAsString(editor)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java deleted file mode 100644 index 6005ad4bd..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This allows the requester to specify editor options when a preparing a document */ -@JsonPropertyOrder({ - SubEditorOptions.JSON_PROPERTY_ALLOW_EDIT_SIGNERS, - SubEditorOptions.JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubEditorOptions { - public static final String JSON_PROPERTY_ALLOW_EDIT_SIGNERS = "allow_edit_signers"; - private Boolean allowEditSigners = false; - - public static final String JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS = "allow_edit_documents"; - private Boolean allowEditDocuments = false; - - public SubEditorOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubEditorOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubEditorOptions.class); - } - - public static SubEditorOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubEditorOptions.class); - } - - public SubEditorOptions allowEditSigners(Boolean allowEditSigners) { - this.allowEditSigners = allowEditSigners; - return this; - } - - /** - * Allows requesters to edit the list of signers - * - * @return allowEditSigners - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowEditSigners() { - return allowEditSigners; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditSigners(Boolean allowEditSigners) { - this.allowEditSigners = allowEditSigners; - } - - public SubEditorOptions allowEditDocuments(Boolean allowEditDocuments) { - this.allowEditDocuments = allowEditDocuments; - return this; - } - - /** - * Allows requesters to edit documents, including delete and add - * - * @return allowEditDocuments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowEditDocuments() { - return allowEditDocuments; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditDocuments(Boolean allowEditDocuments) { - this.allowEditDocuments = allowEditDocuments; - } - - /** Return true if this SubEditorOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubEditorOptions subEditorOptions = (SubEditorOptions) o; - return Objects.equals(this.allowEditSigners, subEditorOptions.allowEditSigners) - && Objects.equals(this.allowEditDocuments, subEditorOptions.allowEditDocuments); - } - - @Override - public int hashCode() { - return Objects.hash(allowEditSigners, allowEditDocuments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubEditorOptions {\n"); - sb.append(" allowEditSigners: ").append(toIndentedString(allowEditSigners)).append("\n"); - sb.append(" allowEditDocuments: ") - .append(toIndentedString(allowEditDocuments)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (allowEditSigners != null) { - if (isFileTypeOrListOfFiles(allowEditSigners)) { - fileTypeFound = true; - } - - if (allowEditSigners.getClass().equals(java.io.File.class) - || allowEditSigners.getClass().equals(Integer.class) - || allowEditSigners.getClass().equals(String.class) - || allowEditSigners.getClass().isEnum()) { - map.put("allow_edit_signers", allowEditSigners); - } else if (isListOfFile(allowEditSigners)) { - for (int i = 0; i < getListSize(allowEditSigners); i++) { - map.put("allow_edit_signers[" + i + "]", getFromList(allowEditSigners, i)); - } - } else { - map.put( - "allow_edit_signers", - JSON.getDefault().getMapper().writeValueAsString(allowEditSigners)); - } - } - if (allowEditDocuments != null) { - if (isFileTypeOrListOfFiles(allowEditDocuments)) { - fileTypeFound = true; - } - - if (allowEditDocuments.getClass().equals(java.io.File.class) - || allowEditDocuments.getClass().equals(Integer.class) - || allowEditDocuments.getClass().equals(String.class) - || allowEditDocuments.getClass().isEnum()) { - map.put("allow_edit_documents", allowEditDocuments); - } else if (isListOfFile(allowEditDocuments)) { - for (int i = 0; i < getListSize(allowEditDocuments); i++) { - map.put( - "allow_edit_documents[" + i + "]", - getFromList(allowEditDocuments, i)); - } - } else { - map.put( - "allow_edit_documents", - JSON.getDefault().getMapper().writeValueAsString(allowEditDocuments)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java deleted file mode 100644 index 80dabcc7e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This allows the requester to specify field options for a signature request. */ -@JsonPropertyOrder({SubFieldOptions.JSON_PROPERTY_DATE_FORMAT}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubFieldOptions { - /** - * Allows requester to specify the date format (see list of allowed - * [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and - * higher. - */ - public enum DateFormatEnum { - MMDDYYYY("MM / DD / YYYY"), - - MM_DD_YYYY("MM - DD - YYYY"), - - DDMMYYYY("DD / MM / YYYY"), - - DD_MM_YYYY("DD - MM - YYYY"), - - YYYYMMDD("YYYY / MM / DD"), - - YYYY_MM_DD("YYYY - MM - DD"); - - private String value; - - DateFormatEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DateFormatEnum fromValue(String value) { - for (DateFormatEnum b : DateFormatEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; - private DateFormatEnum dateFormat; - - public SubFieldOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFieldOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFieldOptions.class); - } - - public static SubFieldOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubFieldOptions.class); - } - - public SubFieldOptions dateFormat(DateFormatEnum dateFormat) { - this.dateFormat = dateFormat; - return this; - } - - /** - * Allows requester to specify the date format (see list of allowed - * [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and - * higher. - * - * @return dateFormat - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DATE_FORMAT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DateFormatEnum getDateFormat() { - return dateFormat; - } - - @JsonProperty(JSON_PROPERTY_DATE_FORMAT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDateFormat(DateFormatEnum dateFormat) { - this.dateFormat = dateFormat; - } - - /** Return true if this SubFieldOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFieldOptions subFieldOptions = (SubFieldOptions) o; - return Objects.equals(this.dateFormat, subFieldOptions.dateFormat); - } - - @Override - public int hashCode() { - return Objects.hash(dateFormat); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFieldOptions {\n"); - sb.append(" dateFormat: ").append(toIndentedString(dateFormat)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (dateFormat != null) { - if (isFileTypeOrListOfFiles(dateFormat)) { - fileTypeFound = true; - } - - if (dateFormat.getClass().equals(java.io.File.class) - || dateFormat.getClass().equals(Integer.class) - || dateFormat.getClass().equals(String.class) - || dateFormat.getClass().isEnum()) { - map.put("date_format", dateFormat); - } else if (isListOfFile(dateFormat)) { - for (int i = 0; i < getListSize(dateFormat); i++) { - map.put("date_format[" + i + "]", getFromList(dateFormat, i)); - } - } else { - map.put( - "date_format", - JSON.getDefault().getMapper().writeValueAsString(dateFormat)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java deleted file mode 100644 index c4772c304..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubFormFieldGroup */ -@JsonPropertyOrder({ - SubFormFieldGroup.JSON_PROPERTY_GROUP_ID, - SubFormFieldGroup.JSON_PROPERTY_GROUP_LABEL, - SubFormFieldGroup.JSON_PROPERTY_REQUIREMENT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubFormFieldGroup { - public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; - - public static final String JSON_PROPERTY_GROUP_LABEL = "group_label"; - private String groupLabel; - - public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; - - public SubFormFieldGroup() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldGroup init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldGroup.class); - } - - public static SubFormFieldGroup init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldGroup.class); - } - - public SubFormFieldGroup groupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * ID of group. Use this to reference a specific group from the `group` value in - * `form_fields_per_document`. - * - * @return groupId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GROUP_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGroupId() { - return groupId; - } - - @JsonProperty(JSON_PROPERTY_GROUP_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - public SubFormFieldGroup groupLabel(String groupLabel) { - this.groupLabel = groupLabel; - return this; - } - - /** - * Name of the group - * - * @return groupLabel - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GROUP_LABEL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGroupLabel() { - return groupLabel; - } - - @JsonProperty(JSON_PROPERTY_GROUP_LABEL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupLabel(String groupLabel) { - this.groupLabel = groupLabel; - } - - public SubFormFieldGroup requirement(String requirement) { - this.requirement = requirement; - return this; - } - - /** - * Examples: `require_0-1` `require_1` `require_1-ormore` - Check - * out the list of [acceptable `requirement` checkbox type - * values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of - * [acceptable `requirement` radio type - * fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** - * two fields per group. - * - * @return requirement - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUIREMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRequirement() { - return requirement; - } - - @JsonProperty(JSON_PROPERTY_REQUIREMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequirement(String requirement) { - this.requirement = requirement; - } - - /** Return true if this SubFormFieldGroup object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldGroup subFormFieldGroup = (SubFormFieldGroup) o; - return Objects.equals(this.groupId, subFormFieldGroup.groupId) - && Objects.equals(this.groupLabel, subFormFieldGroup.groupLabel) - && Objects.equals(this.requirement, subFormFieldGroup.requirement); - } - - @Override - public int hashCode() { - return Objects.hash(groupId, groupLabel, requirement); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldGroup {\n"); - sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); - sb.append(" groupLabel: ").append(toIndentedString(groupLabel)).append("\n"); - sb.append(" requirement: ").append(toIndentedString(requirement)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (groupId != null) { - if (isFileTypeOrListOfFiles(groupId)) { - fileTypeFound = true; - } - - if (groupId.getClass().equals(java.io.File.class) - || groupId.getClass().equals(Integer.class) - || groupId.getClass().equals(String.class) - || groupId.getClass().isEnum()) { - map.put("group_id", groupId); - } else if (isListOfFile(groupId)) { - for (int i = 0; i < getListSize(groupId); i++) { - map.put("group_id[" + i + "]", getFromList(groupId, i)); - } - } else { - map.put("group_id", JSON.getDefault().getMapper().writeValueAsString(groupId)); - } - } - if (groupLabel != null) { - if (isFileTypeOrListOfFiles(groupLabel)) { - fileTypeFound = true; - } - - if (groupLabel.getClass().equals(java.io.File.class) - || groupLabel.getClass().equals(Integer.class) - || groupLabel.getClass().equals(String.class) - || groupLabel.getClass().isEnum()) { - map.put("group_label", groupLabel); - } else if (isListOfFile(groupLabel)) { - for (int i = 0; i < getListSize(groupLabel); i++) { - map.put("group_label[" + i + "]", getFromList(groupLabel, i)); - } - } else { - map.put( - "group_label", - JSON.getDefault().getMapper().writeValueAsString(groupLabel)); - } - } - if (requirement != null) { - if (isFileTypeOrListOfFiles(requirement)) { - fileTypeFound = true; - } - - if (requirement.getClass().equals(java.io.File.class) - || requirement.getClass().equals(Integer.class) - || requirement.getClass().equals(String.class) - || requirement.getClass().isEnum()) { - map.put("requirement", requirement); - } else if (isListOfFile(requirement)) { - for (int i = 0; i < getListSize(requirement); i++) { - map.put("requirement[" + i + "]", getFromList(requirement, i)); - } - } else { - map.put( - "requirement", - JSON.getDefault().getMapper().writeValueAsString(requirement)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java deleted file mode 100644 index 95a816532..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java +++ /dev/null @@ -1,331 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SubFormFieldRule */ -@JsonPropertyOrder({ - SubFormFieldRule.JSON_PROPERTY_ID, - SubFormFieldRule.JSON_PROPERTY_TRIGGER_OPERATOR, - SubFormFieldRule.JSON_PROPERTY_TRIGGERS, - SubFormFieldRule.JSON_PROPERTY_ACTIONS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubFormFieldRule { - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TRIGGER_OPERATOR = "trigger_operator"; - private String triggerOperator = "AND"; - - public static final String JSON_PROPERTY_TRIGGERS = "triggers"; - private List triggers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ACTIONS = "actions"; - private List actions = new ArrayList<>(); - - public SubFormFieldRule() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldRule init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldRule.class); - } - - public static SubFormFieldRule init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldRule.class); - } - - public SubFormFieldRule id(String id) { - this.id = id; - return this; - } - - /** - * Must be unique across all defined rules. - * - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { - this.id = id; - } - - public SubFormFieldRule triggerOperator(String triggerOperator) { - this.triggerOperator = triggerOperator; - return this; - } - - /** - * Currently only `AND` is supported. Support for `OR` is being worked on. - * - * @return triggerOperator - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TRIGGER_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTriggerOperator() { - return triggerOperator; - } - - @JsonProperty(JSON_PROPERTY_TRIGGER_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerOperator(String triggerOperator) { - this.triggerOperator = triggerOperator; - } - - public SubFormFieldRule triggers(List triggers) { - this.triggers = triggers; - return this; - } - - public SubFormFieldRule addTriggersItem(SubFormFieldRuleTrigger triggersItem) { - if (this.triggers == null) { - this.triggers = new ArrayList<>(); - } - this.triggers.add(triggersItem); - return this; - } - - /** - * An array of trigger definitions, the \"if this\" part of \"**if this**, then - * that\". Currently only a single trigger per rule is allowed. - * - * @return triggers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TRIGGERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTriggers() { - return triggers; - } - - @JsonProperty(JSON_PROPERTY_TRIGGERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggers(List triggers) { - this.triggers = triggers; - } - - public SubFormFieldRule actions(List actions) { - this.actions = actions; - return this; - } - - public SubFormFieldRule addActionsItem(SubFormFieldRuleAction actionsItem) { - if (this.actions == null) { - this.actions = new ArrayList<>(); - } - this.actions.add(actionsItem); - return this; - } - - /** - * An array of action definitions, the \"then that\" part of \"if this, **then - * that**\". Any number of actions may be attached to a single rule. - * - * @return actions - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getActions() { - return actions; - } - - @JsonProperty(JSON_PROPERTY_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setActions(List actions) { - this.actions = actions; - } - - /** Return true if this SubFormFieldRule object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldRule subFormFieldRule = (SubFormFieldRule) o; - return Objects.equals(this.id, subFormFieldRule.id) - && Objects.equals(this.triggerOperator, subFormFieldRule.triggerOperator) - && Objects.equals(this.triggers, subFormFieldRule.triggers) - && Objects.equals(this.actions, subFormFieldRule.actions); - } - - @Override - public int hashCode() { - return Objects.hash(id, triggerOperator, triggers, actions); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldRule {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" triggerOperator: ").append(toIndentedString(triggerOperator)).append("\n"); - sb.append(" triggers: ").append(toIndentedString(triggers)).append("\n"); - sb.append(" actions: ").append(toIndentedString(actions)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (id != null) { - if (isFileTypeOrListOfFiles(id)) { - fileTypeFound = true; - } - - if (id.getClass().equals(java.io.File.class) - || id.getClass().equals(Integer.class) - || id.getClass().equals(String.class) - || id.getClass().isEnum()) { - map.put("id", id); - } else if (isListOfFile(id)) { - for (int i = 0; i < getListSize(id); i++) { - map.put("id[" + i + "]", getFromList(id, i)); - } - } else { - map.put("id", JSON.getDefault().getMapper().writeValueAsString(id)); - } - } - if (triggerOperator != null) { - if (isFileTypeOrListOfFiles(triggerOperator)) { - fileTypeFound = true; - } - - if (triggerOperator.getClass().equals(java.io.File.class) - || triggerOperator.getClass().equals(Integer.class) - || triggerOperator.getClass().equals(String.class) - || triggerOperator.getClass().isEnum()) { - map.put("trigger_operator", triggerOperator); - } else if (isListOfFile(triggerOperator)) { - for (int i = 0; i < getListSize(triggerOperator); i++) { - map.put("trigger_operator[" + i + "]", getFromList(triggerOperator, i)); - } - } else { - map.put( - "trigger_operator", - JSON.getDefault().getMapper().writeValueAsString(triggerOperator)); - } - } - if (triggers != null) { - if (isFileTypeOrListOfFiles(triggers)) { - fileTypeFound = true; - } - - if (triggers.getClass().equals(java.io.File.class) - || triggers.getClass().equals(Integer.class) - || triggers.getClass().equals(String.class) - || triggers.getClass().isEnum()) { - map.put("triggers", triggers); - } else if (isListOfFile(triggers)) { - for (int i = 0; i < getListSize(triggers); i++) { - map.put("triggers[" + i + "]", getFromList(triggers, i)); - } - } else { - map.put("triggers", JSON.getDefault().getMapper().writeValueAsString(triggers)); - } - } - if (actions != null) { - if (isFileTypeOrListOfFiles(actions)) { - fileTypeFound = true; - } - - if (actions.getClass().equals(java.io.File.class) - || actions.getClass().equals(Integer.class) - || actions.getClass().equals(String.class) - || actions.getClass().isEnum()) { - map.put("actions", actions); - } else if (isListOfFile(actions)) { - for (int i = 0; i < getListSize(actions); i++) { - map.put("actions[" + i + "]", getFromList(actions, i)); - } - } else { - map.put("actions", JSON.getDefault().getMapper().writeValueAsString(actions)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java deleted file mode 100644 index 2481678d9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubFormFieldRuleAction */ -@JsonPropertyOrder({ - SubFormFieldRuleAction.JSON_PROPERTY_HIDDEN, - SubFormFieldRuleAction.JSON_PROPERTY_TYPE, - SubFormFieldRuleAction.JSON_PROPERTY_FIELD_ID, - SubFormFieldRuleAction.JSON_PROPERTY_GROUP_ID -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubFormFieldRuleAction { - public static final String JSON_PROPERTY_HIDDEN = "hidden"; - private Boolean hidden; - - /** Gets or Sets type */ - public enum TypeEnum { - FIELD_VISIBILITY("change-field-visibility"), - - GROUP_VISIBILITY("change-group-visibility"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; - - public static final String JSON_PROPERTY_FIELD_ID = "field_id"; - private String fieldId; - - public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; - - public SubFormFieldRuleAction() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldRuleAction init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldRuleAction.class); - } - - public static SubFormFieldRuleAction init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), SubFormFieldRuleAction.class); - } - - public SubFormFieldRuleAction hidden(Boolean hidden) { - this.hidden = hidden; - return this; - } - - /** - * `true` to hide the target field when rule is satisfied, otherwise - * `false`. - * - * @return hidden - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_HIDDEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getHidden() { - return hidden; - } - - @JsonProperty(JSON_PROPERTY_HIDDEN) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHidden(Boolean hidden) { - this.hidden = hidden; - } - - public SubFormFieldRuleAction type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TypeEnum getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { - this.type = type; - } - - public SubFormFieldRuleAction fieldId(String fieldId) { - this.fieldId = fieldId; - return this; - } - - /** - * **field_id** or **group_id** is required, but not both. Must reference the `api_id` - * of an existing field defined within `form_fields_per_document`. Cannot use with - * `group_id`. Trigger and action fields must belong to the same signer. - * - * @return fieldId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFieldId() { - return fieldId; - } - - @JsonProperty(JSON_PROPERTY_FIELD_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldId(String fieldId) { - this.fieldId = fieldId; - } - - public SubFormFieldRuleAction groupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * **group_id** or **field_id** is required, but not both. Must reference the ID of an existing - * group defined within `form_field_groups`. Cannot use with `field_id`. - * Trigger and action fields and groups must belong to the same signer. - * - * @return groupId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroupId() { - return groupId; - } - - @JsonProperty(JSON_PROPERTY_GROUP_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - /** Return true if this SubFormFieldRuleAction object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldRuleAction subFormFieldRuleAction = (SubFormFieldRuleAction) o; - return Objects.equals(this.hidden, subFormFieldRuleAction.hidden) - && Objects.equals(this.type, subFormFieldRuleAction.type) - && Objects.equals(this.fieldId, subFormFieldRuleAction.fieldId) - && Objects.equals(this.groupId, subFormFieldRuleAction.groupId); - } - - @Override - public int hashCode() { - return Objects.hash(hidden, type, fieldId, groupId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldRuleAction {\n"); - sb.append(" hidden: ").append(toIndentedString(hidden)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" fieldId: ").append(toIndentedString(fieldId)).append("\n"); - sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (hidden != null) { - if (isFileTypeOrListOfFiles(hidden)) { - fileTypeFound = true; - } - - if (hidden.getClass().equals(java.io.File.class) - || hidden.getClass().equals(Integer.class) - || hidden.getClass().equals(String.class) - || hidden.getClass().isEnum()) { - map.put("hidden", hidden); - } else if (isListOfFile(hidden)) { - for (int i = 0; i < getListSize(hidden); i++) { - map.put("hidden[" + i + "]", getFromList(hidden, i)); - } - } else { - map.put("hidden", JSON.getDefault().getMapper().writeValueAsString(hidden)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (fieldId != null) { - if (isFileTypeOrListOfFiles(fieldId)) { - fileTypeFound = true; - } - - if (fieldId.getClass().equals(java.io.File.class) - || fieldId.getClass().equals(Integer.class) - || fieldId.getClass().equals(String.class) - || fieldId.getClass().isEnum()) { - map.put("field_id", fieldId); - } else if (isListOfFile(fieldId)) { - for (int i = 0; i < getListSize(fieldId); i++) { - map.put("field_id[" + i + "]", getFromList(fieldId, i)); - } - } else { - map.put("field_id", JSON.getDefault().getMapper().writeValueAsString(fieldId)); - } - } - if (groupId != null) { - if (isFileTypeOrListOfFiles(groupId)) { - fileTypeFound = true; - } - - if (groupId.getClass().equals(java.io.File.class) - || groupId.getClass().equals(Integer.class) - || groupId.getClass().equals(String.class) - || groupId.getClass().isEnum()) { - map.put("group_id", groupId); - } else if (isListOfFile(groupId)) { - for (int i = 0; i < getListSize(groupId); i++) { - map.put("group_id[" + i + "]", getFromList(groupId, i)); - } - } else { - map.put("group_id", JSON.getDefault().getMapper().writeValueAsString(groupId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java deleted file mode 100644 index d56297a4d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SubFormFieldRuleTrigger */ -@JsonPropertyOrder({ - SubFormFieldRuleTrigger.JSON_PROPERTY_ID, - SubFormFieldRuleTrigger.JSON_PROPERTY_OPERATOR, - SubFormFieldRuleTrigger.JSON_PROPERTY_VALUE, - SubFormFieldRuleTrigger.JSON_PROPERTY_VALUES -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubFormFieldRuleTrigger { - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - /** - * Different field types allow different `operator` values: - Field type of **text**: - * - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. - * Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of - * **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - - * **any**: exact match, array of values. - **none**: not exact match, array of values. - Field - * type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single - * value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact - * match, single value - */ - public enum OperatorEnum { - ANY("any"), - - IS("is"), - - MATCH("match"), - - NONE("none"), - - NOT("not"); - - private String value; - - OperatorEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OperatorEnum fromValue(String value) { - for (OperatorEnum b : OperatorEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_OPERATOR = "operator"; - private OperatorEnum operator; - - public static final String JSON_PROPERTY_VALUE = "value"; - private String value; - - public static final String JSON_PROPERTY_VALUES = "values"; - private List values = null; - - public SubFormFieldRuleTrigger() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldRuleTrigger init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldRuleTrigger.class); - } - - public static SubFormFieldRuleTrigger init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), SubFormFieldRuleTrigger.class); - } - - public SubFormFieldRuleTrigger id(String id) { - this.id = id; - return this; - } - - /** - * Must reference the `api_id` of an existing field defined within - * `form_fields_per_document`. Trigger and action fields and groups must belong to the - * same signer. - * - * @return id - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { - this.id = id; - } - - public SubFormFieldRuleTrigger operator(OperatorEnum operator) { - this.operator = operator; - return this; - } - - /** - * Different field types allow different `operator` values: - Field type of **text**: - * - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. - * Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of - * **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - - * **any**: exact match, array of values. - **none**: not exact match, array of values. - Field - * type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single - * value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact - * match, single value - * - * @return operator - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OperatorEnum getOperator() { - return operator; - } - - @JsonProperty(JSON_PROPERTY_OPERATOR) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOperator(OperatorEnum operator) { - this.operator = operator; - } - - public SubFormFieldRuleTrigger value(String value) { - this.value = value; - return this; - } - - /** - * **value** or **values** is required, but not both. The value to match against **operator**. - - * When **operator** is one of the following, **value** must be `String`: - - * `is` - `not` - `match` Otherwise, - **checkbox**: When **type** - * of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: - * When **type** of trigger is **radio**, **value** must be `1` - * - * @return value - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValue() { - return value; - } - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { - this.value = value; - } - - public SubFormFieldRuleTrigger values(List values) { - this.values = values; - return this; - } - - public SubFormFieldRuleTrigger addValuesItem(String valuesItem) { - if (this.values == null) { - this.values = new ArrayList<>(); - } - this.values.add(valuesItem); - return this; - } - - /** - * **values** or **value** is required, but not both. The values to match against **operator** - * when it is one of the following: - `any` - `none` - * - * @return values - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getValues() { - return values; - } - - @JsonProperty(JSON_PROPERTY_VALUES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValues(List values) { - this.values = values; - } - - /** Return true if this SubFormFieldRuleTrigger object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldRuleTrigger subFormFieldRuleTrigger = (SubFormFieldRuleTrigger) o; - return Objects.equals(this.id, subFormFieldRuleTrigger.id) - && Objects.equals(this.operator, subFormFieldRuleTrigger.operator) - && Objects.equals(this.value, subFormFieldRuleTrigger.value) - && Objects.equals(this.values, subFormFieldRuleTrigger.values); - } - - @Override - public int hashCode() { - return Objects.hash(id, operator, value, values); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldRuleTrigger {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" values: ").append(toIndentedString(values)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (id != null) { - if (isFileTypeOrListOfFiles(id)) { - fileTypeFound = true; - } - - if (id.getClass().equals(java.io.File.class) - || id.getClass().equals(Integer.class) - || id.getClass().equals(String.class) - || id.getClass().isEnum()) { - map.put("id", id); - } else if (isListOfFile(id)) { - for (int i = 0; i < getListSize(id); i++) { - map.put("id[" + i + "]", getFromList(id, i)); - } - } else { - map.put("id", JSON.getDefault().getMapper().writeValueAsString(id)); - } - } - if (operator != null) { - if (isFileTypeOrListOfFiles(operator)) { - fileTypeFound = true; - } - - if (operator.getClass().equals(java.io.File.class) - || operator.getClass().equals(Integer.class) - || operator.getClass().equals(String.class) - || operator.getClass().isEnum()) { - map.put("operator", operator); - } else if (isListOfFile(operator)) { - for (int i = 0; i < getListSize(operator); i++) { - map.put("operator[" + i + "]", getFromList(operator, i)); - } - } else { - map.put("operator", JSON.getDefault().getMapper().writeValueAsString(operator)); - } - } - if (value != null) { - if (isFileTypeOrListOfFiles(value)) { - fileTypeFound = true; - } - - if (value.getClass().equals(java.io.File.class) - || value.getClass().equals(Integer.class) - || value.getClass().equals(String.class) - || value.getClass().isEnum()) { - map.put("value", value); - } else if (isListOfFile(value)) { - for (int i = 0; i < getListSize(value); i++) { - map.put("value[" + i + "]", getFromList(value, i)); - } - } else { - map.put("value", JSON.getDefault().getMapper().writeValueAsString(value)); - } - } - if (values != null) { - if (isFileTypeOrListOfFiles(values)) { - fileTypeFound = true; - } - - if (values.getClass().equals(java.io.File.class) - || values.getClass().equals(Integer.class) - || values.getClass().equals(String.class) - || values.getClass().isEnum()) { - map.put("values", values); - } else if (isListOfFile(values)) { - for (int i = 0; i < getListSize(values); i++) { - map.put("values[" + i + "]", getFromList(values, i)); - } - } else { - map.put("values", JSON.getDefault().getMapper().writeValueAsString(values)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java deleted file mode 100644 index 7b985bccc..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java +++ /dev/null @@ -1,714 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, - * **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. - * Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) - * for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field - * use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentBase.JSON_PROPERTY_DOCUMENT_INDEX, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_API_ID, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_HEIGHT, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_REQUIRED, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_SIGNER, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_WIDTH, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_X, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_Y, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_NAME, - SubFormFieldsPerDocumentBase.JSON_PROPERTY_PAGE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentCheckbox.class, name = "checkbox"), - @JsonSubTypes.Type( - value = SubFormFieldsPerDocumentCheckboxMerge.class, - name = "checkbox-merge"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentDateSigned.class, name = "date_signed"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentDropdown.class, name = "dropdown"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentHyperlink.class, name = "hyperlink"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentInitials.class, name = "initials"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentRadio.class, name = "radio"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentSignature.class, name = "signature"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentText.class, name = "text"), - @JsonSubTypes.Type(value = SubFormFieldsPerDocumentTextMerge.class, name = "text-merge"), -}) -public class SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_DOCUMENT_INDEX = "document_index"; - private Integer documentIndex; - - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; - - public static final String JSON_PROPERTY_X = "x"; - private Integer x; - - public static final String JSON_PROPERTY_Y = "y"; - private Integer y; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; - - public SubFormFieldsPerDocumentBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentBase init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentBase.class); - } - - public static SubFormFieldsPerDocumentBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentBase.class); - } - - public SubFormFieldsPerDocumentBase documentIndex(Integer documentIndex) { - this.documentIndex = documentIndex; - return this; - } - - /** - * Represents the integer index of the `file` or `file_url` document the - * field should be attached to. - * - * @return documentIndex - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DOCUMENT_INDEX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getDocumentIndex() { - return documentIndex; - } - - @JsonProperty(JSON_PROPERTY_DOCUMENT_INDEX) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDocumentIndex(Integer documentIndex) { - this.documentIndex = documentIndex; - } - - public SubFormFieldsPerDocumentBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * An identifier for the field that is unique across all documents in the request. - * - * @return apiId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public SubFormFieldsPerDocumentBase height(Integer height) { - this.height = height; - return this; - } - - /** - * Size of the field in pixels. - * - * @return height - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getHeight() { - return height; - } - - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHeight(Integer height) { - this.height = height; - } - - public SubFormFieldsPerDocumentBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * Whether this field is required. - * - * @return required - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { - this.required = required; - } - - public SubFormFieldsPerDocumentBase signer(String signer) { - this.signer = signer; - return this; - } - - public SubFormFieldsPerDocumentBase signer(Integer signer) { - this.signer = String.valueOf(signer); - return this; - } - - /** - * Signer index identified by the offset in the signers parameter (0-based indexing), indicating - * which signer should fill out the field. **NOTE:** To set the value of the field as the - * preparer you must set this to `me_now` **NOTE:** If type is `text-merge` - * or `checkbox-merge`, you must set this to sender in order to use pre-filled data. - * - * @return signer - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSigner() { - return signer; - } - - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { - this.signer = signer; - } - - public void setSigner(Integer signer) { - this.signer = String.valueOf(signer); - } - - public SubFormFieldsPerDocumentBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentBase width(Integer width) { - this.width = width; - return this; - } - - /** - * Size of the field in pixels. - * - * @return width - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getWidth() { - return width; - } - - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWidth(Integer width) { - this.width = width; - } - - public SubFormFieldsPerDocumentBase x(Integer x) { - this.x = x; - return this; - } - - /** - * Location coordinates of the field in pixels. - * - * @return x - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getX() { - return x; - } - - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setX(Integer x) { - this.x = x; - } - - public SubFormFieldsPerDocumentBase y(Integer y) { - this.y = y; - return this; - } - - /** - * Location coordinates of the field in pixels. - * - * @return y - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getY() { - return y; - } - - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setY(Integer y) { - this.y = y; - } - - public SubFormFieldsPerDocumentBase name(String name) { - this.name = name; - return this; - } - - /** - * Display name for the field. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public SubFormFieldsPerDocumentBase page(Integer page) { - this.page = page; - return this; - } - - /** - * Page in the document where the field should be placed (requires documents be PDF files). - - * When the page number parameter is supplied, the API will use the new coordinate system. - - * Check out the differences between both [coordinate - * systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. - * - * @return page - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getPage() { - return page; - } - - @JsonProperty(JSON_PROPERTY_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { - this.page = page; - } - - /** Return true if this SubFormFieldsPerDocumentBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentBase subFormFieldsPerDocumentBase = - (SubFormFieldsPerDocumentBase) o; - return Objects.equals(this.documentIndex, subFormFieldsPerDocumentBase.documentIndex) - && Objects.equals(this.apiId, subFormFieldsPerDocumentBase.apiId) - && Objects.equals(this.height, subFormFieldsPerDocumentBase.height) - && Objects.equals(this.required, subFormFieldsPerDocumentBase.required) - && Objects.equals(this.signer, subFormFieldsPerDocumentBase.signer) - && Objects.equals(this.type, subFormFieldsPerDocumentBase.type) - && Objects.equals(this.width, subFormFieldsPerDocumentBase.width) - && Objects.equals(this.x, subFormFieldsPerDocumentBase.x) - && Objects.equals(this.y, subFormFieldsPerDocumentBase.y) - && Objects.equals(this.name, subFormFieldsPerDocumentBase.name) - && Objects.equals(this.page, subFormFieldsPerDocumentBase.page); - } - - @Override - public int hashCode() { - return Objects.hash( - documentIndex, apiId, height, required, signer, type, width, x, y, name, page); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentBase {\n"); - sb.append(" documentIndex: ").append(toIndentedString(documentIndex)).append("\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" x: ").append(toIndentedString(x)).append("\n"); - sb.append(" y: ").append(toIndentedString(y)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (documentIndex != null) { - if (isFileTypeOrListOfFiles(documentIndex)) { - fileTypeFound = true; - } - - if (documentIndex.getClass().equals(java.io.File.class) - || documentIndex.getClass().equals(Integer.class) - || documentIndex.getClass().equals(String.class) - || documentIndex.getClass().isEnum()) { - map.put("document_index", documentIndex); - } else if (isListOfFile(documentIndex)) { - for (int i = 0; i < getListSize(documentIndex); i++) { - map.put("document_index[" + i + "]", getFromList(documentIndex, i)); - } - } else { - map.put( - "document_index", - JSON.getDefault().getMapper().writeValueAsString(documentIndex)); - } - } - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (height != null) { - if (isFileTypeOrListOfFiles(height)) { - fileTypeFound = true; - } - - if (height.getClass().equals(java.io.File.class) - || height.getClass().equals(Integer.class) - || height.getClass().equals(String.class) - || height.getClass().isEnum()) { - map.put("height", height); - } else if (isListOfFile(height)) { - for (int i = 0; i < getListSize(height); i++) { - map.put("height[" + i + "]", getFromList(height, i)); - } - } else { - map.put("height", JSON.getDefault().getMapper().writeValueAsString(height)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (signer != null) { - if (isFileTypeOrListOfFiles(signer)) { - fileTypeFound = true; - } - - if (signer.getClass().equals(java.io.File.class) - || signer.getClass().equals(Integer.class) - || signer.getClass().equals(String.class) - || signer.getClass().isEnum()) { - map.put("signer", signer); - } else if (isListOfFile(signer)) { - for (int i = 0; i < getListSize(signer); i++) { - map.put("signer[" + i + "]", getFromList(signer, i)); - } - } else { - map.put("signer", JSON.getDefault().getMapper().writeValueAsString(signer)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (width != null) { - if (isFileTypeOrListOfFiles(width)) { - fileTypeFound = true; - } - - if (width.getClass().equals(java.io.File.class) - || width.getClass().equals(Integer.class) - || width.getClass().equals(String.class) - || width.getClass().isEnum()) { - map.put("width", width); - } else if (isListOfFile(width)) { - for (int i = 0; i < getListSize(width); i++) { - map.put("width[" + i + "]", getFromList(width, i)); - } - } else { - map.put("width", JSON.getDefault().getMapper().writeValueAsString(width)); - } - } - if (x != null) { - if (isFileTypeOrListOfFiles(x)) { - fileTypeFound = true; - } - - if (x.getClass().equals(java.io.File.class) - || x.getClass().equals(Integer.class) - || x.getClass().equals(String.class) - || x.getClass().isEnum()) { - map.put("x", x); - } else if (isListOfFile(x)) { - for (int i = 0; i < getListSize(x); i++) { - map.put("x[" + i + "]", getFromList(x, i)); - } - } else { - map.put("x", JSON.getDefault().getMapper().writeValueAsString(x)); - } - } - if (y != null) { - if (isFileTypeOrListOfFiles(y)) { - fileTypeFound = true; - } - - if (y.getClass().equals(java.io.File.class) - || y.getClass().equals(Integer.class) - || y.getClass().equals(String.class) - || y.getClass().isEnum()) { - map.put("y", y); - } else if (isListOfFile(y)) { - for (int i = 0; i < getListSize(y); i++) { - map.put("y[" + i + "]", getFromList(y, i)); - } - } else { - map.put("y", JSON.getDefault().getMapper().writeValueAsString(y)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (page != null) { - if (isFileTypeOrListOfFiles(page)) { - fileTypeFound = true; - } - - if (page.getClass().equals(java.io.File.class) - || page.getClass().equals(Integer.class) - || page.getClass().equals(String.class) - || page.getClass().isEnum()) { - map.put("page", page); - } else if (isListOfFile(page)) { - for (int i = 0; i < getListSize(page); i++) { - map.put("page[" + i + "]", getFromList(page, i)); - } - } else { - map.put("page", JSON.getDefault().getMapper().writeValueAsString(page)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", SubFormFieldsPerDocumentCheckbox.class); - mappings.put("checkbox-merge", SubFormFieldsPerDocumentCheckboxMerge.class); - mappings.put("date_signed", SubFormFieldsPerDocumentDateSigned.class); - mappings.put("dropdown", SubFormFieldsPerDocumentDropdown.class); - mappings.put("hyperlink", SubFormFieldsPerDocumentHyperlink.class); - mappings.put("initials", SubFormFieldsPerDocumentInitials.class); - mappings.put("radio", SubFormFieldsPerDocumentRadio.class); - mappings.put("signature", SubFormFieldsPerDocumentSignature.class); - mappings.put("text", SubFormFieldsPerDocumentText.class); - mappings.put("text-merge", SubFormFieldsPerDocumentTextMerge.class); - mappings.put("SubFormFieldsPerDocumentBase", SubFormFieldsPerDocumentBase.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java deleted file mode 100644 index d9e67248b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentCheckbox.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentCheckbox.JSON_PROPERTY_IS_CHECKED, - SubFormFieldsPerDocumentCheckbox.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public SubFormFieldsPerDocumentCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentCheckbox init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentCheckbox.class); - } - - public static SubFormFieldsPerDocumentCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentCheckbox.class); - } - - public SubFormFieldsPerDocumentCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentCheckbox isChecked(Boolean isChecked) { - this.isChecked = isChecked; - return this; - } - - /** - * `true` for checking the checkbox field by default, otherwise `false`. - * - * @return isChecked - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_IS_CHECKED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsChecked() { - return isChecked; - } - - @JsonProperty(JSON_PROPERTY_IS_CHECKED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { - this.isChecked = isChecked; - } - - public SubFormFieldsPerDocumentCheckbox group(String group) { - this.group = group; - return this; - } - - /** - * String referencing group defined in `form_field_groups` parameter. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this SubFormFieldsPerDocumentCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentCheckbox subFormFieldsPerDocumentCheckbox = - (SubFormFieldsPerDocumentCheckbox) o; - return Objects.equals(this.type, subFormFieldsPerDocumentCheckbox.type) - && Objects.equals(this.isChecked, subFormFieldsPerDocumentCheckbox.isChecked) - && Objects.equals(this.group, subFormFieldsPerDocumentCheckbox.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, isChecked, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" isChecked: ").append(toIndentedString(isChecked)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (isChecked != null) { - if (isFileTypeOrListOfFiles(isChecked)) { - fileTypeFound = true; - } - - if (isChecked.getClass().equals(java.io.File.class) - || isChecked.getClass().equals(Integer.class) - || isChecked.getClass().equals(String.class) - || isChecked.getClass().isEnum()) { - map.put("is_checked", isChecked); - } else if (isListOfFile(isChecked)) { - for (int i = 0; i < getListSize(isChecked); i++) { - map.put("is_checked[" + i + "]", getFromList(isChecked, i)); - } - } else { - map.put( - "is_checked", - JSON.getDefault().getMapper().writeValueAsString(isChecked)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentCheckbox", SubFormFieldsPerDocumentCheckbox.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java deleted file mode 100644 index 0889539bd..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({SubFormFieldsPerDocumentCheckboxMerge.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; - - public SubFormFieldsPerDocumentCheckboxMerge() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentCheckboxMerge init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentCheckboxMerge.class); - } - - public static SubFormFieldsPerDocumentCheckboxMerge init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentCheckboxMerge.class); - } - - public SubFormFieldsPerDocumentCheckboxMerge type(String type) { - this.type = type; - return this; - } - - /** - * A checkbox field that has default value set using pre-filled data. Use the - * `SubFormFieldsPerDocumentCheckboxMerge` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this SubFormFieldsPerDocumentCheckboxMerge object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentCheckboxMerge subFormFieldsPerDocumentCheckboxMerge = - (SubFormFieldsPerDocumentCheckboxMerge) o; - return Objects.equals(this.type, subFormFieldsPerDocumentCheckboxMerge.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentCheckboxMerge {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SubFormFieldsPerDocumentCheckboxMerge", - SubFormFieldsPerDocumentCheckboxMerge.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentCheckboxMerge.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java deleted file mode 100644 index 83e5960aa..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentDateSigned.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentDateSigned.JSON_PROPERTY_FONT_FAMILY, - SubFormFieldsPerDocumentDateSigned.JSON_PROPERTY_FONT_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; - - /** Font family for the field. */ - public enum FontFamilyEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - FontFamilyEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FontFamilyEnum fromValue(String value) { - for (FontFamilyEnum b : FontFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; - - public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; - - public SubFormFieldsPerDocumentDateSigned() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentDateSigned init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentDateSigned.class); - } - - public static SubFormFieldsPerDocumentDateSigned init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentDateSigned.class); - } - - public SubFormFieldsPerDocumentDateSigned type(String type) { - this.type = type; - return this; - } - - /** - * A date. Use the `SubFormFieldsPerDocumentDateSigned` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentDateSigned fontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for the field. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FontFamilyEnum getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - } - - public SubFormFieldsPerDocumentDateSigned fontSize(Integer fontSize) { - this.fontSize = fontSize; - return this; - } - - /** - * The initial px font size for the field contents. Can be any integer value between - * `7` and `49`. **NOTE:** Font size may be reduced during processing in - * order to fit the contents within the dimensions of the field. - * - * @return fontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFontSize() { - return fontSize; - } - - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; - } - - /** Return true if this SubFormFieldsPerDocumentDateSigned object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentDateSigned subFormFieldsPerDocumentDateSigned = - (SubFormFieldsPerDocumentDateSigned) o; - return Objects.equals(this.type, subFormFieldsPerDocumentDateSigned.type) - && Objects.equals(this.fontFamily, subFormFieldsPerDocumentDateSigned.fontFamily) - && Objects.equals(this.fontSize, subFormFieldsPerDocumentDateSigned.fontSize) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, fontFamily, fontSize, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentDateSigned {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" fontSize: ").append(toIndentedString(fontSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("font_family", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("font_family[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "font_family", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (fontSize != null) { - if (isFileTypeOrListOfFiles(fontSize)) { - fileTypeFound = true; - } - - if (fontSize.getClass().equals(java.io.File.class) - || fontSize.getClass().equals(Integer.class) - || fontSize.getClass().equals(String.class) - || fontSize.getClass().isEnum()) { - map.put("font_size", fontSize); - } else if (isListOfFile(fontSize)) { - for (int i = 0; i < getListSize(fontSize); i++) { - map.put("font_size[" + i + "]", getFromList(fontSize, i)); - } - } else { - map.put( - "font_size", - JSON.getDefault().getMapper().writeValueAsString(fontSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "SubFormFieldsPerDocumentDateSigned", SubFormFieldsPerDocumentDateSigned.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentDateSigned.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java deleted file mode 100644 index 5089a091d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java +++ /dev/null @@ -1,453 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_OPTIONS, - SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_CONTENT, - SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_FONT_FAMILY, - SubFormFieldsPerDocumentDropdown.JSON_PROPERTY_FONT_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; - - public static final String JSON_PROPERTY_OPTIONS = "options"; - private List options = new ArrayList<>(); - - public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; - - /** Font family for the field. */ - public enum FontFamilyEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - FontFamilyEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FontFamilyEnum fromValue(String value) { - for (FontFamilyEnum b : FontFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; - - public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; - - public SubFormFieldsPerDocumentDropdown() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentDropdown init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentDropdown.class); - } - - public static SubFormFieldsPerDocumentDropdown init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentDropdown.class); - } - - public SubFormFieldsPerDocumentDropdown type(String type) { - this.type = type; - return this; - } - - /** - * An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentDropdown options(List options) { - this.options = options; - return this; - } - - public SubFormFieldsPerDocumentDropdown addOptionsItem(String optionsItem) { - if (this.options == null) { - this.options = new ArrayList<>(); - } - this.options.add(optionsItem); - return this; - } - - /** - * Array of string values representing dropdown values. - * - * @return options - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getOptions() { - return options; - } - - @JsonProperty(JSON_PROPERTY_OPTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOptions(List options) { - this.options = options; - } - - public SubFormFieldsPerDocumentDropdown content(String content) { - this.content = content; - return this; - } - - /** - * Selected value in `options` array. Value must exist in array. - * - * @return content - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getContent() { - return content; - } - - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { - this.content = content; - } - - public SubFormFieldsPerDocumentDropdown fontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for the field. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FontFamilyEnum getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - } - - public SubFormFieldsPerDocumentDropdown fontSize(Integer fontSize) { - this.fontSize = fontSize; - return this; - } - - /** - * The initial px font size for the field contents. Can be any integer value between - * `7` and `49`. **NOTE:** Font size may be reduced during processing in - * order to fit the contents within the dimensions of the field. - * - * @return fontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFontSize() { - return fontSize; - } - - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; - } - - /** Return true if this SubFormFieldsPerDocumentDropdown object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentDropdown subFormFieldsPerDocumentDropdown = - (SubFormFieldsPerDocumentDropdown) o; - return Objects.equals(this.type, subFormFieldsPerDocumentDropdown.type) - && Objects.equals(this.options, subFormFieldsPerDocumentDropdown.options) - && Objects.equals(this.content, subFormFieldsPerDocumentDropdown.content) - && Objects.equals(this.fontFamily, subFormFieldsPerDocumentDropdown.fontFamily) - && Objects.equals(this.fontSize, subFormFieldsPerDocumentDropdown.fontSize) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, options, content, fontFamily, fontSize, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentDropdown {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" options: ").append(toIndentedString(options)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" fontSize: ").append(toIndentedString(fontSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (options != null) { - if (isFileTypeOrListOfFiles(options)) { - fileTypeFound = true; - } - - if (options.getClass().equals(java.io.File.class) - || options.getClass().equals(Integer.class) - || options.getClass().equals(String.class) - || options.getClass().isEnum()) { - map.put("options", options); - } else if (isListOfFile(options)) { - for (int i = 0; i < getListSize(options); i++) { - map.put("options[" + i + "]", getFromList(options, i)); - } - } else { - map.put("options", JSON.getDefault().getMapper().writeValueAsString(options)); - } - } - if (content != null) { - if (isFileTypeOrListOfFiles(content)) { - fileTypeFound = true; - } - - if (content.getClass().equals(java.io.File.class) - || content.getClass().equals(Integer.class) - || content.getClass().equals(String.class) - || content.getClass().isEnum()) { - map.put("content", content); - } else if (isListOfFile(content)) { - for (int i = 0; i < getListSize(content); i++) { - map.put("content[" + i + "]", getFromList(content, i)); - } - } else { - map.put("content", JSON.getDefault().getMapper().writeValueAsString(content)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("font_family", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("font_family[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "font_family", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (fontSize != null) { - if (isFileTypeOrListOfFiles(fontSize)) { - fileTypeFound = true; - } - - if (fontSize.getClass().equals(java.io.File.class) - || fontSize.getClass().equals(Integer.class) - || fontSize.getClass().equals(String.class) - || fontSize.getClass().isEnum()) { - map.put("font_size", fontSize); - } else if (isListOfFile(fontSize)) { - for (int i = 0; i < getListSize(fontSize); i++) { - map.put("font_size[" + i + "]", getFromList(fontSize, i)); - } - } else { - map.put( - "font_size", - JSON.getDefault().getMapper().writeValueAsString(fontSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentDropdown", SubFormFieldsPerDocumentDropdown.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentDropdown.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java deleted file mode 100644 index a4e55c3f5..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets SubFormFieldsPerDocumentFontEnum */ -public enum SubFormFieldsPerDocumentFontEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - SubFormFieldsPerDocumentFontEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SubFormFieldsPerDocumentFontEnum fromValue(String value) { - for (SubFormFieldsPerDocumentFontEnum b : SubFormFieldsPerDocumentFontEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java deleted file mode 100644 index c3b09b212..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_CONTENT, - SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_CONTENT_URL, - SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_FONT_FAMILY, - SubFormFieldsPerDocumentHyperlink.JSON_PROPERTY_FONT_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; - - public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; - - public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; - private String contentUrl; - - /** Font family for the field. */ - public enum FontFamilyEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - FontFamilyEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FontFamilyEnum fromValue(String value) { - for (FontFamilyEnum b : FontFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; - - public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; - - public SubFormFieldsPerDocumentHyperlink() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentHyperlink init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentHyperlink.class); - } - - public static SubFormFieldsPerDocumentHyperlink init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentHyperlink.class); - } - - public SubFormFieldsPerDocumentHyperlink type(String type) { - this.type = type; - return this; - } - - /** - * A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentHyperlink content(String content) { - this.content = content; - return this; - } - - /** - * Link Text. - * - * @return content - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContent() { - return content; - } - - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContent(String content) { - this.content = content; - } - - public SubFormFieldsPerDocumentHyperlink contentUrl(String contentUrl) { - this.contentUrl = contentUrl; - return this; - } - - /** - * Link URL. - * - * @return contentUrl - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CONTENT_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getContentUrl() { - return contentUrl; - } - - @JsonProperty(JSON_PROPERTY_CONTENT_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContentUrl(String contentUrl) { - this.contentUrl = contentUrl; - } - - public SubFormFieldsPerDocumentHyperlink fontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for the field. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FontFamilyEnum getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - } - - public SubFormFieldsPerDocumentHyperlink fontSize(Integer fontSize) { - this.fontSize = fontSize; - return this; - } - - /** - * The initial px font size for the field contents. Can be any integer value between - * `7` and `49`. **NOTE:** Font size may be reduced during processing in - * order to fit the contents within the dimensions of the field. - * - * @return fontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFontSize() { - return fontSize; - } - - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; - } - - /** Return true if this SubFormFieldsPerDocumentHyperlink object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentHyperlink subFormFieldsPerDocumentHyperlink = - (SubFormFieldsPerDocumentHyperlink) o; - return Objects.equals(this.type, subFormFieldsPerDocumentHyperlink.type) - && Objects.equals(this.content, subFormFieldsPerDocumentHyperlink.content) - && Objects.equals(this.contentUrl, subFormFieldsPerDocumentHyperlink.contentUrl) - && Objects.equals(this.fontFamily, subFormFieldsPerDocumentHyperlink.fontFamily) - && Objects.equals(this.fontSize, subFormFieldsPerDocumentHyperlink.fontSize) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, content, contentUrl, fontFamily, fontSize, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentHyperlink {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" contentUrl: ").append(toIndentedString(contentUrl)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" fontSize: ").append(toIndentedString(fontSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (content != null) { - if (isFileTypeOrListOfFiles(content)) { - fileTypeFound = true; - } - - if (content.getClass().equals(java.io.File.class) - || content.getClass().equals(Integer.class) - || content.getClass().equals(String.class) - || content.getClass().isEnum()) { - map.put("content", content); - } else if (isListOfFile(content)) { - for (int i = 0; i < getListSize(content); i++) { - map.put("content[" + i + "]", getFromList(content, i)); - } - } else { - map.put("content", JSON.getDefault().getMapper().writeValueAsString(content)); - } - } - if (contentUrl != null) { - if (isFileTypeOrListOfFiles(contentUrl)) { - fileTypeFound = true; - } - - if (contentUrl.getClass().equals(java.io.File.class) - || contentUrl.getClass().equals(Integer.class) - || contentUrl.getClass().equals(String.class) - || contentUrl.getClass().isEnum()) { - map.put("content_url", contentUrl); - } else if (isListOfFile(contentUrl)) { - for (int i = 0; i < getListSize(contentUrl); i++) { - map.put("content_url[" + i + "]", getFromList(contentUrl, i)); - } - } else { - map.put( - "content_url", - JSON.getDefault().getMapper().writeValueAsString(contentUrl)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("font_family", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("font_family[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "font_family", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (fontSize != null) { - if (isFileTypeOrListOfFiles(fontSize)) { - fileTypeFound = true; - } - - if (fontSize.getClass().equals(java.io.File.class) - || fontSize.getClass().equals(Integer.class) - || fontSize.getClass().equals(String.class) - || fontSize.getClass().isEnum()) { - map.put("font_size", fontSize); - } else if (isListOfFile(fontSize)) { - for (int i = 0; i < getListSize(fontSize); i++) { - map.put("font_size[" + i + "]", getFromList(fontSize, i)); - } - } else { - map.put( - "font_size", - JSON.getDefault().getMapper().writeValueAsString(fontSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentHyperlink", SubFormFieldsPerDocumentHyperlink.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentHyperlink.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java deleted file mode 100644 index 4cb9a0519..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({SubFormFieldsPerDocumentInitials.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; - - public SubFormFieldsPerDocumentInitials() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentInitials init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentInitials.class); - } - - public static SubFormFieldsPerDocumentInitials init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentInitials.class); - } - - public SubFormFieldsPerDocumentInitials type(String type) { - this.type = type; - return this; - } - - /** - * An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this SubFormFieldsPerDocumentInitials object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentInitials subFormFieldsPerDocumentInitials = - (SubFormFieldsPerDocumentInitials) o; - return Objects.equals(this.type, subFormFieldsPerDocumentInitials.type) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentInitials {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentInitials", SubFormFieldsPerDocumentInitials.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentInitials.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java deleted file mode 100644 index f6837cfe1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentRadio.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentRadio.JSON_PROPERTY_GROUP, - SubFormFieldsPerDocumentRadio.JSON_PROPERTY_IS_CHECKED -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; - - public SubFormFieldsPerDocumentRadio() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentRadio init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentRadio.class); - } - - public static SubFormFieldsPerDocumentRadio init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentRadio.class); - } - - public SubFormFieldsPerDocumentRadio type(String type) { - this.type = type; - return this; - } - - /** - * An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentRadio group(String group) { - this.group = group; - return this; - } - - /** - * String referencing group defined in `form_field_groups` parameter. - * - * @return group - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { - this.group = group; - } - - public SubFormFieldsPerDocumentRadio isChecked(Boolean isChecked) { - this.isChecked = isChecked; - return this; - } - - /** - * `true` for checking the radio field by default, otherwise `false`. Only - * one radio field per group can be `true`. - * - * @return isChecked - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_IS_CHECKED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsChecked() { - return isChecked; - } - - @JsonProperty(JSON_PROPERTY_IS_CHECKED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { - this.isChecked = isChecked; - } - - /** Return true if this SubFormFieldsPerDocumentRadio object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentRadio subFormFieldsPerDocumentRadio = - (SubFormFieldsPerDocumentRadio) o; - return Objects.equals(this.type, subFormFieldsPerDocumentRadio.type) - && Objects.equals(this.group, subFormFieldsPerDocumentRadio.group) - && Objects.equals(this.isChecked, subFormFieldsPerDocumentRadio.isChecked) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, isChecked, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentRadio {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append(" isChecked: ").append(toIndentedString(isChecked)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - if (isChecked != null) { - if (isFileTypeOrListOfFiles(isChecked)) { - fileTypeFound = true; - } - - if (isChecked.getClass().equals(java.io.File.class) - || isChecked.getClass().equals(Integer.class) - || isChecked.getClass().equals(String.class) - || isChecked.getClass().isEnum()) { - map.put("is_checked", isChecked); - } else if (isListOfFile(isChecked)) { - for (int i = 0; i < getListSize(isChecked); i++) { - map.put("is_checked[" + i + "]", getFromList(isChecked, i)); - } - } else { - map.put( - "is_checked", - JSON.getDefault().getMapper().writeValueAsString(isChecked)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentRadio", SubFormFieldsPerDocumentRadio.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentRadio.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java deleted file mode 100644 index 4c3019c99..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({SubFormFieldsPerDocumentSignature.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; - - public SubFormFieldsPerDocumentSignature() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentSignature init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentSignature.class); - } - - public static SubFormFieldsPerDocumentSignature init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentSignature.class); - } - - public SubFormFieldsPerDocumentSignature type(String type) { - this.type = type; - return this; - } - - /** - * A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this SubFormFieldsPerDocumentSignature object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentSignature subFormFieldsPerDocumentSignature = - (SubFormFieldsPerDocumentSignature) o; - return Objects.equals(this.type, subFormFieldsPerDocumentSignature.type) && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentSignature {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentSignature", SubFormFieldsPerDocumentSignature.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentSignature.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java deleted file mode 100644 index 31ab41161..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java +++ /dev/null @@ -1,825 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentText.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentText.JSON_PROPERTY_PLACEHOLDER, - SubFormFieldsPerDocumentText.JSON_PROPERTY_AUTO_FILL_TYPE, - SubFormFieldsPerDocumentText.JSON_PROPERTY_LINK_ID, - SubFormFieldsPerDocumentText.JSON_PROPERTY_MASKED, - SubFormFieldsPerDocumentText.JSON_PROPERTY_VALIDATION_TYPE, - SubFormFieldsPerDocumentText.JSON_PROPERTY_VALIDATION_CUSTOM_REGEX, - SubFormFieldsPerDocumentText.JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL, - SubFormFieldsPerDocumentText.JSON_PROPERTY_CONTENT, - SubFormFieldsPerDocumentText.JSON_PROPERTY_FONT_FAMILY, - SubFormFieldsPerDocumentText.JSON_PROPERTY_FONT_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public static final String JSON_PROPERTY_PLACEHOLDER = "placeholder"; - private String placeholder; - - public static final String JSON_PROPERTY_AUTO_FILL_TYPE = "auto_fill_type"; - private String autoFillType; - - public static final String JSON_PROPERTY_LINK_ID = "link_id"; - private String linkId; - - public static final String JSON_PROPERTY_MASKED = "masked"; - private Boolean masked; - - /** - * Each text field may contain a `validation_type` parameter. Check out the list of - * [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about - * the possible values. **NOTE:** When using `custom_regex` you are required to pass a - * second parameter `validation_custom_regex` and you can optionally provide - * `validation_custom_regex_format_label` for the error message the user will see in - * case of an invalid value. - */ - public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), - - LETTERS_ONLY("letters_only"), - - PHONE_NUMBER("phone_number"), - - BANK_ROUTING_NUMBER("bank_routing_number"), - - BANK_ACCOUNT_NUMBER("bank_account_number"), - - EMAIL_ADDRESS("email_address"), - - ZIP_CODE("zip_code"), - - SOCIAL_SECURITY_NUMBER("social_security_number"), - - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), - - CUSTOM_REGEX("custom_regex"); - - private String value; - - ValidationTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ValidationTypeEnum fromValue(String value) { - for (ValidationTypeEnum b : ValidationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; - - public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX = "validation_custom_regex"; - private String validationCustomRegex; - - public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL = - "validation_custom_regex_format_label"; - private String validationCustomRegexFormatLabel; - - public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; - - /** Font family for the field. */ - public enum FontFamilyEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - FontFamilyEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FontFamilyEnum fromValue(String value) { - for (FontFamilyEnum b : FontFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; - - public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; - - public SubFormFieldsPerDocumentText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentText init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentText.class); - } - - public static SubFormFieldsPerDocumentText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentText.class); - } - - public SubFormFieldsPerDocumentText type(String type) { - this.type = type; - return this; - } - - /** - * A text input field. Use the `SubFormFieldsPerDocumentText` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentText placeholder(String placeholder) { - this.placeholder = placeholder; - return this; - } - - /** - * Placeholder value for text field. - * - * @return placeholder - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PLACEHOLDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPlaceholder() { - return placeholder; - } - - @JsonProperty(JSON_PROPERTY_PLACEHOLDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlaceholder(String placeholder) { - this.placeholder = placeholder; - } - - public SubFormFieldsPerDocumentText autoFillType(String autoFillType) { - this.autoFillType = autoFillType; - return this; - } - - /** - * Auto fill type for populating fields automatically. Check out the list of [auto fill - * types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. - * - * @return autoFillType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_AUTO_FILL_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAutoFillType() { - return autoFillType; - } - - @JsonProperty(JSON_PROPERTY_AUTO_FILL_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAutoFillType(String autoFillType) { - this.autoFillType = autoFillType; - } - - public SubFormFieldsPerDocumentText linkId(String linkId) { - this.linkId = linkId; - return this; - } - - /** - * Link two or more text fields. Enter data into one linked text field, which automatically fill - * all other linked text fields. - * - * @return linkId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LINK_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLinkId() { - return linkId; - } - - @JsonProperty(JSON_PROPERTY_LINK_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkId(String linkId) { - this.linkId = linkId; - } - - public SubFormFieldsPerDocumentText masked(Boolean masked) { - this.masked = masked; - return this; - } - - /** - * Masks entered data. For more information see [Masking sensitive - * information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). - * `true` for masking the data in a text field, otherwise `false`. - * - * @return masked - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MASKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getMasked() { - return masked; - } - - @JsonProperty(JSON_PROPERTY_MASKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMasked(Boolean masked) { - this.masked = masked; - } - - public SubFormFieldsPerDocumentText validationType(ValidationTypeEnum validationType) { - this.validationType = validationType; - return this; - } - - /** - * Each text field may contain a `validation_type` parameter. Check out the list of - * [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about - * the possible values. **NOTE:** When using `custom_regex` you are required to pass a - * second parameter `validation_custom_regex` and you can optionally provide - * `validation_custom_regex_format_label` for the error message the user will see in - * case of an invalid value. - * - * @return validationType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ValidationTypeEnum getValidationType() { - return validationType; - } - - @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { - this.validationType = validationType; - } - - public SubFormFieldsPerDocumentText validationCustomRegex(String validationCustomRegex) { - this.validationCustomRegex = validationCustomRegex; - return this; - } - - /** - * Get validationCustomRegex - * - * @return validationCustomRegex - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValidationCustomRegex() { - return validationCustomRegex; - } - - @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegex(String validationCustomRegex) { - this.validationCustomRegex = validationCustomRegex; - } - - public SubFormFieldsPerDocumentText validationCustomRegexFormatLabel( - String validationCustomRegexFormatLabel) { - this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; - return this; - } - - /** - * Get validationCustomRegexFormatLabel - * - * @return validationCustomRegexFormatLabel - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getValidationCustomRegexFormatLabel() { - return validationCustomRegexFormatLabel; - } - - @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegexFormatLabel(String validationCustomRegexFormatLabel) { - this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; - } - - public SubFormFieldsPerDocumentText content(String content) { - this.content = content; - return this; - } - - /** - * Content of a `me_now` text field - * - * @return content - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getContent() { - return content; - } - - @JsonProperty(JSON_PROPERTY_CONTENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { - this.content = content; - } - - public SubFormFieldsPerDocumentText fontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for the field. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FontFamilyEnum getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - } - - public SubFormFieldsPerDocumentText fontSize(Integer fontSize) { - this.fontSize = fontSize; - return this; - } - - /** - * The initial px font size for the field contents. Can be any integer value between - * `7` and `49`. **NOTE:** Font size may be reduced during processing in - * order to fit the contents within the dimensions of the field. - * - * @return fontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFontSize() { - return fontSize; - } - - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; - } - - /** Return true if this SubFormFieldsPerDocumentText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentText subFormFieldsPerDocumentText = - (SubFormFieldsPerDocumentText) o; - return Objects.equals(this.type, subFormFieldsPerDocumentText.type) - && Objects.equals(this.placeholder, subFormFieldsPerDocumentText.placeholder) - && Objects.equals(this.autoFillType, subFormFieldsPerDocumentText.autoFillType) - && Objects.equals(this.linkId, subFormFieldsPerDocumentText.linkId) - && Objects.equals(this.masked, subFormFieldsPerDocumentText.masked) - && Objects.equals(this.validationType, subFormFieldsPerDocumentText.validationType) - && Objects.equals( - this.validationCustomRegex, - subFormFieldsPerDocumentText.validationCustomRegex) - && Objects.equals( - this.validationCustomRegexFormatLabel, - subFormFieldsPerDocumentText.validationCustomRegexFormatLabel) - && Objects.equals(this.content, subFormFieldsPerDocumentText.content) - && Objects.equals(this.fontFamily, subFormFieldsPerDocumentText.fontFamily) - && Objects.equals(this.fontSize, subFormFieldsPerDocumentText.fontSize) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash( - type, - placeholder, - autoFillType, - linkId, - masked, - validationType, - validationCustomRegex, - validationCustomRegexFormatLabel, - content, - fontFamily, - fontSize, - super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" placeholder: ").append(toIndentedString(placeholder)).append("\n"); - sb.append(" autoFillType: ").append(toIndentedString(autoFillType)).append("\n"); - sb.append(" linkId: ").append(toIndentedString(linkId)).append("\n"); - sb.append(" masked: ").append(toIndentedString(masked)).append("\n"); - sb.append(" validationType: ").append(toIndentedString(validationType)).append("\n"); - sb.append(" validationCustomRegex: ") - .append(toIndentedString(validationCustomRegex)) - .append("\n"); - sb.append(" validationCustomRegexFormatLabel: ") - .append(toIndentedString(validationCustomRegexFormatLabel)) - .append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" fontSize: ").append(toIndentedString(fontSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (placeholder != null) { - if (isFileTypeOrListOfFiles(placeholder)) { - fileTypeFound = true; - } - - if (placeholder.getClass().equals(java.io.File.class) - || placeholder.getClass().equals(Integer.class) - || placeholder.getClass().equals(String.class) - || placeholder.getClass().isEnum()) { - map.put("placeholder", placeholder); - } else if (isListOfFile(placeholder)) { - for (int i = 0; i < getListSize(placeholder); i++) { - map.put("placeholder[" + i + "]", getFromList(placeholder, i)); - } - } else { - map.put( - "placeholder", - JSON.getDefault().getMapper().writeValueAsString(placeholder)); - } - } - if (autoFillType != null) { - if (isFileTypeOrListOfFiles(autoFillType)) { - fileTypeFound = true; - } - - if (autoFillType.getClass().equals(java.io.File.class) - || autoFillType.getClass().equals(Integer.class) - || autoFillType.getClass().equals(String.class) - || autoFillType.getClass().isEnum()) { - map.put("auto_fill_type", autoFillType); - } else if (isListOfFile(autoFillType)) { - for (int i = 0; i < getListSize(autoFillType); i++) { - map.put("auto_fill_type[" + i + "]", getFromList(autoFillType, i)); - } - } else { - map.put( - "auto_fill_type", - JSON.getDefault().getMapper().writeValueAsString(autoFillType)); - } - } - if (linkId != null) { - if (isFileTypeOrListOfFiles(linkId)) { - fileTypeFound = true; - } - - if (linkId.getClass().equals(java.io.File.class) - || linkId.getClass().equals(Integer.class) - || linkId.getClass().equals(String.class) - || linkId.getClass().isEnum()) { - map.put("link_id", linkId); - } else if (isListOfFile(linkId)) { - for (int i = 0; i < getListSize(linkId); i++) { - map.put("link_id[" + i + "]", getFromList(linkId, i)); - } - } else { - map.put("link_id", JSON.getDefault().getMapper().writeValueAsString(linkId)); - } - } - if (masked != null) { - if (isFileTypeOrListOfFiles(masked)) { - fileTypeFound = true; - } - - if (masked.getClass().equals(java.io.File.class) - || masked.getClass().equals(Integer.class) - || masked.getClass().equals(String.class) - || masked.getClass().isEnum()) { - map.put("masked", masked); - } else if (isListOfFile(masked)) { - for (int i = 0; i < getListSize(masked); i++) { - map.put("masked[" + i + "]", getFromList(masked, i)); - } - } else { - map.put("masked", JSON.getDefault().getMapper().writeValueAsString(masked)); - } - } - if (validationType != null) { - if (isFileTypeOrListOfFiles(validationType)) { - fileTypeFound = true; - } - - if (validationType.getClass().equals(java.io.File.class) - || validationType.getClass().equals(Integer.class) - || validationType.getClass().equals(String.class) - || validationType.getClass().isEnum()) { - map.put("validation_type", validationType); - } else if (isListOfFile(validationType)) { - for (int i = 0; i < getListSize(validationType); i++) { - map.put("validation_type[" + i + "]", getFromList(validationType, i)); - } - } else { - map.put( - "validation_type", - JSON.getDefault().getMapper().writeValueAsString(validationType)); - } - } - if (validationCustomRegex != null) { - if (isFileTypeOrListOfFiles(validationCustomRegex)) { - fileTypeFound = true; - } - - if (validationCustomRegex.getClass().equals(java.io.File.class) - || validationCustomRegex.getClass().equals(Integer.class) - || validationCustomRegex.getClass().equals(String.class) - || validationCustomRegex.getClass().isEnum()) { - map.put("validation_custom_regex", validationCustomRegex); - } else if (isListOfFile(validationCustomRegex)) { - for (int i = 0; i < getListSize(validationCustomRegex); i++) { - map.put( - "validation_custom_regex[" + i + "]", - getFromList(validationCustomRegex, i)); - } - } else { - map.put( - "validation_custom_regex", - JSON.getDefault() - .getMapper() - .writeValueAsString(validationCustomRegex)); - } - } - if (validationCustomRegexFormatLabel != null) { - if (isFileTypeOrListOfFiles(validationCustomRegexFormatLabel)) { - fileTypeFound = true; - } - - if (validationCustomRegexFormatLabel.getClass().equals(java.io.File.class) - || validationCustomRegexFormatLabel.getClass().equals(Integer.class) - || validationCustomRegexFormatLabel.getClass().equals(String.class) - || validationCustomRegexFormatLabel.getClass().isEnum()) { - map.put( - "validation_custom_regex_format_label", - validationCustomRegexFormatLabel); - } else if (isListOfFile(validationCustomRegexFormatLabel)) { - for (int i = 0; i < getListSize(validationCustomRegexFormatLabel); i++) { - map.put( - "validation_custom_regex_format_label[" + i + "]", - getFromList(validationCustomRegexFormatLabel, i)); - } - } else { - map.put( - "validation_custom_regex_format_label", - JSON.getDefault() - .getMapper() - .writeValueAsString(validationCustomRegexFormatLabel)); - } - } - if (content != null) { - if (isFileTypeOrListOfFiles(content)) { - fileTypeFound = true; - } - - if (content.getClass().equals(java.io.File.class) - || content.getClass().equals(Integer.class) - || content.getClass().equals(String.class) - || content.getClass().isEnum()) { - map.put("content", content); - } else if (isListOfFile(content)) { - for (int i = 0; i < getListSize(content); i++) { - map.put("content[" + i + "]", getFromList(content, i)); - } - } else { - map.put("content", JSON.getDefault().getMapper().writeValueAsString(content)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("font_family", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("font_family[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "font_family", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (fontSize != null) { - if (isFileTypeOrListOfFiles(fontSize)) { - fileTypeFound = true; - } - - if (fontSize.getClass().equals(java.io.File.class) - || fontSize.getClass().equals(Integer.class) - || fontSize.getClass().equals(String.class) - || fontSize.getClass().isEnum()) { - map.put("font_size", fontSize); - } else if (isListOfFile(fontSize)) { - for (int i = 0; i < getListSize(fontSize); i++) { - map.put("font_size[" + i + "]", getFromList(fontSize, i)); - } - } else { - map.put( - "font_size", - JSON.getDefault().getMapper().writeValueAsString(fontSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentText", SubFormFieldsPerDocumentText.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java deleted file mode 100644 index 833bfc7f4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `SubFormFieldsPerDocumentBase`. */ -@JsonPropertyOrder({ - SubFormFieldsPerDocumentTextMerge.JSON_PROPERTY_TYPE, - SubFormFieldsPerDocumentTextMerge.JSON_PROPERTY_FONT_FAMILY, - SubFormFieldsPerDocumentTextMerge.JSON_PROPERTY_FONT_SIZE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; - - /** Font family for the field. */ - public enum FontFamilyEnum { - HELVETICA("helvetica"), - - ARIAL("arial"), - - COURIER("courier"), - - CALIBRI("calibri"), - - CAMBRIA("cambria"), - - GEORGIA("georgia"), - - TIMES("times"), - - TREBUCHET("trebuchet"), - - VERDANA("verdana"), - - ROBOTO("roboto"), - - ROBOTO_MONO("robotoMono"), - - NOTO_SANS("notoSans"), - - NOTO_SERIF("notoSerif"), - - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), - - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), - - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); - - private String value; - - FontFamilyEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static FontFamilyEnum fromValue(String value) { - for (FontFamilyEnum b : FontFamilyEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; - - public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; - - public SubFormFieldsPerDocumentTextMerge() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubFormFieldsPerDocumentTextMerge init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubFormFieldsPerDocumentTextMerge.class); - } - - public static SubFormFieldsPerDocumentTextMerge init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubFormFieldsPerDocumentTextMerge.class); - } - - public SubFormFieldsPerDocumentTextMerge type(String type) { - this.type = type; - return this; - } - - /** - * A text field that has default text set using pre-filled data. Use the - * `SubFormFieldsPerDocumentTextMerge` class. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public SubFormFieldsPerDocumentTextMerge fontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family for the field. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FontFamilyEnum getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { - this.fontFamily = fontFamily; - } - - public SubFormFieldsPerDocumentTextMerge fontSize(Integer fontSize) { - this.fontSize = fontSize; - return this; - } - - /** - * The initial px font size for the field contents. Can be any integer value between - * `7` and `49`. **NOTE:** Font size may be reduced during processing in - * order to fit the contents within the dimensions of the field. - * - * @return fontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getFontSize() { - return fontSize; - } - - @JsonProperty(JSON_PROPERTY_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { - this.fontSize = fontSize; - } - - /** Return true if this SubFormFieldsPerDocumentTextMerge object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubFormFieldsPerDocumentTextMerge subFormFieldsPerDocumentTextMerge = - (SubFormFieldsPerDocumentTextMerge) o; - return Objects.equals(this.type, subFormFieldsPerDocumentTextMerge.type) - && Objects.equals(this.fontFamily, subFormFieldsPerDocumentTextMerge.fontFamily) - && Objects.equals(this.fontSize, subFormFieldsPerDocumentTextMerge.fontSize) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, fontFamily, fontSize, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubFormFieldsPerDocumentTextMerge {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" fontSize: ").append(toIndentedString(fontSize)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("font_family", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("font_family[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "font_family", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (fontSize != null) { - if (isFileTypeOrListOfFiles(fontSize)) { - fileTypeFound = true; - } - - if (fontSize.getClass().equals(java.io.File.class) - || fontSize.getClass().equals(Integer.class) - || fontSize.getClass().equals(String.class) - || fontSize.getClass().isEnum()) { - map.put("font_size", fontSize); - } else if (isListOfFile(fontSize)) { - for (int i = 0; i < getListSize(fontSize); i++) { - map.put("font_size[" + i + "]", getFromList(fontSize, i)); - } - } else { - map.put( - "font_size", - JSON.getDefault().getMapper().writeValueAsString(fontSize)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("SubFormFieldsPerDocumentTextMerge", SubFormFieldsPerDocumentTextMerge.class); - JSON.registerDiscriminator(SubFormFieldsPerDocumentTextMerge.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java deleted file mode 100644 index 7b3d7e5d3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets SubFormFieldsPerDocumentTypeEnum */ -public enum SubFormFieldsPerDocumentTypeEnum { - CHECKBOX("checkbox"), - - CHECKBOX_MERGE("checkbox-merge"), - - DATE_SIGNED("date_signed"), - - DROPDOWN("dropdown"), - - HYPERLINK("hyperlink"), - - INITIALS("initials"), - - SIGNATURE("signature"), - - RADIO("radio"), - - TEXT("text"), - - TEXT_MERGE("text-merge"); - - private String value; - - SubFormFieldsPerDocumentTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SubFormFieldsPerDocumentTypeEnum fromValue(String value) { - for (SubFormFieldsPerDocumentTypeEnum b : SubFormFieldsPerDocumentTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java deleted file mode 100644 index 53accb1a1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubMergeField */ -@JsonPropertyOrder({SubMergeField.JSON_PROPERTY_NAME, SubMergeField.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubMergeField { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - /** The type of merge field. */ - public enum TypeEnum { - TEXT("text"), - - CHECKBOX("checkbox"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; - - public SubMergeField() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubMergeField init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubMergeField.class); - } - - public static SubMergeField init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubMergeField.class); - } - - public SubMergeField name(String name) { - this.name = name; - return this; - } - - /** - * The name of the merge field. Must be unique. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubMergeField type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * The type of merge field. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TypeEnum getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { - this.type = type; - } - - /** Return true if this SubMergeField object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubMergeField subMergeField = (SubMergeField) o; - return Objects.equals(this.name, subMergeField.name) - && Objects.equals(this.type, subMergeField.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubMergeField {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java deleted file mode 100644 index 015efbcb4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** OAuth related parameters. */ -@JsonPropertyOrder({SubOAuth.JSON_PROPERTY_CALLBACK_URL, SubOAuth.JSON_PROPERTY_SCOPES}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubOAuth { - public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; - - /** Gets or Sets scopes */ - public enum ScopesEnum { - REQUEST_SIGNATURE("request_signature"), - - BASIC_ACCOUNT_INFO("basic_account_info"), - - ACCOUNT_ACCESS("account_access"), - - SIGNATURE_REQUEST_ACCESS("signature_request_access"), - - TEMPLATE_ACCESS("template_access"), - - TEAM_ACCESS("team_access"), - - API_APP_ACCESS("api_app_access"), - - EMPTY(""); - - private String value; - - ScopesEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScopesEnum fromValue(String value) { - for (ScopesEnum b : ScopesEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; - - public SubOAuth() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubOAuth init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubOAuth.class); - } - - public static SubOAuth init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubOAuth.class); - } - - public SubOAuth callbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - return this; - } - - /** - * The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is - * provided) - * - * @return callbackUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCallbackUrl() { - return callbackUrl; - } - - @JsonProperty(JSON_PROPERTY_CALLBACK_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - public SubOAuth scopes(List scopes) { - this.scopes = scopes; - return this; - } - - public SubOAuth addScopesItem(ScopesEnum scopesItem) { - if (this.scopes == null) { - this.scopes = new ArrayList<>(); - } - this.scopes.add(scopesItem); - return this; - } - - /** - * A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if - * `oauth[callback_url]` is provided). - * - * @return scopes - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getScopes() { - return scopes; - } - - @JsonProperty(JSON_PROPERTY_SCOPES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { - this.scopes = scopes; - } - - /** Return true if this SubOAuth object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubOAuth subOAuth = (SubOAuth) o; - return Objects.equals(this.callbackUrl, subOAuth.callbackUrl) - && Objects.equals(this.scopes, subOAuth.scopes); - } - - @Override - public int hashCode() { - return Objects.hash(callbackUrl, scopes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubOAuth {\n"); - sb.append(" callbackUrl: ").append(toIndentedString(callbackUrl)).append("\n"); - sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (callbackUrl != null) { - if (isFileTypeOrListOfFiles(callbackUrl)) { - fileTypeFound = true; - } - - if (callbackUrl.getClass().equals(java.io.File.class) - || callbackUrl.getClass().equals(Integer.class) - || callbackUrl.getClass().equals(String.class) - || callbackUrl.getClass().isEnum()) { - map.put("callback_url", callbackUrl); - } else if (isListOfFile(callbackUrl)) { - for (int i = 0; i < getListSize(callbackUrl); i++) { - map.put("callback_url[" + i + "]", getFromList(callbackUrl, i)); - } - } else { - map.put( - "callback_url", - JSON.getDefault().getMapper().writeValueAsString(callbackUrl)); - } - } - if (scopes != null) { - if (isFileTypeOrListOfFiles(scopes)) { - fileTypeFound = true; - } - - if (scopes.getClass().equals(java.io.File.class) - || scopes.getClass().equals(Integer.class) - || scopes.getClass().equals(String.class) - || scopes.getClass().isEnum()) { - map.put("scopes", scopes); - } else if (isListOfFile(scopes)) { - for (int i = 0; i < getListSize(scopes); i++) { - map.put("scopes[" + i + "]", getFromList(scopes, i)); - } - } else { - map.put("scopes", JSON.getDefault().getMapper().writeValueAsString(scopes)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java deleted file mode 100644 index c172a1be1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Additional options supported by API App. */ -@JsonPropertyOrder({SubOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubOptions { - public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere = false; - - public SubOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubOptions.class); - } - - public static SubOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubOptions.class); - } - - public SubOptions canInsertEverywhere(Boolean canInsertEverywhere) { - this.canInsertEverywhere = canInsertEverywhere; - return this; - } - - /** - * Determines if signers can use \"Insert Everywhere\" when signing a document. - * - * @return canInsertEverywhere - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCanInsertEverywhere() { - return canInsertEverywhere; - } - - @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { - this.canInsertEverywhere = canInsertEverywhere; - } - - /** Return true if this SubOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubOptions subOptions = (SubOptions) o; - return Objects.equals(this.canInsertEverywhere, subOptions.canInsertEverywhere); - } - - @Override - public int hashCode() { - return Objects.hash(canInsertEverywhere); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubOptions {\n"); - sb.append(" canInsertEverywhere: ") - .append(toIndentedString(canInsertEverywhere)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (canInsertEverywhere != null) { - if (isFileTypeOrListOfFiles(canInsertEverywhere)) { - fileTypeFound = true; - } - - if (canInsertEverywhere.getClass().equals(java.io.File.class) - || canInsertEverywhere.getClass().equals(Integer.class) - || canInsertEverywhere.getClass().equals(String.class) - || canInsertEverywhere.getClass().isEnum()) { - map.put("can_insert_everywhere", canInsertEverywhere); - } else if (isListOfFile(canInsertEverywhere)) { - for (int i = 0; i < getListSize(canInsertEverywhere); i++) { - map.put( - "can_insert_everywhere[" + i + "]", - getFromList(canInsertEverywhere, i)); - } - } else { - map.put( - "can_insert_everywhere", - JSON.getDefault().getMapper().writeValueAsString(canInsertEverywhere)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java deleted file mode 100644 index e6c28a56a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** SubSignatureRequestGroupedSigners */ -@JsonPropertyOrder({ - SubSignatureRequestGroupedSigners.JSON_PROPERTY_GROUP, - SubSignatureRequestGroupedSigners.JSON_PROPERTY_SIGNERS, - SubSignatureRequestGroupedSigners.JSON_PROPERTY_ORDER -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubSignatureRequestGroupedSigners { - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public SubSignatureRequestGroupedSigners() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubSignatureRequestGroupedSigners init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubSignatureRequestGroupedSigners.class); - } - - public static SubSignatureRequestGroupedSigners init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubSignatureRequestGroupedSigners.class); - } - - public SubSignatureRequestGroupedSigners group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group. - * - * @return group - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { - this.group = group; - } - - public SubSignatureRequestGroupedSigners signers(List signers) { - this.signers = signers; - return this; - } - - public SubSignatureRequestGroupedSigners addSignersItem(SubSignatureRequestSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Signers belonging to this Group. **NOTE:** Only `name`, `email_address`, - * and `pin` are available to Grouped Signers. We will ignore all other properties, - * even though they are listed below. - * - * @return signers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { - this.signers = signers; - } - - public SubSignatureRequestGroupedSigners order(Integer order) { - this.order = order; - return this; - } - - /** - * The order the group is required to sign in. Use this instead of Signer-level - * `order`. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - /** Return true if this SubSignatureRequestGroupedSigners object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubSignatureRequestGroupedSigners subSignatureRequestGroupedSigners = - (SubSignatureRequestGroupedSigners) o; - return Objects.equals(this.group, subSignatureRequestGroupedSigners.group) - && Objects.equals(this.signers, subSignatureRequestGroupedSigners.signers) - && Objects.equals(this.order, subSignatureRequestGroupedSigners.order); - } - - @Override - public int hashCode() { - return Objects.hash(group, signers, order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubSignatureRequestGroupedSigners {\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java deleted file mode 100644 index a110601e8..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubSignatureRequestSigner */ -@JsonPropertyOrder({ - SubSignatureRequestSigner.JSON_PROPERTY_NAME, - SubSignatureRequestSigner.JSON_PROPERTY_EMAIL_ADDRESS, - SubSignatureRequestSigner.JSON_PROPERTY_ORDER, - SubSignatureRequestSigner.JSON_PROPERTY_PIN, - SubSignatureRequestSigner.JSON_PROPERTY_SMS_PHONE_NUMBER, - SubSignatureRequestSigner.JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubSignatureRequestSigner { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; - - public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; - - /** - * Specifies the feature used with the `sms_phone_number`. Default - * `authentication`. If `authentication`, signer is sent a verification code - * via SMS that is required to access the document. If `delivery`, a link to complete - * the signature request is delivered via SMS (_and_ email). - */ - public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), - - DELIVERY("delivery"); - - private String value; - - SmsPhoneNumberTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SmsPhoneNumberTypeEnum fromValue(String value) { - for (SmsPhoneNumberTypeEnum b : SmsPhoneNumberTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; - - public SubSignatureRequestSigner() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubSignatureRequestSigner init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubSignatureRequestSigner.class); - } - - public static SubSignatureRequestSigner init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubSignatureRequestSigner.class); - } - - public SubSignatureRequestSigner name(String name) { - this.name = name; - return this; - } - - /** - * The name of the signer. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubSignatureRequestSigner emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the signer. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public SubSignatureRequestSigner order(Integer order) { - this.order = order; - return this; - } - - /** - * The order the signer is required to sign in. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - public SubSignatureRequestSigner pin(String pin) { - this.pin = pin; - return this; - } - - /** - * The 4- to 12-character access code that will secure this signer's signature page. - * - * @return pin - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPin() { - return pin; - } - - @JsonProperty(JSON_PROPERTY_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { - this.pin = pin; - } - - public SubSignatureRequestSigner smsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - return this; - } - - /** - * An E.164 formatted phone number. By using the feature, you agree you are responsible for - * obtaining a signer's consent to receive text messages from Dropbox Sign related to this - * signature request and confirm you have obtained such consent from all signers prior to - * enabling SMS delivery for this signature request. [Learn - * more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). - * **NOTE:** Not available in test mode and requires a Standard plan or higher. - * - * @return smsPhoneNumber - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmsPhoneNumber() { - return smsPhoneNumber; - } - - @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - } - - public SubSignatureRequestSigner smsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { - this.smsPhoneNumberType = smsPhoneNumberType; - return this; - } - - /** - * Specifies the feature used with the `sms_phone_number`. Default - * `authentication`. If `authentication`, signer is sent a verification code - * via SMS that is required to access the document. If `delivery`, a link to complete - * the signature request is delivered via SMS (_and_ email). - * - * @return smsPhoneNumberType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { - return smsPhoneNumberType; - } - - @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { - this.smsPhoneNumberType = smsPhoneNumberType; - } - - /** Return true if this SubSignatureRequestSigner object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubSignatureRequestSigner subSignatureRequestSigner = (SubSignatureRequestSigner) o; - return Objects.equals(this.name, subSignatureRequestSigner.name) - && Objects.equals(this.emailAddress, subSignatureRequestSigner.emailAddress) - && Objects.equals(this.order, subSignatureRequestSigner.order) - && Objects.equals(this.pin, subSignatureRequestSigner.pin) - && Objects.equals(this.smsPhoneNumber, subSignatureRequestSigner.smsPhoneNumber) - && Objects.equals( - this.smsPhoneNumberType, subSignatureRequestSigner.smsPhoneNumberType); - } - - @Override - public int hashCode() { - return Objects.hash(name, emailAddress, order, pin, smsPhoneNumber, smsPhoneNumberType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubSignatureRequestSigner {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append(" pin: ").append(toIndentedString(pin)).append("\n"); - sb.append(" smsPhoneNumber: ").append(toIndentedString(smsPhoneNumber)).append("\n"); - sb.append(" smsPhoneNumberType: ") - .append(toIndentedString(smsPhoneNumberType)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - if (pin != null) { - if (isFileTypeOrListOfFiles(pin)) { - fileTypeFound = true; - } - - if (pin.getClass().equals(java.io.File.class) - || pin.getClass().equals(Integer.class) - || pin.getClass().equals(String.class) - || pin.getClass().isEnum()) { - map.put("pin", pin); - } else if (isListOfFile(pin)) { - for (int i = 0; i < getListSize(pin); i++) { - map.put("pin[" + i + "]", getFromList(pin, i)); - } - } else { - map.put("pin", JSON.getDefault().getMapper().writeValueAsString(pin)); - } - } - if (smsPhoneNumber != null) { - if (isFileTypeOrListOfFiles(smsPhoneNumber)) { - fileTypeFound = true; - } - - if (smsPhoneNumber.getClass().equals(java.io.File.class) - || smsPhoneNumber.getClass().equals(Integer.class) - || smsPhoneNumber.getClass().equals(String.class) - || smsPhoneNumber.getClass().isEnum()) { - map.put("sms_phone_number", smsPhoneNumber); - } else if (isListOfFile(smsPhoneNumber)) { - for (int i = 0; i < getListSize(smsPhoneNumber); i++) { - map.put("sms_phone_number[" + i + "]", getFromList(smsPhoneNumber, i)); - } - } else { - map.put( - "sms_phone_number", - JSON.getDefault().getMapper().writeValueAsString(smsPhoneNumber)); - } - } - if (smsPhoneNumberType != null) { - if (isFileTypeOrListOfFiles(smsPhoneNumberType)) { - fileTypeFound = true; - } - - if (smsPhoneNumberType.getClass().equals(java.io.File.class) - || smsPhoneNumberType.getClass().equals(Integer.class) - || smsPhoneNumberType.getClass().equals(String.class) - || smsPhoneNumberType.getClass().isEnum()) { - map.put("sms_phone_number_type", smsPhoneNumberType); - } else if (isListOfFile(smsPhoneNumberType)) { - for (int i = 0; i < getListSize(smsPhoneNumberType); i++) { - map.put( - "sms_phone_number_type[" + i + "]", - getFromList(smsPhoneNumberType, i)); - } - } else { - map.put( - "sms_phone_number_type", - JSON.getDefault().getMapper().writeValueAsString(smsPhoneNumberType)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java deleted file mode 100644 index 1c2b9ee34..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubSignatureRequestTemplateSigner */ -@JsonPropertyOrder({ - SubSignatureRequestTemplateSigner.JSON_PROPERTY_ROLE, - SubSignatureRequestTemplateSigner.JSON_PROPERTY_NAME, - SubSignatureRequestTemplateSigner.JSON_PROPERTY_EMAIL_ADDRESS, - SubSignatureRequestTemplateSigner.JSON_PROPERTY_PIN, - SubSignatureRequestTemplateSigner.JSON_PROPERTY_SMS_PHONE_NUMBER, - SubSignatureRequestTemplateSigner.JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubSignatureRequestTemplateSigner { - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; - - public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; - - /** - * Specifies the feature used with the `sms_phone_number`. Default - * `authentication`. If `authentication`, signer is sent a verification code - * via SMS that is required to access the document. If `delivery`, a link to complete - * the signature request is delivered via SMS (_and_ email). - */ - public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), - - DELIVERY("delivery"); - - private String value; - - SmsPhoneNumberTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SmsPhoneNumberTypeEnum fromValue(String value) { - for (SmsPhoneNumberTypeEnum b : SmsPhoneNumberTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; - - public SubSignatureRequestTemplateSigner() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubSignatureRequestTemplateSigner init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubSignatureRequestTemplateSigner.class); - } - - public static SubSignatureRequestTemplateSigner init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubSignatureRequestTemplateSigner.class); - } - - public SubSignatureRequestTemplateSigner role(String role) { - this.role = role; - return this; - } - - /** - * Must match an existing role in chosen Template(s). It's case-sensitive. - * - * @return role - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { - this.role = role; - } - - public SubSignatureRequestTemplateSigner name(String name) { - this.name = name; - return this; - } - - /** - * The name of the signer. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubSignatureRequestTemplateSigner emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the signer. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public SubSignatureRequestTemplateSigner pin(String pin) { - this.pin = pin; - return this; - } - - /** - * The 4- to 12-character access code that will secure this signer's signature page. - * - * @return pin - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPin() { - return pin; - } - - @JsonProperty(JSON_PROPERTY_PIN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { - this.pin = pin; - } - - public SubSignatureRequestTemplateSigner smsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - return this; - } - - /** - * An E.164 formatted phone number. By using the feature, you agree you are responsible for - * obtaining a signer's consent to receive text messages from Dropbox Sign related to this - * signature request and confirm you have obtained such consent from all signers prior to - * enabling SMS delivery for this signature request. [Learn - * more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). - * **NOTE:** Not available in test mode and requires a Standard plan or higher. - * - * @return smsPhoneNumber - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSmsPhoneNumber() { - return smsPhoneNumber; - } - - @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { - this.smsPhoneNumber = smsPhoneNumber; - } - - public SubSignatureRequestTemplateSigner smsPhoneNumberType( - SmsPhoneNumberTypeEnum smsPhoneNumberType) { - this.smsPhoneNumberType = smsPhoneNumberType; - return this; - } - - /** - * Specifies the feature used with the `sms_phone_number`. Default - * `authentication`. If `authentication`, signer is sent a verification code - * via SMS that is required to access the document. If `delivery`, a link to complete - * the signature request is delivered via SMS (_and_ email). - * - * @return smsPhoneNumberType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { - return smsPhoneNumberType; - } - - @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { - this.smsPhoneNumberType = smsPhoneNumberType; - } - - /** Return true if this SubSignatureRequestTemplateSigner object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubSignatureRequestTemplateSigner subSignatureRequestTemplateSigner = - (SubSignatureRequestTemplateSigner) o; - return Objects.equals(this.role, subSignatureRequestTemplateSigner.role) - && Objects.equals(this.name, subSignatureRequestTemplateSigner.name) - && Objects.equals(this.emailAddress, subSignatureRequestTemplateSigner.emailAddress) - && Objects.equals(this.pin, subSignatureRequestTemplateSigner.pin) - && Objects.equals( - this.smsPhoneNumber, subSignatureRequestTemplateSigner.smsPhoneNumber) - && Objects.equals( - this.smsPhoneNumberType, - subSignatureRequestTemplateSigner.smsPhoneNumberType); - } - - @Override - public int hashCode() { - return Objects.hash(role, name, emailAddress, pin, smsPhoneNumber, smsPhoneNumberType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubSignatureRequestTemplateSigner {\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" pin: ").append(toIndentedString(pin)).append("\n"); - sb.append(" smsPhoneNumber: ").append(toIndentedString(smsPhoneNumber)).append("\n"); - sb.append(" smsPhoneNumberType: ") - .append(toIndentedString(smsPhoneNumberType)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (pin != null) { - if (isFileTypeOrListOfFiles(pin)) { - fileTypeFound = true; - } - - if (pin.getClass().equals(java.io.File.class) - || pin.getClass().equals(Integer.class) - || pin.getClass().equals(String.class) - || pin.getClass().isEnum()) { - map.put("pin", pin); - } else if (isListOfFile(pin)) { - for (int i = 0; i < getListSize(pin); i++) { - map.put("pin[" + i + "]", getFromList(pin, i)); - } - } else { - map.put("pin", JSON.getDefault().getMapper().writeValueAsString(pin)); - } - } - if (smsPhoneNumber != null) { - if (isFileTypeOrListOfFiles(smsPhoneNumber)) { - fileTypeFound = true; - } - - if (smsPhoneNumber.getClass().equals(java.io.File.class) - || smsPhoneNumber.getClass().equals(Integer.class) - || smsPhoneNumber.getClass().equals(String.class) - || smsPhoneNumber.getClass().isEnum()) { - map.put("sms_phone_number", smsPhoneNumber); - } else if (isListOfFile(smsPhoneNumber)) { - for (int i = 0; i < getListSize(smsPhoneNumber); i++) { - map.put("sms_phone_number[" + i + "]", getFromList(smsPhoneNumber, i)); - } - } else { - map.put( - "sms_phone_number", - JSON.getDefault().getMapper().writeValueAsString(smsPhoneNumber)); - } - } - if (smsPhoneNumberType != null) { - if (isFileTypeOrListOfFiles(smsPhoneNumberType)) { - fileTypeFound = true; - } - - if (smsPhoneNumberType.getClass().equals(java.io.File.class) - || smsPhoneNumberType.getClass().equals(Integer.class) - || smsPhoneNumberType.getClass().equals(String.class) - || smsPhoneNumberType.getClass().isEnum()) { - map.put("sms_phone_number_type", smsPhoneNumberType); - } else if (isListOfFile(smsPhoneNumberType)) { - for (int i = 0; i < getListSize(smsPhoneNumberType); i++) { - map.put( - "sms_phone_number_type[" + i + "]", - getFromList(smsPhoneNumberType, i)); - } - } else { - map.put( - "sms_phone_number_type", - JSON.getDefault().getMapper().writeValueAsString(smsPhoneNumberType)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java deleted file mode 100644 index c1be71eed..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * This allows the requester to specify the types allowed for creating a signature. **NOTE:** If - * `signing_options` are not defined in the request, the allowed types will default to - * those specified in the account settings. - */ -@JsonPropertyOrder({ - SubSigningOptions.JSON_PROPERTY_DEFAULT_TYPE, - SubSigningOptions.JSON_PROPERTY_DRAW, - SubSigningOptions.JSON_PROPERTY_PHONE, - SubSigningOptions.JSON_PROPERTY_TYPE, - SubSigningOptions.JSON_PROPERTY_UPLOAD -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubSigningOptions { - /** The default type shown (limited to the listed types) */ - public enum DefaultTypeEnum { - DRAW("draw"), - - PHONE("phone"), - - TYPE("type"), - - UPLOAD("upload"); - - private String value; - - DefaultTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static DefaultTypeEnum fromValue(String value) { - for (DefaultTypeEnum b : DefaultTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_DEFAULT_TYPE = "default_type"; - private DefaultTypeEnum defaultType; - - public static final String JSON_PROPERTY_DRAW = "draw"; - private Boolean draw = false; - - public static final String JSON_PROPERTY_PHONE = "phone"; - private Boolean phone = false; - - public static final String JSON_PROPERTY_TYPE = "type"; - private Boolean type = false; - - public static final String JSON_PROPERTY_UPLOAD = "upload"; - private Boolean upload = false; - - public SubSigningOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubSigningOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubSigningOptions.class); - } - - public static SubSigningOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubSigningOptions.class); - } - - public SubSigningOptions defaultType(DefaultTypeEnum defaultType) { - this.defaultType = defaultType; - return this; - } - - /** - * The default type shown (limited to the listed types) - * - * @return defaultType - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DEFAULT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DefaultTypeEnum getDefaultType() { - return defaultType; - } - - @JsonProperty(JSON_PROPERTY_DEFAULT_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDefaultType(DefaultTypeEnum defaultType) { - this.defaultType = defaultType; - } - - public SubSigningOptions draw(Boolean draw) { - this.draw = draw; - return this; - } - - /** - * Allows drawing the signature - * - * @return draw - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DRAW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getDraw() { - return draw; - } - - @JsonProperty(JSON_PROPERTY_DRAW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDraw(Boolean draw) { - this.draw = draw; - } - - public SubSigningOptions phone(Boolean phone) { - this.phone = phone; - return this; - } - - /** - * Allows using a smartphone to email the signature - * - * @return phone - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPhone() { - return phone; - } - - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(Boolean phone) { - this.phone = phone; - } - - public SubSigningOptions type(Boolean type) { - this.type = type; - return this; - } - - /** - * Allows typing the signature - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(Boolean type) { - this.type = type; - } - - public SubSigningOptions upload(Boolean upload) { - this.upload = upload; - return this; - } - - /** - * Allows uploading the signature - * - * @return upload - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UPLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUpload() { - return upload; - } - - @JsonProperty(JSON_PROPERTY_UPLOAD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpload(Boolean upload) { - this.upload = upload; - } - - /** Return true if this SubSigningOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubSigningOptions subSigningOptions = (SubSigningOptions) o; - return Objects.equals(this.defaultType, subSigningOptions.defaultType) - && Objects.equals(this.draw, subSigningOptions.draw) - && Objects.equals(this.phone, subSigningOptions.phone) - && Objects.equals(this.type, subSigningOptions.type) - && Objects.equals(this.upload, subSigningOptions.upload); - } - - @Override - public int hashCode() { - return Objects.hash(defaultType, draw, phone, type, upload); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubSigningOptions {\n"); - sb.append(" defaultType: ").append(toIndentedString(defaultType)).append("\n"); - sb.append(" draw: ").append(toIndentedString(draw)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" upload: ").append(toIndentedString(upload)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (defaultType != null) { - if (isFileTypeOrListOfFiles(defaultType)) { - fileTypeFound = true; - } - - if (defaultType.getClass().equals(java.io.File.class) - || defaultType.getClass().equals(Integer.class) - || defaultType.getClass().equals(String.class) - || defaultType.getClass().isEnum()) { - map.put("default_type", defaultType); - } else if (isListOfFile(defaultType)) { - for (int i = 0; i < getListSize(defaultType); i++) { - map.put("default_type[" + i + "]", getFromList(defaultType, i)); - } - } else { - map.put( - "default_type", - JSON.getDefault().getMapper().writeValueAsString(defaultType)); - } - } - if (draw != null) { - if (isFileTypeOrListOfFiles(draw)) { - fileTypeFound = true; - } - - if (draw.getClass().equals(java.io.File.class) - || draw.getClass().equals(Integer.class) - || draw.getClass().equals(String.class) - || draw.getClass().isEnum()) { - map.put("draw", draw); - } else if (isListOfFile(draw)) { - for (int i = 0; i < getListSize(draw); i++) { - map.put("draw[" + i + "]", getFromList(draw, i)); - } - } else { - map.put("draw", JSON.getDefault().getMapper().writeValueAsString(draw)); - } - } - if (phone != null) { - if (isFileTypeOrListOfFiles(phone)) { - fileTypeFound = true; - } - - if (phone.getClass().equals(java.io.File.class) - || phone.getClass().equals(Integer.class) - || phone.getClass().equals(String.class) - || phone.getClass().isEnum()) { - map.put("phone", phone); - } else if (isListOfFile(phone)) { - for (int i = 0; i < getListSize(phone); i++) { - map.put("phone[" + i + "]", getFromList(phone, i)); - } - } else { - map.put("phone", JSON.getDefault().getMapper().writeValueAsString(phone)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (upload != null) { - if (isFileTypeOrListOfFiles(upload)) { - fileTypeFound = true; - } - - if (upload.getClass().equals(java.io.File.class) - || upload.getClass().equals(Integer.class) - || upload.getClass().equals(String.class) - || upload.getClass().isEnum()) { - map.put("upload", upload); - } else if (isListOfFile(upload)) { - for (int i = 0; i < getListSize(upload); i++) { - map.put("upload[" + i + "]", getFromList(upload, i)); - } - } else { - map.put("upload", JSON.getDefault().getMapper().writeValueAsString(upload)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java deleted file mode 100644 index 359c32a6c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubTeamResponse */ -@JsonPropertyOrder({SubTeamResponse.JSON_PROPERTY_TEAM_ID, SubTeamResponse.JSON_PROPERTY_NAME}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubTeamResponse { - public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public SubTeamResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubTeamResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubTeamResponse.class); - } - - public static SubTeamResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubTeamResponse.class); - } - - public SubTeamResponse teamId(String teamId) { - this.teamId = teamId; - return this; - } - - /** - * The id of a team - * - * @return teamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeamId() { - return teamId; - } - - @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - public SubTeamResponse name(String name) { - this.name = name; - return this; - } - - /** - * The name of a team - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this SubTeamResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubTeamResponse subTeamResponse = (SubTeamResponse) o; - return Objects.equals(this.teamId, subTeamResponse.teamId) - && Objects.equals(this.name, subTeamResponse.name); - } - - @Override - public int hashCode() { - return Objects.hash(teamId, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubTeamResponse {\n"); - sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (teamId != null) { - if (isFileTypeOrListOfFiles(teamId)) { - fileTypeFound = true; - } - - if (teamId.getClass().equals(java.io.File.class) - || teamId.getClass().equals(Integer.class) - || teamId.getClass().equals(String.class) - || teamId.getClass().isEnum()) { - map.put("team_id", teamId); - } else if (isListOfFile(teamId)) { - for (int i = 0; i < getListSize(teamId); i++) { - map.put("team_id[" + i + "]", getFromList(teamId, i)); - } - } else { - map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java deleted file mode 100644 index 78413aade..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubTemplateRole */ -@JsonPropertyOrder({SubTemplateRole.JSON_PROPERTY_NAME, SubTemplateRole.JSON_PROPERTY_ORDER}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubTemplateRole { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public SubTemplateRole() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubTemplateRole init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubTemplateRole.class); - } - - public static SubTemplateRole init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), SubTemplateRole.class); - } - - public SubTemplateRole name(String name) { - this.name = name; - return this; - } - - /** - * The role name of the signer that will be displayed when the template is used to create a - * signature request. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public SubTemplateRole order(Integer order) { - this.order = order; - return this; - } - - /** - * The order in which this signer role is required to sign. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - /** Return true if this SubTemplateRole object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubTemplateRole subTemplateRole = (SubTemplateRole) o; - return Objects.equals(this.name, subTemplateRole.name) - && Objects.equals(this.order, subTemplateRole.order); - } - - @Override - public int hashCode() { - return Objects.hash(name, order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubTemplateRole {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java deleted file mode 100644 index 0118049aa..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubUnclaimedDraftSigner */ -@JsonPropertyOrder({ - SubUnclaimedDraftSigner.JSON_PROPERTY_EMAIL_ADDRESS, - SubUnclaimedDraftSigner.JSON_PROPERTY_NAME, - SubUnclaimedDraftSigner.JSON_PROPERTY_ORDER -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubUnclaimedDraftSigner { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public SubUnclaimedDraftSigner() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubUnclaimedDraftSigner init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubUnclaimedDraftSigner.class); - } - - public static SubUnclaimedDraftSigner init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), SubUnclaimedDraftSigner.class); - } - - public SubUnclaimedDraftSigner emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the signer. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public SubUnclaimedDraftSigner name(String name) { - this.name = name; - return this; - } - - /** - * The name of the signer. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubUnclaimedDraftSigner order(Integer order) { - this.order = order; - return this; - } - - /** - * The order the signer is required to sign in. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - /** Return true if this SubUnclaimedDraftSigner object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubUnclaimedDraftSigner subUnclaimedDraftSigner = (SubUnclaimedDraftSigner) o; - return Objects.equals(this.emailAddress, subUnclaimedDraftSigner.emailAddress) - && Objects.equals(this.name, subUnclaimedDraftSigner.name) - && Objects.equals(this.order, subUnclaimedDraftSigner.order); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress, name, order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubUnclaimedDraftSigner {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java deleted file mode 100644 index 58128a75e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** SubUnclaimedDraftTemplateSigner */ -@JsonPropertyOrder({ - SubUnclaimedDraftTemplateSigner.JSON_PROPERTY_ROLE, - SubUnclaimedDraftTemplateSigner.JSON_PROPERTY_NAME, - SubUnclaimedDraftTemplateSigner.JSON_PROPERTY_EMAIL_ADDRESS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubUnclaimedDraftTemplateSigner { - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public SubUnclaimedDraftTemplateSigner() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubUnclaimedDraftTemplateSigner init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubUnclaimedDraftTemplateSigner.class); - } - - public static SubUnclaimedDraftTemplateSigner init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - SubUnclaimedDraftTemplateSigner.class); - } - - public SubUnclaimedDraftTemplateSigner role(String role) { - this.role = role; - return this; - } - - /** - * Must match an existing role in chosen Template(s). - * - * @return role - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { - this.role = role; - } - - public SubUnclaimedDraftTemplateSigner name(String name) { - this.name = name; - return this; - } - - /** - * The name of the signer filling the role of `role`. - * - * @return name - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { - this.name = name; - } - - public SubUnclaimedDraftTemplateSigner emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the signer filling the role of `role`. - * - * @return emailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this SubUnclaimedDraftTemplateSigner object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubUnclaimedDraftTemplateSigner subUnclaimedDraftTemplateSigner = - (SubUnclaimedDraftTemplateSigner) o; - return Objects.equals(this.role, subUnclaimedDraftTemplateSigner.role) - && Objects.equals(this.name, subUnclaimedDraftTemplateSigner.name) - && Objects.equals(this.emailAddress, subUnclaimedDraftTemplateSigner.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(role, name, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubUnclaimedDraftTemplateSigner {\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java deleted file mode 100644 index 2737e1b6d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ /dev/null @@ -1,972 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * An array of elements and values serialized to a string, to be used to customize the app's - * signer page. (Only applies to some API plans) Take a look at our [white labeling - * guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. - */ -@JsonPropertyOrder({ - SubWhiteLabelingOptions.JSON_PROPERTY_HEADER_BACKGROUND_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_LEGAL_VERSION, - SubWhiteLabelingOptions.JSON_PROPERTY_LINK_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_PAGE_BACKGROUND_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER, - SubWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER, - SubWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER, - SubWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR, - SubWhiteLabelingOptions.JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER, - SubWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR1, - SubWhiteLabelingOptions.JSON_PROPERTY_TEXT_COLOR2, - SubWhiteLabelingOptions.JSON_PROPERTY_RESET_TO_DEFAULT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class SubWhiteLabelingOptions { - public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1a1a1a"; - - /** Gets or Sets legalVersion */ - public enum LegalVersionEnum { - TERMS1("terms1"), - - TERMS2("terms2"); - - private String value; - - LegalVersionEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static LegalVersionEnum fromValue(String value) { - for (LegalVersionEnum b : LegalVersionEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; - - public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#0061FE"; - - public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#f7f8f9"; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#0061FE"; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = - "primary_button_color_hover"; - private String primaryButtonColorHover = "#0061FE"; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = - "primary_button_text_color"; - private String primaryButtonTextColor = "#ffffff"; - - public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = - "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#ffffff"; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#ffffff"; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = - "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#ffffff"; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = - "secondary_button_text_color"; - private String secondaryButtonTextColor = "#0061FE"; - - public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = - "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#0061FE"; - - public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1 = "#808080"; - - public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#ffffff"; - - public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; - private Boolean resetToDefault; - - public SubWhiteLabelingOptions() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static SubWhiteLabelingOptions init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, SubWhiteLabelingOptions.class); - } - - public static SubWhiteLabelingOptions init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), SubWhiteLabelingOptions.class); - } - - public SubWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { - this.headerBackgroundColor = headerBackgroundColor; - return this; - } - - /** - * Get headerBackgroundColor - * - * @return headerBackgroundColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getHeaderBackgroundColor() { - return headerBackgroundColor; - } - - @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { - this.headerBackgroundColor = headerBackgroundColor; - } - - public SubWhiteLabelingOptions legalVersion(LegalVersionEnum legalVersion) { - this.legalVersion = legalVersion; - return this; - } - - /** - * Get legalVersion - * - * @return legalVersion - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LegalVersionEnum getLegalVersion() { - return legalVersion; - } - - @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(LegalVersionEnum legalVersion) { - this.legalVersion = legalVersion; - } - - public SubWhiteLabelingOptions linkColor(String linkColor) { - this.linkColor = linkColor; - return this; - } - - /** - * Get linkColor - * - * @return linkColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_LINK_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLinkColor() { - return linkColor; - } - - @JsonProperty(JSON_PROPERTY_LINK_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { - this.linkColor = linkColor; - } - - public SubWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { - this.pageBackgroundColor = pageBackgroundColor; - return this; - } - - /** - * Get pageBackgroundColor - * - * @return pageBackgroundColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPageBackgroundColor() { - return pageBackgroundColor; - } - - @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { - this.pageBackgroundColor = pageBackgroundColor; - } - - public SubWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { - this.primaryButtonColor = primaryButtonColor; - return this; - } - - /** - * Get primaryButtonColor - * - * @return primaryButtonColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonColor() { - return primaryButtonColor; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { - this.primaryButtonColor = primaryButtonColor; - } - - public SubWhiteLabelingOptions primaryButtonColorHover(String primaryButtonColorHover) { - this.primaryButtonColorHover = primaryButtonColorHover; - return this; - } - - /** - * Get primaryButtonColorHover - * - * @return primaryButtonColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonColorHover() { - return primaryButtonColorHover; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { - this.primaryButtonColorHover = primaryButtonColorHover; - } - - public SubWhiteLabelingOptions primaryButtonTextColor(String primaryButtonTextColor) { - this.primaryButtonTextColor = primaryButtonTextColor; - return this; - } - - /** - * Get primaryButtonTextColor - * - * @return primaryButtonTextColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonTextColor() { - return primaryButtonTextColor; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { - this.primaryButtonTextColor = primaryButtonTextColor; - } - - public SubWhiteLabelingOptions primaryButtonTextColorHover(String primaryButtonTextColorHover) { - this.primaryButtonTextColorHover = primaryButtonTextColorHover; - return this; - } - - /** - * Get primaryButtonTextColorHover - * - * @return primaryButtonTextColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrimaryButtonTextColorHover() { - return primaryButtonTextColorHover; - } - - @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { - this.primaryButtonTextColorHover = primaryButtonTextColorHover; - } - - public SubWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { - this.secondaryButtonColor = secondaryButtonColor; - return this; - } - - /** - * Get secondaryButtonColor - * - * @return secondaryButtonColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonColor() { - return secondaryButtonColor; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { - this.secondaryButtonColor = secondaryButtonColor; - } - - public SubWhiteLabelingOptions secondaryButtonColorHover(String secondaryButtonColorHover) { - this.secondaryButtonColorHover = secondaryButtonColorHover; - return this; - } - - /** - * Get secondaryButtonColorHover - * - * @return secondaryButtonColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonColorHover() { - return secondaryButtonColorHover; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { - this.secondaryButtonColorHover = secondaryButtonColorHover; - } - - public SubWhiteLabelingOptions secondaryButtonTextColor(String secondaryButtonTextColor) { - this.secondaryButtonTextColor = secondaryButtonTextColor; - return this; - } - - /** - * Get secondaryButtonTextColor - * - * @return secondaryButtonTextColor - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonTextColor() { - return secondaryButtonTextColor; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { - this.secondaryButtonTextColor = secondaryButtonTextColor; - } - - public SubWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { - this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; - return this; - } - - /** - * Get secondaryButtonTextColorHover - * - * @return secondaryButtonTextColorHover - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSecondaryButtonTextColorHover() { - return secondaryButtonTextColorHover; - } - - @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { - this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; - } - - public SubWhiteLabelingOptions textColor1(String textColor1) { - this.textColor1 = textColor1; - return this; - } - - /** - * Get textColor1 - * - * @return textColor1 - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTextColor1() { - return textColor1; - } - - @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { - this.textColor1 = textColor1; - } - - public SubWhiteLabelingOptions textColor2(String textColor2) { - this.textColor2 = textColor2; - return this; - } - - /** - * Get textColor2 - * - * @return textColor2 - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTextColor2() { - return textColor2; - } - - @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { - this.textColor2 = textColor2; - } - - public SubWhiteLabelingOptions resetToDefault(Boolean resetToDefault) { - this.resetToDefault = resetToDefault; - return this; - } - - /** - * Resets white labeling options to defaults. Only useful when updating an API App. - * - * @return resetToDefault - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_RESET_TO_DEFAULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getResetToDefault() { - return resetToDefault; - } - - @JsonProperty(JSON_PROPERTY_RESET_TO_DEFAULT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResetToDefault(Boolean resetToDefault) { - this.resetToDefault = resetToDefault; - } - - /** Return true if this SubWhiteLabelingOptions object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SubWhiteLabelingOptions subWhiteLabelingOptions = (SubWhiteLabelingOptions) o; - return Objects.equals( - this.headerBackgroundColor, subWhiteLabelingOptions.headerBackgroundColor) - && Objects.equals(this.legalVersion, subWhiteLabelingOptions.legalVersion) - && Objects.equals(this.linkColor, subWhiteLabelingOptions.linkColor) - && Objects.equals( - this.pageBackgroundColor, subWhiteLabelingOptions.pageBackgroundColor) - && Objects.equals( - this.primaryButtonColor, subWhiteLabelingOptions.primaryButtonColor) - && Objects.equals( - this.primaryButtonColorHover, - subWhiteLabelingOptions.primaryButtonColorHover) - && Objects.equals( - this.primaryButtonTextColor, subWhiteLabelingOptions.primaryButtonTextColor) - && Objects.equals( - this.primaryButtonTextColorHover, - subWhiteLabelingOptions.primaryButtonTextColorHover) - && Objects.equals( - this.secondaryButtonColor, subWhiteLabelingOptions.secondaryButtonColor) - && Objects.equals( - this.secondaryButtonColorHover, - subWhiteLabelingOptions.secondaryButtonColorHover) - && Objects.equals( - this.secondaryButtonTextColor, - subWhiteLabelingOptions.secondaryButtonTextColor) - && Objects.equals( - this.secondaryButtonTextColorHover, - subWhiteLabelingOptions.secondaryButtonTextColorHover) - && Objects.equals(this.textColor1, subWhiteLabelingOptions.textColor1) - && Objects.equals(this.textColor2, subWhiteLabelingOptions.textColor2) - && Objects.equals(this.resetToDefault, subWhiteLabelingOptions.resetToDefault); - } - - @Override - public int hashCode() { - return Objects.hash( - headerBackgroundColor, - legalVersion, - linkColor, - pageBackgroundColor, - primaryButtonColor, - primaryButtonColorHover, - primaryButtonTextColor, - primaryButtonTextColorHover, - secondaryButtonColor, - secondaryButtonColorHover, - secondaryButtonTextColor, - secondaryButtonTextColorHover, - textColor1, - textColor2, - resetToDefault); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SubWhiteLabelingOptions {\n"); - sb.append(" headerBackgroundColor: ") - .append(toIndentedString(headerBackgroundColor)) - .append("\n"); - sb.append(" legalVersion: ").append(toIndentedString(legalVersion)).append("\n"); - sb.append(" linkColor: ").append(toIndentedString(linkColor)).append("\n"); - sb.append(" pageBackgroundColor: ") - .append(toIndentedString(pageBackgroundColor)) - .append("\n"); - sb.append(" primaryButtonColor: ") - .append(toIndentedString(primaryButtonColor)) - .append("\n"); - sb.append(" primaryButtonColorHover: ") - .append(toIndentedString(primaryButtonColorHover)) - .append("\n"); - sb.append(" primaryButtonTextColor: ") - .append(toIndentedString(primaryButtonTextColor)) - .append("\n"); - sb.append(" primaryButtonTextColorHover: ") - .append(toIndentedString(primaryButtonTextColorHover)) - .append("\n"); - sb.append(" secondaryButtonColor: ") - .append(toIndentedString(secondaryButtonColor)) - .append("\n"); - sb.append(" secondaryButtonColorHover: ") - .append(toIndentedString(secondaryButtonColorHover)) - .append("\n"); - sb.append(" secondaryButtonTextColor: ") - .append(toIndentedString(secondaryButtonTextColor)) - .append("\n"); - sb.append(" secondaryButtonTextColorHover: ") - .append(toIndentedString(secondaryButtonTextColorHover)) - .append("\n"); - sb.append(" textColor1: ").append(toIndentedString(textColor1)).append("\n"); - sb.append(" textColor2: ").append(toIndentedString(textColor2)).append("\n"); - sb.append(" resetToDefault: ").append(toIndentedString(resetToDefault)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (headerBackgroundColor != null) { - if (isFileTypeOrListOfFiles(headerBackgroundColor)) { - fileTypeFound = true; - } - - if (headerBackgroundColor.getClass().equals(java.io.File.class) - || headerBackgroundColor.getClass().equals(Integer.class) - || headerBackgroundColor.getClass().equals(String.class) - || headerBackgroundColor.getClass().isEnum()) { - map.put("header_background_color", headerBackgroundColor); - } else if (isListOfFile(headerBackgroundColor)) { - for (int i = 0; i < getListSize(headerBackgroundColor); i++) { - map.put( - "header_background_color[" + i + "]", - getFromList(headerBackgroundColor, i)); - } - } else { - map.put( - "header_background_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(headerBackgroundColor)); - } - } - if (legalVersion != null) { - if (isFileTypeOrListOfFiles(legalVersion)) { - fileTypeFound = true; - } - - if (legalVersion.getClass().equals(java.io.File.class) - || legalVersion.getClass().equals(Integer.class) - || legalVersion.getClass().equals(String.class) - || legalVersion.getClass().isEnum()) { - map.put("legal_version", legalVersion); - } else if (isListOfFile(legalVersion)) { - for (int i = 0; i < getListSize(legalVersion); i++) { - map.put("legal_version[" + i + "]", getFromList(legalVersion, i)); - } - } else { - map.put( - "legal_version", - JSON.getDefault().getMapper().writeValueAsString(legalVersion)); - } - } - if (linkColor != null) { - if (isFileTypeOrListOfFiles(linkColor)) { - fileTypeFound = true; - } - - if (linkColor.getClass().equals(java.io.File.class) - || linkColor.getClass().equals(Integer.class) - || linkColor.getClass().equals(String.class) - || linkColor.getClass().isEnum()) { - map.put("link_color", linkColor); - } else if (isListOfFile(linkColor)) { - for (int i = 0; i < getListSize(linkColor); i++) { - map.put("link_color[" + i + "]", getFromList(linkColor, i)); - } - } else { - map.put( - "link_color", - JSON.getDefault().getMapper().writeValueAsString(linkColor)); - } - } - if (pageBackgroundColor != null) { - if (isFileTypeOrListOfFiles(pageBackgroundColor)) { - fileTypeFound = true; - } - - if (pageBackgroundColor.getClass().equals(java.io.File.class) - || pageBackgroundColor.getClass().equals(Integer.class) - || pageBackgroundColor.getClass().equals(String.class) - || pageBackgroundColor.getClass().isEnum()) { - map.put("page_background_color", pageBackgroundColor); - } else if (isListOfFile(pageBackgroundColor)) { - for (int i = 0; i < getListSize(pageBackgroundColor); i++) { - map.put( - "page_background_color[" + i + "]", - getFromList(pageBackgroundColor, i)); - } - } else { - map.put( - "page_background_color", - JSON.getDefault().getMapper().writeValueAsString(pageBackgroundColor)); - } - } - if (primaryButtonColor != null) { - if (isFileTypeOrListOfFiles(primaryButtonColor)) { - fileTypeFound = true; - } - - if (primaryButtonColor.getClass().equals(java.io.File.class) - || primaryButtonColor.getClass().equals(Integer.class) - || primaryButtonColor.getClass().equals(String.class) - || primaryButtonColor.getClass().isEnum()) { - map.put("primary_button_color", primaryButtonColor); - } else if (isListOfFile(primaryButtonColor)) { - for (int i = 0; i < getListSize(primaryButtonColor); i++) { - map.put( - "primary_button_color[" + i + "]", - getFromList(primaryButtonColor, i)); - } - } else { - map.put( - "primary_button_color", - JSON.getDefault().getMapper().writeValueAsString(primaryButtonColor)); - } - } - if (primaryButtonColorHover != null) { - if (isFileTypeOrListOfFiles(primaryButtonColorHover)) { - fileTypeFound = true; - } - - if (primaryButtonColorHover.getClass().equals(java.io.File.class) - || primaryButtonColorHover.getClass().equals(Integer.class) - || primaryButtonColorHover.getClass().equals(String.class) - || primaryButtonColorHover.getClass().isEnum()) { - map.put("primary_button_color_hover", primaryButtonColorHover); - } else if (isListOfFile(primaryButtonColorHover)) { - for (int i = 0; i < getListSize(primaryButtonColorHover); i++) { - map.put( - "primary_button_color_hover[" + i + "]", - getFromList(primaryButtonColorHover, i)); - } - } else { - map.put( - "primary_button_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonColorHover)); - } - } - if (primaryButtonTextColor != null) { - if (isFileTypeOrListOfFiles(primaryButtonTextColor)) { - fileTypeFound = true; - } - - if (primaryButtonTextColor.getClass().equals(java.io.File.class) - || primaryButtonTextColor.getClass().equals(Integer.class) - || primaryButtonTextColor.getClass().equals(String.class) - || primaryButtonTextColor.getClass().isEnum()) { - map.put("primary_button_text_color", primaryButtonTextColor); - } else if (isListOfFile(primaryButtonTextColor)) { - for (int i = 0; i < getListSize(primaryButtonTextColor); i++) { - map.put( - "primary_button_text_color[" + i + "]", - getFromList(primaryButtonTextColor, i)); - } - } else { - map.put( - "primary_button_text_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonTextColor)); - } - } - if (primaryButtonTextColorHover != null) { - if (isFileTypeOrListOfFiles(primaryButtonTextColorHover)) { - fileTypeFound = true; - } - - if (primaryButtonTextColorHover.getClass().equals(java.io.File.class) - || primaryButtonTextColorHover.getClass().equals(Integer.class) - || primaryButtonTextColorHover.getClass().equals(String.class) - || primaryButtonTextColorHover.getClass().isEnum()) { - map.put("primary_button_text_color_hover", primaryButtonTextColorHover); - } else if (isListOfFile(primaryButtonTextColorHover)) { - for (int i = 0; i < getListSize(primaryButtonTextColorHover); i++) { - map.put( - "primary_button_text_color_hover[" + i + "]", - getFromList(primaryButtonTextColorHover, i)); - } - } else { - map.put( - "primary_button_text_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(primaryButtonTextColorHover)); - } - } - if (secondaryButtonColor != null) { - if (isFileTypeOrListOfFiles(secondaryButtonColor)) { - fileTypeFound = true; - } - - if (secondaryButtonColor.getClass().equals(java.io.File.class) - || secondaryButtonColor.getClass().equals(Integer.class) - || secondaryButtonColor.getClass().equals(String.class) - || secondaryButtonColor.getClass().isEnum()) { - map.put("secondary_button_color", secondaryButtonColor); - } else if (isListOfFile(secondaryButtonColor)) { - for (int i = 0; i < getListSize(secondaryButtonColor); i++) { - map.put( - "secondary_button_color[" + i + "]", - getFromList(secondaryButtonColor, i)); - } - } else { - map.put( - "secondary_button_color", - JSON.getDefault().getMapper().writeValueAsString(secondaryButtonColor)); - } - } - if (secondaryButtonColorHover != null) { - if (isFileTypeOrListOfFiles(secondaryButtonColorHover)) { - fileTypeFound = true; - } - - if (secondaryButtonColorHover.getClass().equals(java.io.File.class) - || secondaryButtonColorHover.getClass().equals(Integer.class) - || secondaryButtonColorHover.getClass().equals(String.class) - || secondaryButtonColorHover.getClass().isEnum()) { - map.put("secondary_button_color_hover", secondaryButtonColorHover); - } else if (isListOfFile(secondaryButtonColorHover)) { - for (int i = 0; i < getListSize(secondaryButtonColorHover); i++) { - map.put( - "secondary_button_color_hover[" + i + "]", - getFromList(secondaryButtonColorHover, i)); - } - } else { - map.put( - "secondary_button_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonColorHover)); - } - } - if (secondaryButtonTextColor != null) { - if (isFileTypeOrListOfFiles(secondaryButtonTextColor)) { - fileTypeFound = true; - } - - if (secondaryButtonTextColor.getClass().equals(java.io.File.class) - || secondaryButtonTextColor.getClass().equals(Integer.class) - || secondaryButtonTextColor.getClass().equals(String.class) - || secondaryButtonTextColor.getClass().isEnum()) { - map.put("secondary_button_text_color", secondaryButtonTextColor); - } else if (isListOfFile(secondaryButtonTextColor)) { - for (int i = 0; i < getListSize(secondaryButtonTextColor); i++) { - map.put( - "secondary_button_text_color[" + i + "]", - getFromList(secondaryButtonTextColor, i)); - } - } else { - map.put( - "secondary_button_text_color", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonTextColor)); - } - } - if (secondaryButtonTextColorHover != null) { - if (isFileTypeOrListOfFiles(secondaryButtonTextColorHover)) { - fileTypeFound = true; - } - - if (secondaryButtonTextColorHover.getClass().equals(java.io.File.class) - || secondaryButtonTextColorHover.getClass().equals(Integer.class) - || secondaryButtonTextColorHover.getClass().equals(String.class) - || secondaryButtonTextColorHover.getClass().isEnum()) { - map.put("secondary_button_text_color_hover", secondaryButtonTextColorHover); - } else if (isListOfFile(secondaryButtonTextColorHover)) { - for (int i = 0; i < getListSize(secondaryButtonTextColorHover); i++) { - map.put( - "secondary_button_text_color_hover[" + i + "]", - getFromList(secondaryButtonTextColorHover, i)); - } - } else { - map.put( - "secondary_button_text_color_hover", - JSON.getDefault() - .getMapper() - .writeValueAsString(secondaryButtonTextColorHover)); - } - } - if (textColor1 != null) { - if (isFileTypeOrListOfFiles(textColor1)) { - fileTypeFound = true; - } - - if (textColor1.getClass().equals(java.io.File.class) - || textColor1.getClass().equals(Integer.class) - || textColor1.getClass().equals(String.class) - || textColor1.getClass().isEnum()) { - map.put("text_color1", textColor1); - } else if (isListOfFile(textColor1)) { - for (int i = 0; i < getListSize(textColor1); i++) { - map.put("text_color1[" + i + "]", getFromList(textColor1, i)); - } - } else { - map.put( - "text_color1", - JSON.getDefault().getMapper().writeValueAsString(textColor1)); - } - } - if (textColor2 != null) { - if (isFileTypeOrListOfFiles(textColor2)) { - fileTypeFound = true; - } - - if (textColor2.getClass().equals(java.io.File.class) - || textColor2.getClass().equals(Integer.class) - || textColor2.getClass().equals(String.class) - || textColor2.getClass().isEnum()) { - map.put("text_color2", textColor2); - } else if (isListOfFile(textColor2)) { - for (int i = 0; i < getListSize(textColor2); i++) { - map.put("text_color2[" + i + "]", getFromList(textColor2, i)); - } - } else { - map.put( - "text_color2", - JSON.getDefault().getMapper().writeValueAsString(textColor2)); - } - } - if (resetToDefault != null) { - if (isFileTypeOrListOfFiles(resetToDefault)) { - fileTypeFound = true; - } - - if (resetToDefault.getClass().equals(java.io.File.class) - || resetToDefault.getClass().equals(Integer.class) - || resetToDefault.getClass().equals(String.class) - || resetToDefault.getClass().isEnum()) { - map.put("reset_to_default", resetToDefault); - } else if (isListOfFile(resetToDefault)) { - for (int i = 0; i < getListSize(resetToDefault); i++) { - map.put("reset_to_default[" + i + "]", getFromList(resetToDefault, i)); - } - } else { - map.put( - "reset_to_default", - JSON.getDefault().getMapper().writeValueAsString(resetToDefault)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java deleted file mode 100644 index 49beaf28e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamAddMemberRequest */ -@JsonPropertyOrder({ - TeamAddMemberRequest.JSON_PROPERTY_ACCOUNT_ID, - TeamAddMemberRequest.JSON_PROPERTY_EMAIL_ADDRESS, - TeamAddMemberRequest.JSON_PROPERTY_ROLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamAddMemberRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - /** - * A role member will take in a new Team. **NOTE:** This parameter is used only if - * `team_id` is provided. - */ - public enum RoleEnum { - MEMBER("Member"), - - DEVELOPER("Developer"), - - TEAM_MANAGER("Team Manager"), - - ADMIN("Admin"); - - private String value; - - RoleEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static RoleEnum fromValue(String value) { - for (RoleEnum b : RoleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ROLE = "role"; - private RoleEnum role; - - public TeamAddMemberRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamAddMemberRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamAddMemberRequest.class); - } - - public static TeamAddMemberRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamAddMemberRequest.class); - } - - public TeamAddMemberRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * `account_id` or `email_address` is required. If both are provided, the - * account id prevails. Account id of the user to invite to your Team. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TeamAddMemberRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * `account_id` or `email_address` is required, If both are provided, the - * account id prevails. Email address of the user to invite to your Team. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TeamAddMemberRequest role(RoleEnum role) { - this.role = role; - return this; - } - - /** - * A role member will take in a new Team. **NOTE:** This parameter is used only if - * `team_id` is provided. - * - * @return role - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RoleEnum getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(RoleEnum role) { - this.role = role; - } - - /** Return true if this TeamAddMemberRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamAddMemberRequest teamAddMemberRequest = (TeamAddMemberRequest) o; - return Objects.equals(this.accountId, teamAddMemberRequest.accountId) - && Objects.equals(this.emailAddress, teamAddMemberRequest.emailAddress) - && Objects.equals(this.role, teamAddMemberRequest.role); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress, role); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamAddMemberRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java deleted file mode 100644 index 6724eeaae..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamCreateRequest */ -@JsonPropertyOrder({TeamCreateRequest.JSON_PROPERTY_NAME}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamCreateRequest { - public static final String JSON_PROPERTY_NAME = "name"; - private String name = "Untitled Team"; - - public TeamCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamCreateRequest.class); - } - - public static TeamCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamCreateRequest.class); - } - - public TeamCreateRequest name(String name) { - this.name = name; - return this; - } - - /** - * The name of your Team. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this TeamCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamCreateRequest teamCreateRequest = (TeamCreateRequest) o; - return Objects.equals(this.name, teamCreateRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamCreateRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java deleted file mode 100644 index fbb889e11..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TeamGetInfoResponse */ -@JsonPropertyOrder({ - TeamGetInfoResponse.JSON_PROPERTY_TEAM, - TeamGetInfoResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamGetInfoResponse { - public static final String JSON_PROPERTY_TEAM = "team"; - private TeamInfoResponse team; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TeamGetInfoResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamGetInfoResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamGetInfoResponse.class); - } - - public static TeamGetInfoResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamGetInfoResponse.class); - } - - public TeamGetInfoResponse team(TeamInfoResponse team) { - this.team = team; - return this; - } - - /** - * Get team - * - * @return team - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TeamInfoResponse getTeam() { - return team; - } - - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamInfoResponse team) { - this.team = team; - } - - public TeamGetInfoResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TeamGetInfoResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TeamGetInfoResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamGetInfoResponse teamGetInfoResponse = (TeamGetInfoResponse) o; - return Objects.equals(this.team, teamGetInfoResponse.team) - && Objects.equals(this.warnings, teamGetInfoResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(team, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamGetInfoResponse {\n"); - sb.append(" team: ").append(toIndentedString(team)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (team != null) { - if (isFileTypeOrListOfFiles(team)) { - fileTypeFound = true; - } - - if (team.getClass().equals(java.io.File.class) - || team.getClass().equals(Integer.class) - || team.getClass().equals(String.class) - || team.getClass().isEnum()) { - map.put("team", team); - } else if (isListOfFile(team)) { - for (int i = 0; i < getListSize(team); i++) { - map.put("team[" + i + "]", getFromList(team, i)); - } - } else { - map.put("team", JSON.getDefault().getMapper().writeValueAsString(team)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java deleted file mode 100644 index c7be1f6ee..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TeamGetResponse */ -@JsonPropertyOrder({TeamGetResponse.JSON_PROPERTY_TEAM, TeamGetResponse.JSON_PROPERTY_WARNINGS}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamGetResponse { - public static final String JSON_PROPERTY_TEAM = "team"; - private TeamResponse team; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TeamGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamGetResponse.class); - } - - public static TeamGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamGetResponse.class); - } - - public TeamGetResponse team(TeamResponse team) { - this.team = team; - return this; - } - - /** - * Get team - * - * @return team - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TeamResponse getTeam() { - return team; - } - - @JsonProperty(JSON_PROPERTY_TEAM) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamResponse team) { - this.team = team; - } - - public TeamGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TeamGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TeamGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamGetResponse teamGetResponse = (TeamGetResponse) o; - return Objects.equals(this.team, teamGetResponse.team) - && Objects.equals(this.warnings, teamGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(team, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamGetResponse {\n"); - sb.append(" team: ").append(toIndentedString(team)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (team != null) { - if (isFileTypeOrListOfFiles(team)) { - fileTypeFound = true; - } - - if (team.getClass().equals(java.io.File.class) - || team.getClass().equals(Integer.class) - || team.getClass().equals(String.class) - || team.getClass().isEnum()) { - map.put("team", team); - } else if (isListOfFile(team)) { - for (int i = 0; i < getListSize(team); i++) { - map.put("team[" + i + "]", getFromList(team, i)); - } - } else { - map.put("team", JSON.getDefault().getMapper().writeValueAsString(team)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java deleted file mode 100644 index 7edabf525..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamInfoResponse */ -@JsonPropertyOrder({ - TeamInfoResponse.JSON_PROPERTY_TEAM_ID, - TeamInfoResponse.JSON_PROPERTY_TEAM_PARENT, - TeamInfoResponse.JSON_PROPERTY_NAME, - TeamInfoResponse.JSON_PROPERTY_NUM_MEMBERS, - TeamInfoResponse.JSON_PROPERTY_NUM_SUB_TEAMS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamInfoResponse { - public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; - - public static final String JSON_PROPERTY_TEAM_PARENT = "team_parent"; - private TeamParentResponse teamParent; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_NUM_MEMBERS = "num_members"; - private Integer numMembers; - - public static final String JSON_PROPERTY_NUM_SUB_TEAMS = "num_sub_teams"; - private Integer numSubTeams; - - public TeamInfoResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamInfoResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamInfoResponse.class); - } - - public static TeamInfoResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamInfoResponse.class); - } - - public TeamInfoResponse teamId(String teamId) { - this.teamId = teamId; - return this; - } - - /** - * The id of a team - * - * @return teamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeamId() { - return teamId; - } - - @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - public TeamInfoResponse teamParent(TeamParentResponse teamParent) { - this.teamParent = teamParent; - return this; - } - - /** - * Get teamParent - * - * @return teamParent - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_PARENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TeamParentResponse getTeamParent() { - return teamParent; - } - - @JsonProperty(JSON_PROPERTY_TEAM_PARENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamParent(TeamParentResponse teamParent) { - this.teamParent = teamParent; - } - - public TeamInfoResponse name(String name) { - this.name = name; - return this; - } - - /** - * The name of a team - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TeamInfoResponse numMembers(Integer numMembers) { - this.numMembers = numMembers; - return this; - } - - /** - * Number of members within a team - * - * @return numMembers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_MEMBERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumMembers() { - return numMembers; - } - - @JsonProperty(JSON_PROPERTY_NUM_MEMBERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumMembers(Integer numMembers) { - this.numMembers = numMembers; - } - - public TeamInfoResponse numSubTeams(Integer numSubTeams) { - this.numSubTeams = numSubTeams; - return this; - } - - /** - * Number of sub teams within a team - * - * @return numSubTeams - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_SUB_TEAMS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumSubTeams() { - return numSubTeams; - } - - @JsonProperty(JSON_PROPERTY_NUM_SUB_TEAMS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumSubTeams(Integer numSubTeams) { - this.numSubTeams = numSubTeams; - } - - /** Return true if this TeamInfoResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamInfoResponse teamInfoResponse = (TeamInfoResponse) o; - return Objects.equals(this.teamId, teamInfoResponse.teamId) - && Objects.equals(this.teamParent, teamInfoResponse.teamParent) - && Objects.equals(this.name, teamInfoResponse.name) - && Objects.equals(this.numMembers, teamInfoResponse.numMembers) - && Objects.equals(this.numSubTeams, teamInfoResponse.numSubTeams); - } - - @Override - public int hashCode() { - return Objects.hash(teamId, teamParent, name, numMembers, numSubTeams); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamInfoResponse {\n"); - sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); - sb.append(" teamParent: ").append(toIndentedString(teamParent)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" numMembers: ").append(toIndentedString(numMembers)).append("\n"); - sb.append(" numSubTeams: ").append(toIndentedString(numSubTeams)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (teamId != null) { - if (isFileTypeOrListOfFiles(teamId)) { - fileTypeFound = true; - } - - if (teamId.getClass().equals(java.io.File.class) - || teamId.getClass().equals(Integer.class) - || teamId.getClass().equals(String.class) - || teamId.getClass().isEnum()) { - map.put("team_id", teamId); - } else if (isListOfFile(teamId)) { - for (int i = 0; i < getListSize(teamId); i++) { - map.put("team_id[" + i + "]", getFromList(teamId, i)); - } - } else { - map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); - } - } - if (teamParent != null) { - if (isFileTypeOrListOfFiles(teamParent)) { - fileTypeFound = true; - } - - if (teamParent.getClass().equals(java.io.File.class) - || teamParent.getClass().equals(Integer.class) - || teamParent.getClass().equals(String.class) - || teamParent.getClass().isEnum()) { - map.put("team_parent", teamParent); - } else if (isListOfFile(teamParent)) { - for (int i = 0; i < getListSize(teamParent); i++) { - map.put("team_parent[" + i + "]", getFromList(teamParent, i)); - } - } else { - map.put( - "team_parent", - JSON.getDefault().getMapper().writeValueAsString(teamParent)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (numMembers != null) { - if (isFileTypeOrListOfFiles(numMembers)) { - fileTypeFound = true; - } - - if (numMembers.getClass().equals(java.io.File.class) - || numMembers.getClass().equals(Integer.class) - || numMembers.getClass().equals(String.class) - || numMembers.getClass().isEnum()) { - map.put("num_members", numMembers); - } else if (isListOfFile(numMembers)) { - for (int i = 0; i < getListSize(numMembers); i++) { - map.put("num_members[" + i + "]", getFromList(numMembers, i)); - } - } else { - map.put( - "num_members", - JSON.getDefault().getMapper().writeValueAsString(numMembers)); - } - } - if (numSubTeams != null) { - if (isFileTypeOrListOfFiles(numSubTeams)) { - fileTypeFound = true; - } - - if (numSubTeams.getClass().equals(java.io.File.class) - || numSubTeams.getClass().equals(Integer.class) - || numSubTeams.getClass().equals(String.class) - || numSubTeams.getClass().isEnum()) { - map.put("num_sub_teams", numSubTeams); - } else if (isListOfFile(numSubTeams)) { - for (int i = 0; i < getListSize(numSubTeams); i++) { - map.put("num_sub_teams[" + i + "]", getFromList(numSubTeams, i)); - } - } else { - map.put( - "num_sub_teams", - JSON.getDefault().getMapper().writeValueAsString(numSubTeams)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java deleted file mode 100644 index 2d49161bf..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamInviteResponse */ -@JsonPropertyOrder({ - TeamInviteResponse.JSON_PROPERTY_EMAIL_ADDRESS, - TeamInviteResponse.JSON_PROPERTY_TEAM_ID, - TeamInviteResponse.JSON_PROPERTY_ROLE, - TeamInviteResponse.JSON_PROPERTY_SENT_AT, - TeamInviteResponse.JSON_PROPERTY_REDEEMED_AT, - TeamInviteResponse.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamInviteResponse { - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; - - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; - - public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; - - public static final String JSON_PROPERTY_REDEEMED_AT = "redeemed_at"; - private Integer redeemedAt; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public TeamInviteResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamInviteResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamInviteResponse.class); - } - - public static TeamInviteResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamInviteResponse.class); - } - - public TeamInviteResponse emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Email address of the user invited to this team. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TeamInviteResponse teamId(String teamId) { - this.teamId = teamId; - return this; - } - - /** - * Id of the team. - * - * @return teamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeamId() { - return teamId; - } - - @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - public TeamInviteResponse role(String role) { - this.role = role; - return this; - } - - /** - * Role of the user invited to this team. - * - * @return role - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { - this.role = role; - } - - public TeamInviteResponse sentAt(Integer sentAt) { - this.sentAt = sentAt; - return this; - } - - /** - * Timestamp when the invitation was sent. - * - * @return sentAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SENT_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSentAt() { - return sentAt; - } - - @JsonProperty(JSON_PROPERTY_SENT_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { - this.sentAt = sentAt; - } - - public TeamInviteResponse redeemedAt(Integer redeemedAt) { - this.redeemedAt = redeemedAt; - return this; - } - - /** - * Timestamp when the invitation was redeemed. - * - * @return redeemedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REDEEMED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getRedeemedAt() { - return redeemedAt; - } - - @JsonProperty(JSON_PROPERTY_REDEEMED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRedeemedAt(Integer redeemedAt) { - this.redeemedAt = redeemedAt; - } - - public TeamInviteResponse expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * Timestamp when the invitation is expiring. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this TeamInviteResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamInviteResponse teamInviteResponse = (TeamInviteResponse) o; - return Objects.equals(this.emailAddress, teamInviteResponse.emailAddress) - && Objects.equals(this.teamId, teamInviteResponse.teamId) - && Objects.equals(this.role, teamInviteResponse.role) - && Objects.equals(this.sentAt, teamInviteResponse.sentAt) - && Objects.equals(this.redeemedAt, teamInviteResponse.redeemedAt) - && Objects.equals(this.expiresAt, teamInviteResponse.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash(emailAddress, teamId, role, sentAt, redeemedAt, expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamInviteResponse {\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append(" sentAt: ").append(toIndentedString(sentAt)).append("\n"); - sb.append(" redeemedAt: ").append(toIndentedString(redeemedAt)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (teamId != null) { - if (isFileTypeOrListOfFiles(teamId)) { - fileTypeFound = true; - } - - if (teamId.getClass().equals(java.io.File.class) - || teamId.getClass().equals(Integer.class) - || teamId.getClass().equals(String.class) - || teamId.getClass().isEnum()) { - map.put("team_id", teamId); - } else if (isListOfFile(teamId)) { - for (int i = 0; i < getListSize(teamId); i++) { - map.put("team_id[" + i + "]", getFromList(teamId, i)); - } - } else { - map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); - } - } - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - if (sentAt != null) { - if (isFileTypeOrListOfFiles(sentAt)) { - fileTypeFound = true; - } - - if (sentAt.getClass().equals(java.io.File.class) - || sentAt.getClass().equals(Integer.class) - || sentAt.getClass().equals(String.class) - || sentAt.getClass().isEnum()) { - map.put("sent_at", sentAt); - } else if (isListOfFile(sentAt)) { - for (int i = 0; i < getListSize(sentAt); i++) { - map.put("sent_at[" + i + "]", getFromList(sentAt, i)); - } - } else { - map.put("sent_at", JSON.getDefault().getMapper().writeValueAsString(sentAt)); - } - } - if (redeemedAt != null) { - if (isFileTypeOrListOfFiles(redeemedAt)) { - fileTypeFound = true; - } - - if (redeemedAt.getClass().equals(java.io.File.class) - || redeemedAt.getClass().equals(Integer.class) - || redeemedAt.getClass().equals(String.class) - || redeemedAt.getClass().isEnum()) { - map.put("redeemed_at", redeemedAt); - } else if (isListOfFile(redeemedAt)) { - for (int i = 0; i < getListSize(redeemedAt); i++) { - map.put("redeemed_at[" + i + "]", getFromList(redeemedAt, i)); - } - } else { - map.put( - "redeemed_at", - JSON.getDefault().getMapper().writeValueAsString(redeemedAt)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java deleted file mode 100644 index 0e13d74c2..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TeamInvitesResponse */ -@JsonPropertyOrder({ - TeamInvitesResponse.JSON_PROPERTY_TEAM_INVITES, - TeamInvitesResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamInvitesResponse { - public static final String JSON_PROPERTY_TEAM_INVITES = "team_invites"; - private List teamInvites = new ArrayList<>(); - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TeamInvitesResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamInvitesResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamInvitesResponse.class); - } - - public static TeamInvitesResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamInvitesResponse.class); - } - - public TeamInvitesResponse teamInvites(List teamInvites) { - this.teamInvites = teamInvites; - return this; - } - - public TeamInvitesResponse addTeamInvitesItem(TeamInviteResponse teamInvitesItem) { - if (this.teamInvites == null) { - this.teamInvites = new ArrayList<>(); - } - this.teamInvites.add(teamInvitesItem); - return this; - } - - /** - * Contains a list of team invites and their roles. - * - * @return teamInvites - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEAM_INVITES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTeamInvites() { - return teamInvites; - } - - @JsonProperty(JSON_PROPERTY_TEAM_INVITES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamInvites(List teamInvites) { - this.teamInvites = teamInvites; - } - - public TeamInvitesResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TeamInvitesResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TeamInvitesResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamInvitesResponse teamInvitesResponse = (TeamInvitesResponse) o; - return Objects.equals(this.teamInvites, teamInvitesResponse.teamInvites) - && Objects.equals(this.warnings, teamInvitesResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(teamInvites, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamInvitesResponse {\n"); - sb.append(" teamInvites: ").append(toIndentedString(teamInvites)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (teamInvites != null) { - if (isFileTypeOrListOfFiles(teamInvites)) { - fileTypeFound = true; - } - - if (teamInvites.getClass().equals(java.io.File.class) - || teamInvites.getClass().equals(Integer.class) - || teamInvites.getClass().equals(String.class) - || teamInvites.getClass().isEnum()) { - map.put("team_invites", teamInvites); - } else if (isListOfFile(teamInvites)) { - for (int i = 0; i < getListSize(teamInvites); i++) { - map.put("team_invites[" + i + "]", getFromList(teamInvites, i)); - } - } else { - map.put( - "team_invites", - JSON.getDefault().getMapper().writeValueAsString(teamInvites)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java deleted file mode 100644 index 1f86e2a5b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamMemberResponse */ -@JsonPropertyOrder({ - TeamMemberResponse.JSON_PROPERTY_ACCOUNT_ID, - TeamMemberResponse.JSON_PROPERTY_EMAIL_ADDRESS, - TeamMemberResponse.JSON_PROPERTY_ROLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamMemberResponse { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; - - public TeamMemberResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamMemberResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamMemberResponse.class); - } - - public static TeamMemberResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamMemberResponse.class); - } - - public TeamMemberResponse accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * Account id of the team member. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TeamMemberResponse emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * Email address of the team member. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TeamMemberResponse role(String role) { - this.role = role; - return this; - } - - /** - * The specific role a member has on the team. - * - * @return role - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRole() { - return role; - } - - @JsonProperty(JSON_PROPERTY_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { - this.role = role; - } - - /** Return true if this TeamMemberResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamMemberResponse teamMemberResponse = (TeamMemberResponse) o; - return Objects.equals(this.accountId, teamMemberResponse.accountId) - && Objects.equals(this.emailAddress, teamMemberResponse.emailAddress) - && Objects.equals(this.role, teamMemberResponse.role); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress, role); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamMemberResponse {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (role != null) { - if (isFileTypeOrListOfFiles(role)) { - fileTypeFound = true; - } - - if (role.getClass().equals(java.io.File.class) - || role.getClass().equals(Integer.class) - || role.getClass().equals(String.class) - || role.getClass().isEnum()) { - map.put("role", role); - } else if (isListOfFile(role)) { - for (int i = 0; i < getListSize(role); i++) { - map.put("role[" + i + "]", getFromList(role, i)); - } - } else { - map.put("role", JSON.getDefault().getMapper().writeValueAsString(role)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java deleted file mode 100644 index 203819cbf..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TeamMembersResponse */ -@JsonPropertyOrder({ - TeamMembersResponse.JSON_PROPERTY_TEAM_MEMBERS, - TeamMembersResponse.JSON_PROPERTY_LIST_INFO, - TeamMembersResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamMembersResponse { - public static final String JSON_PROPERTY_TEAM_MEMBERS = "team_members"; - private List teamMembers = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TeamMembersResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamMembersResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamMembersResponse.class); - } - - public static TeamMembersResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamMembersResponse.class); - } - - public TeamMembersResponse teamMembers(List teamMembers) { - this.teamMembers = teamMembers; - return this; - } - - public TeamMembersResponse addTeamMembersItem(TeamMemberResponse teamMembersItem) { - if (this.teamMembers == null) { - this.teamMembers = new ArrayList<>(); - } - this.teamMembers.add(teamMembersItem); - return this; - } - - /** - * Contains a list of team members and their roles for a specific team. - * - * @return teamMembers - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEAM_MEMBERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTeamMembers() { - return teamMembers; - } - - @JsonProperty(JSON_PROPERTY_TEAM_MEMBERS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamMembers(List teamMembers) { - this.teamMembers = teamMembers; - } - - public TeamMembersResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public TeamMembersResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TeamMembersResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TeamMembersResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamMembersResponse teamMembersResponse = (TeamMembersResponse) o; - return Objects.equals(this.teamMembers, teamMembersResponse.teamMembers) - && Objects.equals(this.listInfo, teamMembersResponse.listInfo) - && Objects.equals(this.warnings, teamMembersResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(teamMembers, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamMembersResponse {\n"); - sb.append(" teamMembers: ").append(toIndentedString(teamMembers)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (teamMembers != null) { - if (isFileTypeOrListOfFiles(teamMembers)) { - fileTypeFound = true; - } - - if (teamMembers.getClass().equals(java.io.File.class) - || teamMembers.getClass().equals(Integer.class) - || teamMembers.getClass().equals(String.class) - || teamMembers.getClass().isEnum()) { - map.put("team_members", teamMembers); - } else if (isListOfFile(teamMembers)) { - for (int i = 0; i < getListSize(teamMembers); i++) { - map.put("team_members[" + i + "]", getFromList(teamMembers, i)); - } - } else { - map.put( - "team_members", - JSON.getDefault().getMapper().writeValueAsString(teamMembers)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java deleted file mode 100644 index cb5041a62..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Information about the parent team if a team has one, set to `null` otherwise. */ -@JsonPropertyOrder({ - TeamParentResponse.JSON_PROPERTY_TEAM_ID, - TeamParentResponse.JSON_PROPERTY_NAME -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamParentResponse { - public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public TeamParentResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamParentResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamParentResponse.class); - } - - public static TeamParentResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamParentResponse.class); - } - - public TeamParentResponse teamId(String teamId) { - this.teamId = teamId; - return this; - } - - /** - * The id of a team - * - * @return teamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTeamId() { - return teamId; - } - - @JsonProperty(JSON_PROPERTY_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - public TeamParentResponse name(String name) { - this.name = name; - return this; - } - - /** - * The name of a team - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this TeamParentResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamParentResponse teamParentResponse = (TeamParentResponse) o; - return Objects.equals(this.teamId, teamParentResponse.teamId) - && Objects.equals(this.name, teamParentResponse.name); - } - - @Override - public int hashCode() { - return Objects.hash(teamId, name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamParentResponse {\n"); - sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (teamId != null) { - if (isFileTypeOrListOfFiles(teamId)) { - fileTypeFound = true; - } - - if (teamId.getClass().equals(java.io.File.class) - || teamId.getClass().equals(Integer.class) - || teamId.getClass().equals(String.class) - || teamId.getClass().isEnum()) { - map.put("team_id", teamId); - } else if (isListOfFile(teamId)) { - for (int i = 0; i < getListSize(teamId); i++) { - map.put("team_id[" + i + "]", getFromList(teamId, i)); - } - } else { - map.put("team_id", JSON.getDefault().getMapper().writeValueAsString(teamId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java deleted file mode 100644 index 1dd8dc7d3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamRemoveMemberRequest */ -@JsonPropertyOrder({ - TeamRemoveMemberRequest.JSON_PROPERTY_ACCOUNT_ID, - TeamRemoveMemberRequest.JSON_PROPERTY_EMAIL_ADDRESS, - TeamRemoveMemberRequest.JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS, - TeamRemoveMemberRequest.JSON_PROPERTY_NEW_TEAM_ID, - TeamRemoveMemberRequest.JSON_PROPERTY_NEW_ROLE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamRemoveMemberRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS = "new_owner_email_address"; - private String newOwnerEmailAddress; - - public static final String JSON_PROPERTY_NEW_TEAM_ID = "new_team_id"; - private String newTeamId; - - /** - * A new role member will take in a new Team. **NOTE:** This parameter is used only if - * `new_team_id` is provided. - */ - public enum NewRoleEnum { - MEMBER("Member"), - - DEVELOPER("Developer"), - - TEAM_MANAGER("Team Manager"), - - ADMIN("Admin"); - - private String value; - - NewRoleEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static NewRoleEnum fromValue(String value) { - for (NewRoleEnum b : NewRoleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_NEW_ROLE = "new_role"; - private NewRoleEnum newRole; - - public TeamRemoveMemberRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamRemoveMemberRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamRemoveMemberRequest.class); - } - - public static TeamRemoveMemberRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TeamRemoveMemberRequest.class); - } - - public TeamRemoveMemberRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * **account_id** or **email_address** is required. If both are provided, the account id - * prevails. Account id to remove from your Team. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TeamRemoveMemberRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * **account_id** or **email_address** is required. If both are provided, the account id - * prevails. Email address of the Account to remove from your Team. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TeamRemoveMemberRequest newOwnerEmailAddress(String newOwnerEmailAddress) { - this.newOwnerEmailAddress = newOwnerEmailAddress; - return this; - } - - /** - * The email address of an Account on this Team to receive all documents, templates, and API - * apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, - * this data will remain with the removed Account. **NOTE:** Only available for Enterprise - * plans. - * - * @return newOwnerEmailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNewOwnerEmailAddress() { - return newOwnerEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewOwnerEmailAddress(String newOwnerEmailAddress) { - this.newOwnerEmailAddress = newOwnerEmailAddress; - } - - public TeamRemoveMemberRequest newTeamId(String newTeamId) { - this.newTeamId = newTeamId; - return this; - } - - /** - * Id of the new Team. - * - * @return newTeamId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NEW_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNewTeamId() { - return newTeamId; - } - - @JsonProperty(JSON_PROPERTY_NEW_TEAM_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewTeamId(String newTeamId) { - this.newTeamId = newTeamId; - } - - public TeamRemoveMemberRequest newRole(NewRoleEnum newRole) { - this.newRole = newRole; - return this; - } - - /** - * A new role member will take in a new Team. **NOTE:** This parameter is used only if - * `new_team_id` is provided. - * - * @return newRole - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NEW_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public NewRoleEnum getNewRole() { - return newRole; - } - - @JsonProperty(JSON_PROPERTY_NEW_ROLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewRole(NewRoleEnum newRole) { - this.newRole = newRole; - } - - /** Return true if this TeamRemoveMemberRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamRemoveMemberRequest teamRemoveMemberRequest = (TeamRemoveMemberRequest) o; - return Objects.equals(this.accountId, teamRemoveMemberRequest.accountId) - && Objects.equals(this.emailAddress, teamRemoveMemberRequest.emailAddress) - && Objects.equals( - this.newOwnerEmailAddress, teamRemoveMemberRequest.newOwnerEmailAddress) - && Objects.equals(this.newTeamId, teamRemoveMemberRequest.newTeamId) - && Objects.equals(this.newRole, teamRemoveMemberRequest.newRole); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress, newOwnerEmailAddress, newTeamId, newRole); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamRemoveMemberRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" newOwnerEmailAddress: ") - .append(toIndentedString(newOwnerEmailAddress)) - .append("\n"); - sb.append(" newTeamId: ").append(toIndentedString(newTeamId)).append("\n"); - sb.append(" newRole: ").append(toIndentedString(newRole)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (newOwnerEmailAddress != null) { - if (isFileTypeOrListOfFiles(newOwnerEmailAddress)) { - fileTypeFound = true; - } - - if (newOwnerEmailAddress.getClass().equals(java.io.File.class) - || newOwnerEmailAddress.getClass().equals(Integer.class) - || newOwnerEmailAddress.getClass().equals(String.class) - || newOwnerEmailAddress.getClass().isEnum()) { - map.put("new_owner_email_address", newOwnerEmailAddress); - } else if (isListOfFile(newOwnerEmailAddress)) { - for (int i = 0; i < getListSize(newOwnerEmailAddress); i++) { - map.put( - "new_owner_email_address[" + i + "]", - getFromList(newOwnerEmailAddress, i)); - } - } else { - map.put( - "new_owner_email_address", - JSON.getDefault().getMapper().writeValueAsString(newOwnerEmailAddress)); - } - } - if (newTeamId != null) { - if (isFileTypeOrListOfFiles(newTeamId)) { - fileTypeFound = true; - } - - if (newTeamId.getClass().equals(java.io.File.class) - || newTeamId.getClass().equals(Integer.class) - || newTeamId.getClass().equals(String.class) - || newTeamId.getClass().isEnum()) { - map.put("new_team_id", newTeamId); - } else if (isListOfFile(newTeamId)) { - for (int i = 0; i < getListSize(newTeamId); i++) { - map.put("new_team_id[" + i + "]", getFromList(newTeamId, i)); - } - } else { - map.put( - "new_team_id", - JSON.getDefault().getMapper().writeValueAsString(newTeamId)); - } - } - if (newRole != null) { - if (isFileTypeOrListOfFiles(newRole)) { - fileTypeFound = true; - } - - if (newRole.getClass().equals(java.io.File.class) - || newRole.getClass().equals(Integer.class) - || newRole.getClass().equals(String.class) - || newRole.getClass().isEnum()) { - map.put("new_role", newRole); - } else if (isListOfFile(newRole)) { - for (int i = 0; i < getListSize(newRole); i++) { - map.put("new_role[" + i + "]", getFromList(newRole, i)); - } - } else { - map.put("new_role", JSON.getDefault().getMapper().writeValueAsString(newRole)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java deleted file mode 100644 index 2abc906c6..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains information about your team and its members */ -@JsonPropertyOrder({ - TeamResponse.JSON_PROPERTY_NAME, - TeamResponse.JSON_PROPERTY_ACCOUNTS, - TeamResponse.JSON_PROPERTY_INVITED_ACCOUNTS, - TeamResponse.JSON_PROPERTY_INVITED_EMAILS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamResponse { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; - - public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; - private List invitedAccounts = null; - - public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; - private List invitedEmails = null; - - public TeamResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamResponse.class); - } - - public static TeamResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamResponse.class); - } - - public TeamResponse name(String name) { - this.name = name; - return this; - } - - /** - * The name of your Team - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TeamResponse accounts(List accounts) { - this.accounts = accounts; - return this; - } - - public TeamResponse addAccountsItem(AccountResponse accountsItem) { - if (this.accounts == null) { - this.accounts = new ArrayList<>(); - } - this.accounts.add(accountsItem); - return this; - } - - /** - * Get accounts - * - * @return accounts - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAccounts() { - return accounts; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { - this.accounts = accounts; - } - - public TeamResponse invitedAccounts(List invitedAccounts) { - this.invitedAccounts = invitedAccounts; - return this; - } - - public TeamResponse addInvitedAccountsItem(AccountResponse invitedAccountsItem) { - if (this.invitedAccounts == null) { - this.invitedAccounts = new ArrayList<>(); - } - this.invitedAccounts.add(invitedAccountsItem); - return this; - } - - /** - * A list of all Accounts that have an outstanding invitation to join your Team. Note that this - * response is a subset of the response parameters found in `GET /account`. - * - * @return invitedAccounts - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInvitedAccounts() { - return invitedAccounts; - } - - @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedAccounts(List invitedAccounts) { - this.invitedAccounts = invitedAccounts; - } - - public TeamResponse invitedEmails(List invitedEmails) { - this.invitedEmails = invitedEmails; - return this; - } - - public TeamResponse addInvitedEmailsItem(String invitedEmailsItem) { - if (this.invitedEmails == null) { - this.invitedEmails = new ArrayList<>(); - } - this.invitedEmails.add(invitedEmailsItem); - return this; - } - - /** - * A list of email addresses that have an outstanding invitation to join your Team and do not - * yet have a Dropbox Sign account. - * - * @return invitedEmails - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInvitedEmails() { - return invitedEmails; - } - - @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedEmails(List invitedEmails) { - this.invitedEmails = invitedEmails; - } - - /** Return true if this TeamResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamResponse teamResponse = (TeamResponse) o; - return Objects.equals(this.name, teamResponse.name) - && Objects.equals(this.accounts, teamResponse.accounts) - && Objects.equals(this.invitedAccounts, teamResponse.invitedAccounts) - && Objects.equals(this.invitedEmails, teamResponse.invitedEmails); - } - - @Override - public int hashCode() { - return Objects.hash(name, accounts, invitedAccounts, invitedEmails); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamResponse {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); - sb.append(" invitedAccounts: ").append(toIndentedString(invitedAccounts)).append("\n"); - sb.append(" invitedEmails: ").append(toIndentedString(invitedEmails)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (accounts != null) { - if (isFileTypeOrListOfFiles(accounts)) { - fileTypeFound = true; - } - - if (accounts.getClass().equals(java.io.File.class) - || accounts.getClass().equals(Integer.class) - || accounts.getClass().equals(String.class) - || accounts.getClass().isEnum()) { - map.put("accounts", accounts); - } else if (isListOfFile(accounts)) { - for (int i = 0; i < getListSize(accounts); i++) { - map.put("accounts[" + i + "]", getFromList(accounts, i)); - } - } else { - map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); - } - } - if (invitedAccounts != null) { - if (isFileTypeOrListOfFiles(invitedAccounts)) { - fileTypeFound = true; - } - - if (invitedAccounts.getClass().equals(java.io.File.class) - || invitedAccounts.getClass().equals(Integer.class) - || invitedAccounts.getClass().equals(String.class) - || invitedAccounts.getClass().isEnum()) { - map.put("invited_accounts", invitedAccounts); - } else if (isListOfFile(invitedAccounts)) { - for (int i = 0; i < getListSize(invitedAccounts); i++) { - map.put("invited_accounts[" + i + "]", getFromList(invitedAccounts, i)); - } - } else { - map.put( - "invited_accounts", - JSON.getDefault().getMapper().writeValueAsString(invitedAccounts)); - } - } - if (invitedEmails != null) { - if (isFileTypeOrListOfFiles(invitedEmails)) { - fileTypeFound = true; - } - - if (invitedEmails.getClass().equals(java.io.File.class) - || invitedEmails.getClass().equals(Integer.class) - || invitedEmails.getClass().equals(String.class) - || invitedEmails.getClass().isEnum()) { - map.put("invited_emails", invitedEmails); - } else if (isListOfFile(invitedEmails)) { - for (int i = 0; i < getListSize(invitedEmails); i++) { - map.put("invited_emails[" + i + "]", getFromList(invitedEmails, i)); - } - } else { - map.put( - "invited_emails", - JSON.getDefault().getMapper().writeValueAsString(invitedEmails)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java deleted file mode 100644 index 5ccab5b01..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TeamSubTeamsResponse */ -@JsonPropertyOrder({ - TeamSubTeamsResponse.JSON_PROPERTY_SUB_TEAMS, - TeamSubTeamsResponse.JSON_PROPERTY_LIST_INFO, - TeamSubTeamsResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamSubTeamsResponse { - public static final String JSON_PROPERTY_SUB_TEAMS = "sub_teams"; - private List subTeams = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TeamSubTeamsResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamSubTeamsResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamSubTeamsResponse.class); - } - - public static TeamSubTeamsResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamSubTeamsResponse.class); - } - - public TeamSubTeamsResponse subTeams(List subTeams) { - this.subTeams = subTeams; - return this; - } - - public TeamSubTeamsResponse addSubTeamsItem(SubTeamResponse subTeamsItem) { - if (this.subTeams == null) { - this.subTeams = new ArrayList<>(); - } - this.subTeams.add(subTeamsItem); - return this; - } - - /** - * Contains a list with sub teams. - * - * @return subTeams - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SUB_TEAMS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSubTeams() { - return subTeams; - } - - @JsonProperty(JSON_PROPERTY_SUB_TEAMS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSubTeams(List subTeams) { - this.subTeams = subTeams; - } - - public TeamSubTeamsResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public TeamSubTeamsResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TeamSubTeamsResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * Get warnings - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TeamSubTeamsResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamSubTeamsResponse teamSubTeamsResponse = (TeamSubTeamsResponse) o; - return Objects.equals(this.subTeams, teamSubTeamsResponse.subTeams) - && Objects.equals(this.listInfo, teamSubTeamsResponse.listInfo) - && Objects.equals(this.warnings, teamSubTeamsResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(subTeams, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamSubTeamsResponse {\n"); - sb.append(" subTeams: ").append(toIndentedString(subTeams)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (subTeams != null) { - if (isFileTypeOrListOfFiles(subTeams)) { - fileTypeFound = true; - } - - if (subTeams.getClass().equals(java.io.File.class) - || subTeams.getClass().equals(Integer.class) - || subTeams.getClass().equals(String.class) - || subTeams.getClass().isEnum()) { - map.put("sub_teams", subTeams); - } else if (isListOfFile(subTeams)) { - for (int i = 0; i < getListSize(subTeams); i++) { - map.put("sub_teams[" + i + "]", getFromList(subTeams, i)); - } - } else { - map.put( - "sub_teams", - JSON.getDefault().getMapper().writeValueAsString(subTeams)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java deleted file mode 100644 index c6a8f944a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TeamUpdateRequest */ -@JsonPropertyOrder({TeamUpdateRequest.JSON_PROPERTY_NAME}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TeamUpdateRequest { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public TeamUpdateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TeamUpdateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TeamUpdateRequest.class); - } - - public static TeamUpdateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TeamUpdateRequest.class); - } - - public TeamUpdateRequest name(String name) { - this.name = name; - return this; - } - - /** - * The name of your Team. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this TeamUpdateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamUpdateRequest teamUpdateRequest = (TeamUpdateRequest) o; - return Objects.equals(this.name, teamUpdateRequest.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamUpdateRequest {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java deleted file mode 100644 index c52f0700f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateAddUserRequest */ -@JsonPropertyOrder({ - TemplateAddUserRequest.JSON_PROPERTY_ACCOUNT_ID, - TemplateAddUserRequest.JSON_PROPERTY_EMAIL_ADDRESS, - TemplateAddUserRequest.JSON_PROPERTY_SKIP_NOTIFICATION -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateAddUserRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_SKIP_NOTIFICATION = "skip_notification"; - private Boolean skipNotification = false; - - public TemplateAddUserRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateAddUserRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateAddUserRequest.class); - } - - public static TemplateAddUserRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TemplateAddUserRequest.class); - } - - public TemplateAddUserRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The id of the Account to give access to the Template. **NOTE:** The account id prevails if - * email address is also provided. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TemplateAddUserRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address of the Account to give access to the Template. **NOTE:** The account id - * prevails if it is also provided. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TemplateAddUserRequest skipNotification(Boolean skipNotification) { - this.skipNotification = skipNotification; - return this; - } - - /** - * If set to `true`, the user does not receive an email notification when a template - * has been shared with them. Defaults to `false`. - * - * @return skipNotification - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SKIP_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSkipNotification() { - return skipNotification; - } - - @JsonProperty(JSON_PROPERTY_SKIP_NOTIFICATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipNotification(Boolean skipNotification) { - this.skipNotification = skipNotification; - } - - /** Return true if this TemplateAddUserRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateAddUserRequest templateAddUserRequest = (TemplateAddUserRequest) o; - return Objects.equals(this.accountId, templateAddUserRequest.accountId) - && Objects.equals(this.emailAddress, templateAddUserRequest.emailAddress) - && Objects.equals(this.skipNotification, templateAddUserRequest.skipNotification); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress, skipNotification); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateAddUserRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" skipNotification: ").append(toIndentedString(skipNotification)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (skipNotification != null) { - if (isFileTypeOrListOfFiles(skipNotification)) { - fileTypeFound = true; - } - - if (skipNotification.getClass().equals(java.io.File.class) - || skipNotification.getClass().equals(Integer.class) - || skipNotification.getClass().equals(String.class) - || skipNotification.getClass().isEnum()) { - map.put("skip_notification", skipNotification); - } else if (isListOfFile(skipNotification)) { - for (int i = 0; i < getListSize(skipNotification); i++) { - map.put("skip_notification[" + i + "]", getFromList(skipNotification, i)); - } - } else { - map.put( - "skip_notification", - JSON.getDefault().getMapper().writeValueAsString(skipNotification)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java deleted file mode 100644 index 95632844c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java +++ /dev/null @@ -1,1499 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateCreateEmbeddedDraftRequest */ -@JsonPropertyOrder({ - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_CLIENT_ID, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FILES, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FILE_URLS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_ALLOW_CCS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_ALLOW_REASSIGN, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_ATTACHMENTS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_CC_ROLES, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_EDITOR_OPTIONS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FIELD_OPTIONS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FORCE_SIGNER_ROLES, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FORCE_SUBJECT_MESSAGE, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FORM_FIELD_RULES, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_MERGE_FIELDS, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_MESSAGE, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_METADATA, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_SHOW_PREVIEW, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_SIGNER_ROLES, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_SKIP_ME_NOW, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_SUBJECT, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_TEST_MODE, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_TITLE, - TemplateCreateEmbeddedDraftRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateEmbeddedDraftRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; - - public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; - - public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; - - public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; - - public TemplateCreateEmbeddedDraftRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateEmbeddedDraftRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateCreateEmbeddedDraftRequest.class); - } - - public static TemplateCreateEmbeddedDraftRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateCreateEmbeddedDraftRequest.class); - } - - public TemplateCreateEmbeddedDraftRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this draft. Used to apply the branding and - * callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public TemplateCreateEmbeddedDraftRequest files(List files) { - this.files = files; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public TemplateCreateEmbeddedDraftRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public TemplateCreateEmbeddedDraftRequest allowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - return this; - } - - /** - * This allows the requester to specify whether the user is allowed to provide email addresses - * to CC when creating a template. - * - * @return allowCcs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowCcs() { - return allowCcs; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - } - - public TemplateCreateEmbeddedDraftRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public TemplateCreateEmbeddedDraftRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public TemplateCreateEmbeddedDraftRequest ccRoles(List ccRoles) { - this.ccRoles = ccRoles; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addCcRolesItem(String ccRolesItem) { - if (this.ccRoles == null) { - this.ccRoles = new ArrayList<>(); - } - this.ccRoles.add(ccRolesItem); - return this; - } - - /** - * The CC roles that must be assigned when using the template to send a signature request - * - * @return ccRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcRoles() { - return ccRoles; - } - - @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { - this.ccRoles = ccRoles; - } - - public TemplateCreateEmbeddedDraftRequest editorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - return this; - } - - /** - * Get editorOptions - * - * @return editorOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubEditorOptions getEditorOptions() { - return editorOptions; - } - - @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - } - - public TemplateCreateEmbeddedDraftRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public TemplateCreateEmbeddedDraftRequest forceSignerRoles(Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - return this; - } - - /** - * Provide users the ability to review/edit the template signer roles. - * - * @return forceSignerRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSignerRoles() { - return forceSignerRoles; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - } - - public TemplateCreateEmbeddedDraftRequest forceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - return this; - } - - /** - * Provide users the ability to review/edit the template subject and message. - * - * @return forceSubjectMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSubjectMessage() { - return forceSubjectMessage; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - } - - public TemplateCreateEmbeddedDraftRequest formFieldGroups( - List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public TemplateCreateEmbeddedDraftRequest formFieldRules( - List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addFormFieldRulesItem( - SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public TemplateCreateEmbeddedDraftRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public TemplateCreateEmbeddedDraftRequest mergeFields(List mergeFields) { - this.mergeFields = mergeFields; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addMergeFieldsItem(SubMergeField mergeFieldsItem) { - if (this.mergeFields == null) { - this.mergeFields = new ArrayList<>(); - } - this.mergeFields.add(mergeFieldsItem); - return this; - } - - /** - * Add merge fields to the template. Merge fields are placed by the user creating the template - * and used to pre-fill data by passing values into signature requests with the - * `custom_fields` parameter. If the signature request using that template *does not* - * pass a value into a merge field, then an empty field remains in the document. - * - * @return mergeFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMergeFields() { - return mergeFields; - } - - @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { - this.mergeFields = mergeFields; - } - - public TemplateCreateEmbeddedDraftRequest message(String message) { - this.message = message; - return this; - } - - /** - * The default template email message. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public TemplateCreateEmbeddedDraftRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public TemplateCreateEmbeddedDraftRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public TemplateCreateEmbeddedDraftRequest showPreview(Boolean showPreview) { - this.showPreview = showPreview; - return this; - } - - /** - * This allows the requester to enable the editor/preview experience. - - * `show_preview=true`: Allows requesters to enable the editor/preview - * experience. - `show_preview=false`: Allows requesters to disable the - * editor/preview experience. - * - * @return showPreview - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPreview() { - return showPreview; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { - this.showPreview = showPreview; - } - - public TemplateCreateEmbeddedDraftRequest showProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public TemplateCreateEmbeddedDraftRequest signerRoles(List signerRoles) { - this.signerRoles = signerRoles; - return this; - } - - public TemplateCreateEmbeddedDraftRequest addSignerRolesItem(SubTemplateRole signerRolesItem) { - if (this.signerRoles == null) { - this.signerRoles = new ArrayList<>(); - } - this.signerRoles.add(signerRolesItem); - return this; - } - - /** - * An array of the designated signer roles that must be specified when sending a - * SignatureRequest using this Template. - * - * @return signerRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignerRoles() { - return signerRoles; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { - this.signerRoles = signerRoles; - } - - public TemplateCreateEmbeddedDraftRequest skipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - return this; - } - - /** - * Disables the \"Me (Now)\" option for the person preparing the document. Does not - * work with type `send_document`. Defaults to `false`. - * - * @return skipMeNow - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSkipMeNow() { - return skipMeNow; - } - - @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - } - - public TemplateCreateEmbeddedDraftRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The template title (alias). - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public TemplateCreateEmbeddedDraftRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public TemplateCreateEmbeddedDraftRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public TemplateCreateEmbeddedDraftRequest usePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - return this; - } - - /** - * Enable the detection of predefined PDF fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). - * - * @return usePreexistingFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUsePreexistingFields() { - return usePreexistingFields; - } - - @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - } - - /** Return true if this TemplateCreateEmbeddedDraftRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateEmbeddedDraftRequest templateCreateEmbeddedDraftRequest = - (TemplateCreateEmbeddedDraftRequest) o; - return Objects.equals(this.clientId, templateCreateEmbeddedDraftRequest.clientId) - && Objects.equals(this.files, templateCreateEmbeddedDraftRequest.files) - && Objects.equals(this.fileUrls, templateCreateEmbeddedDraftRequest.fileUrls) - && Objects.equals(this.allowCcs, templateCreateEmbeddedDraftRequest.allowCcs) - && Objects.equals( - this.allowReassign, templateCreateEmbeddedDraftRequest.allowReassign) - && Objects.equals(this.attachments, templateCreateEmbeddedDraftRequest.attachments) - && Objects.equals(this.ccRoles, templateCreateEmbeddedDraftRequest.ccRoles) - && Objects.equals( - this.editorOptions, templateCreateEmbeddedDraftRequest.editorOptions) - && Objects.equals( - this.fieldOptions, templateCreateEmbeddedDraftRequest.fieldOptions) - && Objects.equals( - this.forceSignerRoles, templateCreateEmbeddedDraftRequest.forceSignerRoles) - && Objects.equals( - this.forceSubjectMessage, - templateCreateEmbeddedDraftRequest.forceSubjectMessage) - && Objects.equals( - this.formFieldGroups, templateCreateEmbeddedDraftRequest.formFieldGroups) - && Objects.equals( - this.formFieldRules, templateCreateEmbeddedDraftRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - templateCreateEmbeddedDraftRequest.formFieldsPerDocument) - && Objects.equals(this.mergeFields, templateCreateEmbeddedDraftRequest.mergeFields) - && Objects.equals(this.message, templateCreateEmbeddedDraftRequest.message) - && Objects.equals(this.metadata, templateCreateEmbeddedDraftRequest.metadata) - && Objects.equals(this.showPreview, templateCreateEmbeddedDraftRequest.showPreview) - && Objects.equals( - this.showProgressStepper, - templateCreateEmbeddedDraftRequest.showProgressStepper) - && Objects.equals(this.signerRoles, templateCreateEmbeddedDraftRequest.signerRoles) - && Objects.equals(this.skipMeNow, templateCreateEmbeddedDraftRequest.skipMeNow) - && Objects.equals(this.subject, templateCreateEmbeddedDraftRequest.subject) - && Objects.equals(this.testMode, templateCreateEmbeddedDraftRequest.testMode) - && Objects.equals(this.title, templateCreateEmbeddedDraftRequest.title) - && Objects.equals( - this.usePreexistingFields, - templateCreateEmbeddedDraftRequest.usePreexistingFields); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - files, - fileUrls, - allowCcs, - allowReassign, - attachments, - ccRoles, - editorOptions, - fieldOptions, - forceSignerRoles, - forceSubjectMessage, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - mergeFields, - message, - metadata, - showPreview, - showProgressStepper, - signerRoles, - skipMeNow, - subject, - testMode, - title, - usePreexistingFields); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateEmbeddedDraftRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" allowCcs: ").append(toIndentedString(allowCcs)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccRoles: ").append(toIndentedString(ccRoles)).append("\n"); - sb.append(" editorOptions: ").append(toIndentedString(editorOptions)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" forceSignerRoles: ").append(toIndentedString(forceSignerRoles)).append("\n"); - sb.append(" forceSubjectMessage: ") - .append(toIndentedString(forceSubjectMessage)) - .append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" mergeFields: ").append(toIndentedString(mergeFields)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" showPreview: ").append(toIndentedString(showPreview)).append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" signerRoles: ").append(toIndentedString(signerRoles)).append("\n"); - sb.append(" skipMeNow: ").append(toIndentedString(skipMeNow)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" usePreexistingFields: ") - .append(toIndentedString(usePreexistingFields)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (allowCcs != null) { - if (isFileTypeOrListOfFiles(allowCcs)) { - fileTypeFound = true; - } - - if (allowCcs.getClass().equals(java.io.File.class) - || allowCcs.getClass().equals(Integer.class) - || allowCcs.getClass().equals(String.class) - || allowCcs.getClass().isEnum()) { - map.put("allow_ccs", allowCcs); - } else if (isListOfFile(allowCcs)) { - for (int i = 0; i < getListSize(allowCcs); i++) { - map.put("allow_ccs[" + i + "]", getFromList(allowCcs, i)); - } - } else { - map.put( - "allow_ccs", - JSON.getDefault().getMapper().writeValueAsString(allowCcs)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccRoles != null) { - if (isFileTypeOrListOfFiles(ccRoles)) { - fileTypeFound = true; - } - - if (ccRoles.getClass().equals(java.io.File.class) - || ccRoles.getClass().equals(Integer.class) - || ccRoles.getClass().equals(String.class) - || ccRoles.getClass().isEnum()) { - map.put("cc_roles", ccRoles); - } else if (isListOfFile(ccRoles)) { - for (int i = 0; i < getListSize(ccRoles); i++) { - map.put("cc_roles[" + i + "]", getFromList(ccRoles, i)); - } - } else { - map.put("cc_roles", JSON.getDefault().getMapper().writeValueAsString(ccRoles)); - } - } - if (editorOptions != null) { - if (isFileTypeOrListOfFiles(editorOptions)) { - fileTypeFound = true; - } - - if (editorOptions.getClass().equals(java.io.File.class) - || editorOptions.getClass().equals(Integer.class) - || editorOptions.getClass().equals(String.class) - || editorOptions.getClass().isEnum()) { - map.put("editor_options", editorOptions); - } else if (isListOfFile(editorOptions)) { - for (int i = 0; i < getListSize(editorOptions); i++) { - map.put("editor_options[" + i + "]", getFromList(editorOptions, i)); - } - } else { - map.put( - "editor_options", - JSON.getDefault().getMapper().writeValueAsString(editorOptions)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (forceSignerRoles != null) { - if (isFileTypeOrListOfFiles(forceSignerRoles)) { - fileTypeFound = true; - } - - if (forceSignerRoles.getClass().equals(java.io.File.class) - || forceSignerRoles.getClass().equals(Integer.class) - || forceSignerRoles.getClass().equals(String.class) - || forceSignerRoles.getClass().isEnum()) { - map.put("force_signer_roles", forceSignerRoles); - } else if (isListOfFile(forceSignerRoles)) { - for (int i = 0; i < getListSize(forceSignerRoles); i++) { - map.put("force_signer_roles[" + i + "]", getFromList(forceSignerRoles, i)); - } - } else { - map.put( - "force_signer_roles", - JSON.getDefault().getMapper().writeValueAsString(forceSignerRoles)); - } - } - if (forceSubjectMessage != null) { - if (isFileTypeOrListOfFiles(forceSubjectMessage)) { - fileTypeFound = true; - } - - if (forceSubjectMessage.getClass().equals(java.io.File.class) - || forceSubjectMessage.getClass().equals(Integer.class) - || forceSubjectMessage.getClass().equals(String.class) - || forceSubjectMessage.getClass().isEnum()) { - map.put("force_subject_message", forceSubjectMessage); - } else if (isListOfFile(forceSubjectMessage)) { - for (int i = 0; i < getListSize(forceSubjectMessage); i++) { - map.put( - "force_subject_message[" + i + "]", - getFromList(forceSubjectMessage, i)); - } - } else { - map.put( - "force_subject_message", - JSON.getDefault().getMapper().writeValueAsString(forceSubjectMessage)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (mergeFields != null) { - if (isFileTypeOrListOfFiles(mergeFields)) { - fileTypeFound = true; - } - - if (mergeFields.getClass().equals(java.io.File.class) - || mergeFields.getClass().equals(Integer.class) - || mergeFields.getClass().equals(String.class) - || mergeFields.getClass().isEnum()) { - map.put("merge_fields", mergeFields); - } else if (isListOfFile(mergeFields)) { - for (int i = 0; i < getListSize(mergeFields); i++) { - map.put("merge_fields[" + i + "]", getFromList(mergeFields, i)); - } - } else { - map.put( - "merge_fields", - JSON.getDefault().getMapper().writeValueAsString(mergeFields)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (showPreview != null) { - if (isFileTypeOrListOfFiles(showPreview)) { - fileTypeFound = true; - } - - if (showPreview.getClass().equals(java.io.File.class) - || showPreview.getClass().equals(Integer.class) - || showPreview.getClass().equals(String.class) - || showPreview.getClass().isEnum()) { - map.put("show_preview", showPreview); - } else if (isListOfFile(showPreview)) { - for (int i = 0; i < getListSize(showPreview); i++) { - map.put("show_preview[" + i + "]", getFromList(showPreview, i)); - } - } else { - map.put( - "show_preview", - JSON.getDefault().getMapper().writeValueAsString(showPreview)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (signerRoles != null) { - if (isFileTypeOrListOfFiles(signerRoles)) { - fileTypeFound = true; - } - - if (signerRoles.getClass().equals(java.io.File.class) - || signerRoles.getClass().equals(Integer.class) - || signerRoles.getClass().equals(String.class) - || signerRoles.getClass().isEnum()) { - map.put("signer_roles", signerRoles); - } else if (isListOfFile(signerRoles)) { - for (int i = 0; i < getListSize(signerRoles); i++) { - map.put("signer_roles[" + i + "]", getFromList(signerRoles, i)); - } - } else { - map.put( - "signer_roles", - JSON.getDefault().getMapper().writeValueAsString(signerRoles)); - } - } - if (skipMeNow != null) { - if (isFileTypeOrListOfFiles(skipMeNow)) { - fileTypeFound = true; - } - - if (skipMeNow.getClass().equals(java.io.File.class) - || skipMeNow.getClass().equals(Integer.class) - || skipMeNow.getClass().equals(String.class) - || skipMeNow.getClass().isEnum()) { - map.put("skip_me_now", skipMeNow); - } else if (isListOfFile(skipMeNow)) { - for (int i = 0; i < getListSize(skipMeNow); i++) { - map.put("skip_me_now[" + i + "]", getFromList(skipMeNow, i)); - } - } else { - map.put( - "skip_me_now", - JSON.getDefault().getMapper().writeValueAsString(skipMeNow)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (usePreexistingFields != null) { - if (isFileTypeOrListOfFiles(usePreexistingFields)) { - fileTypeFound = true; - } - - if (usePreexistingFields.getClass().equals(java.io.File.class) - || usePreexistingFields.getClass().equals(Integer.class) - || usePreexistingFields.getClass().equals(String.class) - || usePreexistingFields.getClass().isEnum()) { - map.put("use_preexisting_fields", usePreexistingFields); - } else if (isListOfFile(usePreexistingFields)) { - for (int i = 0; i < getListSize(usePreexistingFields); i++) { - map.put( - "use_preexisting_fields[" + i + "]", - getFromList(usePreexistingFields, i)); - } - } else { - map.put( - "use_preexisting_fields", - JSON.getDefault().getMapper().writeValueAsString(usePreexistingFields)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java deleted file mode 100644 index 21f1d7d65..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateCreateEmbeddedDraftResponse */ -@JsonPropertyOrder({ - TemplateCreateEmbeddedDraftResponse.JSON_PROPERTY_TEMPLATE, - TemplateCreateEmbeddedDraftResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateEmbeddedDraftResponse { - public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateEmbeddedDraftResponseTemplate template; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TemplateCreateEmbeddedDraftResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateEmbeddedDraftResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateCreateEmbeddedDraftResponse.class); - } - - public static TemplateCreateEmbeddedDraftResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateCreateEmbeddedDraftResponse.class); - } - - public TemplateCreateEmbeddedDraftResponse template( - TemplateCreateEmbeddedDraftResponseTemplate template) { - this.template = template; - return this; - } - - /** - * Get template - * - * @return template - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TemplateCreateEmbeddedDraftResponseTemplate getTemplate() { - return template; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateEmbeddedDraftResponseTemplate template) { - this.template = template; - } - - public TemplateCreateEmbeddedDraftResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateCreateEmbeddedDraftResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateCreateEmbeddedDraftResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraftResponse = - (TemplateCreateEmbeddedDraftResponse) o; - return Objects.equals(this.template, templateCreateEmbeddedDraftResponse.template) - && Objects.equals(this.warnings, templateCreateEmbeddedDraftResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(template, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateEmbeddedDraftResponse {\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (template != null) { - if (isFileTypeOrListOfFiles(template)) { - fileTypeFound = true; - } - - if (template.getClass().equals(java.io.File.class) - || template.getClass().equals(Integer.class) - || template.getClass().equals(String.class) - || template.getClass().isEnum()) { - map.put("template", template); - } else if (isListOfFile(template)) { - for (int i = 0; i < getListSize(template); i++) { - map.put("template[" + i + "]", getFromList(template, i)); - } - } else { - map.put("template", JSON.getDefault().getMapper().writeValueAsString(template)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java deleted file mode 100644 index 7e2fc0bc4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** - * Template object with parameters: `template_id`, `edit_url`, - * `expires_at`. - */ -@JsonPropertyOrder({ - TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_TEMPLATE_ID, - TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_EDIT_URL, - TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_EXPIRES_AT, - TemplateCreateEmbeddedDraftResponseTemplate.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateEmbeddedDraftResponseTemplate { - public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; - - public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; - - public TemplateCreateEmbeddedDraftResponseTemplate() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateEmbeddedDraftResponseTemplate init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateCreateEmbeddedDraftResponseTemplate.class); - } - - public static TemplateCreateEmbeddedDraftResponseTemplate init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateCreateEmbeddedDraftResponseTemplate.class); - } - - public TemplateCreateEmbeddedDraftResponseTemplate templateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * The id of the Template. - * - * @return templateId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTemplateId() { - return templateId; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - public TemplateCreateEmbeddedDraftResponseTemplate editUrl(String editUrl) { - this.editUrl = editUrl; - return this; - } - - /** - * Link to edit the template. - * - * @return editUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDIT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEditUrl() { - return editUrl; - } - - @JsonProperty(JSON_PROPERTY_EDIT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { - this.editUrl = editUrl; - } - - public TemplateCreateEmbeddedDraftResponseTemplate expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the link expires. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - @Deprecated - public TemplateCreateEmbeddedDraftResponseTemplate warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateCreateEmbeddedDraftResponseTemplate addWarningsItem( - WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateCreateEmbeddedDraftResponseTemplate object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateEmbeddedDraftResponseTemplate templateCreateEmbeddedDraftResponseTemplate = - (TemplateCreateEmbeddedDraftResponseTemplate) o; - return Objects.equals( - this.templateId, templateCreateEmbeddedDraftResponseTemplate.templateId) - && Objects.equals(this.editUrl, templateCreateEmbeddedDraftResponseTemplate.editUrl) - && Objects.equals( - this.expiresAt, templateCreateEmbeddedDraftResponseTemplate.expiresAt) - && Objects.equals( - this.warnings, templateCreateEmbeddedDraftResponseTemplate.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(templateId, editUrl, expiresAt, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateEmbeddedDraftResponseTemplate {\n"); - sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append(" editUrl: ").append(toIndentedString(editUrl)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateId != null) { - if (isFileTypeOrListOfFiles(templateId)) { - fileTypeFound = true; - } - - if (templateId.getClass().equals(java.io.File.class) - || templateId.getClass().equals(Integer.class) - || templateId.getClass().equals(String.class) - || templateId.getClass().isEnum()) { - map.put("template_id", templateId); - } else if (isListOfFile(templateId)) { - for (int i = 0; i < getListSize(templateId); i++) { - map.put("template_id[" + i + "]", getFromList(templateId, i)); - } - } else { - map.put( - "template_id", - JSON.getDefault().getMapper().writeValueAsString(templateId)); - } - } - if (editUrl != null) { - if (isFileTypeOrListOfFiles(editUrl)) { - fileTypeFound = true; - } - - if (editUrl.getClass().equals(java.io.File.class) - || editUrl.getClass().equals(Integer.class) - || editUrl.getClass().equals(String.class) - || editUrl.getClass().isEnum()) { - map.put("edit_url", editUrl); - } else if (isListOfFile(editUrl)) { - for (int i = 0; i < getListSize(editUrl); i++) { - map.put("edit_url[" + i + "]", getFromList(editUrl, i)); - } - } else { - map.put("edit_url", JSON.getDefault().getMapper().writeValueAsString(editUrl)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java deleted file mode 100644 index 9a554ed65..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java +++ /dev/null @@ -1,1125 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateCreateRequest */ -@JsonPropertyOrder({ - TemplateCreateRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - TemplateCreateRequest.JSON_PROPERTY_SIGNER_ROLES, - TemplateCreateRequest.JSON_PROPERTY_FILES, - TemplateCreateRequest.JSON_PROPERTY_FILE_URLS, - TemplateCreateRequest.JSON_PROPERTY_ALLOW_REASSIGN, - TemplateCreateRequest.JSON_PROPERTY_ATTACHMENTS, - TemplateCreateRequest.JSON_PROPERTY_CC_ROLES, - TemplateCreateRequest.JSON_PROPERTY_CLIENT_ID, - TemplateCreateRequest.JSON_PROPERTY_FIELD_OPTIONS, - TemplateCreateRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - TemplateCreateRequest.JSON_PROPERTY_FORM_FIELD_RULES, - TemplateCreateRequest.JSON_PROPERTY_MERGE_FIELDS, - TemplateCreateRequest.JSON_PROPERTY_MESSAGE, - TemplateCreateRequest.JSON_PROPERTY_METADATA, - TemplateCreateRequest.JSON_PROPERTY_SUBJECT, - TemplateCreateRequest.JSON_PROPERTY_TEST_MODE, - TemplateCreateRequest.JSON_PROPERTY_TITLE, - TemplateCreateRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateRequest { - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = new ArrayList<>(); - - public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = new ArrayList<>(); - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; - - public TemplateCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateCreateRequest.class); - } - - public static TemplateCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TemplateCreateRequest.class); - } - - public TemplateCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public TemplateCreateRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public TemplateCreateRequest signerRoles(List signerRoles) { - this.signerRoles = signerRoles; - return this; - } - - public TemplateCreateRequest addSignerRolesItem(SubTemplateRole signerRolesItem) { - if (this.signerRoles == null) { - this.signerRoles = new ArrayList<>(); - } - this.signerRoles.add(signerRolesItem); - return this; - } - - /** - * An array of the designated signer roles that must be specified when sending a - * SignatureRequest using this Template. - * - * @return signerRoles - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getSignerRoles() { - return signerRoles; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerRoles(List signerRoles) { - this.signerRoles = signerRoles; - } - - public TemplateCreateRequest files(List files) { - this.files = files; - return this; - } - - public TemplateCreateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public TemplateCreateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public TemplateCreateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public TemplateCreateRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public TemplateCreateRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public TemplateCreateRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public TemplateCreateRequest ccRoles(List ccRoles) { - this.ccRoles = ccRoles; - return this; - } - - public TemplateCreateRequest addCcRolesItem(String ccRolesItem) { - if (this.ccRoles == null) { - this.ccRoles = new ArrayList<>(); - } - this.ccRoles.add(ccRolesItem); - return this; - } - - /** - * The CC roles that must be assigned when using the template to send a signature request - * - * @return ccRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcRoles() { - return ccRoles; - } - - @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { - this.ccRoles = ccRoles; - } - - public TemplateCreateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to create this draft. Used to apply the branding and - * callback url defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public TemplateCreateRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public TemplateCreateRequest formFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public TemplateCreateRequest addFormFieldGroupsItem(SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public TemplateCreateRequest formFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public TemplateCreateRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public TemplateCreateRequest mergeFields(List mergeFields) { - this.mergeFields = mergeFields; - return this; - } - - public TemplateCreateRequest addMergeFieldsItem(SubMergeField mergeFieldsItem) { - if (this.mergeFields == null) { - this.mergeFields = new ArrayList<>(); - } - this.mergeFields.add(mergeFieldsItem); - return this; - } - - /** - * Add merge fields to the template. Merge fields are placed by the user creating the template - * and used to pre-fill data by passing values into signature requests with the - * `custom_fields` parameter. If the signature request using that template *does not* - * pass a value into a merge field, then an empty field remains in the document. - * - * @return mergeFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getMergeFields() { - return mergeFields; - } - - @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { - this.mergeFields = mergeFields; - } - - public TemplateCreateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The default template email message. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public TemplateCreateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public TemplateCreateRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public TemplateCreateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The template title (alias). - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public TemplateCreateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public TemplateCreateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public TemplateCreateRequest usePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - return this; - } - - /** - * Enable the detection of predefined PDF fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). - * - * @return usePreexistingFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUsePreexistingFields() { - return usePreexistingFields; - } - - @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - } - - /** Return true if this TemplateCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateRequest templateCreateRequest = (TemplateCreateRequest) o; - return Objects.equals( - this.formFieldsPerDocument, templateCreateRequest.formFieldsPerDocument) - && Objects.equals(this.signerRoles, templateCreateRequest.signerRoles) - && Objects.equals(this.files, templateCreateRequest.files) - && Objects.equals(this.fileUrls, templateCreateRequest.fileUrls) - && Objects.equals(this.allowReassign, templateCreateRequest.allowReassign) - && Objects.equals(this.attachments, templateCreateRequest.attachments) - && Objects.equals(this.ccRoles, templateCreateRequest.ccRoles) - && Objects.equals(this.clientId, templateCreateRequest.clientId) - && Objects.equals(this.fieldOptions, templateCreateRequest.fieldOptions) - && Objects.equals(this.formFieldGroups, templateCreateRequest.formFieldGroups) - && Objects.equals(this.formFieldRules, templateCreateRequest.formFieldRules) - && Objects.equals(this.mergeFields, templateCreateRequest.mergeFields) - && Objects.equals(this.message, templateCreateRequest.message) - && Objects.equals(this.metadata, templateCreateRequest.metadata) - && Objects.equals(this.subject, templateCreateRequest.subject) - && Objects.equals(this.testMode, templateCreateRequest.testMode) - && Objects.equals(this.title, templateCreateRequest.title) - && Objects.equals( - this.usePreexistingFields, templateCreateRequest.usePreexistingFields); - } - - @Override - public int hashCode() { - return Objects.hash( - formFieldsPerDocument, - signerRoles, - files, - fileUrls, - allowReassign, - attachments, - ccRoles, - clientId, - fieldOptions, - formFieldGroups, - formFieldRules, - mergeFields, - message, - metadata, - subject, - testMode, - title, - usePreexistingFields); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateRequest {\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" signerRoles: ").append(toIndentedString(signerRoles)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccRoles: ").append(toIndentedString(ccRoles)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" mergeFields: ").append(toIndentedString(mergeFields)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" usePreexistingFields: ") - .append(toIndentedString(usePreexistingFields)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (signerRoles != null) { - if (isFileTypeOrListOfFiles(signerRoles)) { - fileTypeFound = true; - } - - if (signerRoles.getClass().equals(java.io.File.class) - || signerRoles.getClass().equals(Integer.class) - || signerRoles.getClass().equals(String.class) - || signerRoles.getClass().isEnum()) { - map.put("signer_roles", signerRoles); - } else if (isListOfFile(signerRoles)) { - for (int i = 0; i < getListSize(signerRoles); i++) { - map.put("signer_roles[" + i + "]", getFromList(signerRoles, i)); - } - } else { - map.put( - "signer_roles", - JSON.getDefault().getMapper().writeValueAsString(signerRoles)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccRoles != null) { - if (isFileTypeOrListOfFiles(ccRoles)) { - fileTypeFound = true; - } - - if (ccRoles.getClass().equals(java.io.File.class) - || ccRoles.getClass().equals(Integer.class) - || ccRoles.getClass().equals(String.class) - || ccRoles.getClass().isEnum()) { - map.put("cc_roles", ccRoles); - } else if (isListOfFile(ccRoles)) { - for (int i = 0; i < getListSize(ccRoles); i++) { - map.put("cc_roles[" + i + "]", getFromList(ccRoles, i)); - } - } else { - map.put("cc_roles", JSON.getDefault().getMapper().writeValueAsString(ccRoles)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (mergeFields != null) { - if (isFileTypeOrListOfFiles(mergeFields)) { - fileTypeFound = true; - } - - if (mergeFields.getClass().equals(java.io.File.class) - || mergeFields.getClass().equals(Integer.class) - || mergeFields.getClass().equals(String.class) - || mergeFields.getClass().isEnum()) { - map.put("merge_fields", mergeFields); - } else if (isListOfFile(mergeFields)) { - for (int i = 0; i < getListSize(mergeFields); i++) { - map.put("merge_fields[" + i + "]", getFromList(mergeFields, i)); - } - } else { - map.put( - "merge_fields", - JSON.getDefault().getMapper().writeValueAsString(mergeFields)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (usePreexistingFields != null) { - if (isFileTypeOrListOfFiles(usePreexistingFields)) { - fileTypeFound = true; - } - - if (usePreexistingFields.getClass().equals(java.io.File.class) - || usePreexistingFields.getClass().equals(Integer.class) - || usePreexistingFields.getClass().equals(String.class) - || usePreexistingFields.getClass().isEnum()) { - map.put("use_preexisting_fields", usePreexistingFields); - } else if (isListOfFile(usePreexistingFields)) { - for (int i = 0; i < getListSize(usePreexistingFields); i++) { - map.put( - "use_preexisting_fields[" + i + "]", - getFromList(usePreexistingFields, i)); - } - } else { - map.put( - "use_preexisting_fields", - JSON.getDefault().getMapper().writeValueAsString(usePreexistingFields)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java deleted file mode 100644 index 3c228e89c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateCreateResponse */ -@JsonPropertyOrder({ - TemplateCreateResponse.JSON_PROPERTY_TEMPLATE, - TemplateCreateResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateResponse { - public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateResponseTemplate template; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TemplateCreateResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateCreateResponse.class); - } - - public static TemplateCreateResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TemplateCreateResponse.class); - } - - public TemplateCreateResponse template(TemplateCreateResponseTemplate template) { - this.template = template; - return this; - } - - /** - * Get template - * - * @return template - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TemplateCreateResponseTemplate getTemplate() { - return template; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateResponseTemplate template) { - this.template = template; - } - - public TemplateCreateResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateCreateResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateCreateResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateResponse templateCreateResponse = (TemplateCreateResponse) o; - return Objects.equals(this.template, templateCreateResponse.template) - && Objects.equals(this.warnings, templateCreateResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(template, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateResponse {\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (template != null) { - if (isFileTypeOrListOfFiles(template)) { - fileTypeFound = true; - } - - if (template.getClass().equals(java.io.File.class) - || template.getClass().equals(Integer.class) - || template.getClass().equals(String.class) - || template.getClass().isEnum()) { - map.put("template", template); - } else if (isListOfFile(template)) { - for (int i = 0; i < getListSize(template); i++) { - map.put("template[" + i + "]", getFromList(template, i)); - } - } else { - map.put("template", JSON.getDefault().getMapper().writeValueAsString(template)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java deleted file mode 100644 index 017ed6e40..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Template object with parameters: `template_id`. */ -@JsonPropertyOrder({TemplateCreateResponseTemplate.JSON_PROPERTY_TEMPLATE_ID}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateCreateResponseTemplate { - public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; - - public TemplateCreateResponseTemplate() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateCreateResponseTemplate init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateCreateResponseTemplate.class); - } - - public static TemplateCreateResponseTemplate init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateCreateResponseTemplate.class); - } - - public TemplateCreateResponseTemplate templateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * The id of the Template. - * - * @return templateId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTemplateId() { - return templateId; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - /** Return true if this TemplateCreateResponseTemplate object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateCreateResponseTemplate templateCreateResponseTemplate = - (TemplateCreateResponseTemplate) o; - return Objects.equals(this.templateId, templateCreateResponseTemplate.templateId); - } - - @Override - public int hashCode() { - return Objects.hash(templateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateCreateResponseTemplate {\n"); - sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateId != null) { - if (isFileTypeOrListOfFiles(templateId)) { - fileTypeFound = true; - } - - if (templateId.getClass().equals(java.io.File.class) - || templateId.getClass().equals(Integer.class) - || templateId.getClass().equals(String.class) - || templateId.getClass().isEnum()) { - map.put("template_id", templateId); - } else if (isListOfFile(templateId)) { - for (int i = 0; i < getListSize(templateId); i++) { - map.put("template_id[" + i + "]", getFromList(templateId, i)); - } - } else { - map.put( - "template_id", - JSON.getDefault().getMapper().writeValueAsString(templateId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java deleted file mode 100644 index 65be6fd0b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateEditResponse */ -@JsonPropertyOrder({TemplateEditResponse.JSON_PROPERTY_TEMPLATE_ID}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateEditResponse { - public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; - - public TemplateEditResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateEditResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateEditResponse.class); - } - - public static TemplateEditResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TemplateEditResponse.class); - } - - public TemplateEditResponse templateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * The id of the Template. - * - * @return templateId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getTemplateId() { - return templateId; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - /** Return true if this TemplateEditResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateEditResponse templateEditResponse = (TemplateEditResponse) o; - return Objects.equals(this.templateId, templateEditResponse.templateId); - } - - @Override - public int hashCode() { - return Objects.hash(templateId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateEditResponse {\n"); - sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateId != null) { - if (isFileTypeOrListOfFiles(templateId)) { - fileTypeFound = true; - } - - if (templateId.getClass().equals(java.io.File.class) - || templateId.getClass().equals(Integer.class) - || templateId.getClass().equals(String.class) - || templateId.getClass().isEnum()) { - map.put("template_id", templateId); - } else if (isListOfFile(templateId)) { - for (int i = 0; i < getListSize(templateId); i++) { - map.put("template_id[" + i + "]", getFromList(templateId, i)); - } - } else { - map.put( - "template_id", - JSON.getDefault().getMapper().writeValueAsString(templateId)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java deleted file mode 100644 index 1c4f53d6b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateGetResponse */ -@JsonPropertyOrder({ - TemplateGetResponse.JSON_PROPERTY_TEMPLATE, - TemplateGetResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateGetResponse { - public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TemplateGetResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateGetResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateGetResponse.class); - } - - public static TemplateGetResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TemplateGetResponse.class); - } - - public TemplateGetResponse template(TemplateResponse template) { - this.template = template; - return this; - } - - /** - * Get template - * - * @return template - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TemplateResponse getTemplate() { - return template; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateResponse template) { - this.template = template; - } - - public TemplateGetResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateGetResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateGetResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateGetResponse templateGetResponse = (TemplateGetResponse) o; - return Objects.equals(this.template, templateGetResponse.template) - && Objects.equals(this.warnings, templateGetResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(template, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateGetResponse {\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (template != null) { - if (isFileTypeOrListOfFiles(template)) { - fileTypeFound = true; - } - - if (template.getClass().equals(java.io.File.class) - || template.getClass().equals(Integer.class) - || template.getClass().equals(String.class) - || template.getClass().isEnum()) { - map.put("template", template); - } else if (isListOfFile(template)) { - for (int i = 0; i < getListSize(template); i++) { - map.put("template[" + i + "]", getFromList(template, i)); - } - } else { - map.put("template", JSON.getDefault().getMapper().writeValueAsString(template)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java deleted file mode 100644 index 70385b00c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateListResponse */ -@JsonPropertyOrder({ - TemplateListResponse.JSON_PROPERTY_TEMPLATES, - TemplateListResponse.JSON_PROPERTY_LIST_INFO, - TemplateListResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateListResponse { - public static final String JSON_PROPERTY_TEMPLATES = "templates"; - private List templates = new ArrayList<>(); - - public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public TemplateListResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateListResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateListResponse.class); - } - - public static TemplateListResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TemplateListResponse.class); - } - - public TemplateListResponse templates(List templates) { - this.templates = templates; - return this; - } - - public TemplateListResponse addTemplatesItem(TemplateResponse templatesItem) { - if (this.templates == null) { - this.templates = new ArrayList<>(); - } - this.templates.add(templatesItem); - return this; - } - - /** - * List of templates that the API caller has access to. - * - * @return templates - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplates() { - return templates; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplates(List templates) { - this.templates = templates; - } - - public TemplateListResponse listInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - return this; - } - - /** - * Get listInfo - * - * @return listInfo - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ListInfoResponse getListInfo() { - return listInfo; - } - - @JsonProperty(JSON_PROPERTY_LIST_INFO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { - this.listInfo = listInfo; - } - - public TemplateListResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateListResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateListResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateListResponse templateListResponse = (TemplateListResponse) o; - return Objects.equals(this.templates, templateListResponse.templates) - && Objects.equals(this.listInfo, templateListResponse.listInfo) - && Objects.equals(this.warnings, templateListResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(templates, listInfo, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateListResponse {\n"); - sb.append(" templates: ").append(toIndentedString(templates)).append("\n"); - sb.append(" listInfo: ").append(toIndentedString(listInfo)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templates != null) { - if (isFileTypeOrListOfFiles(templates)) { - fileTypeFound = true; - } - - if (templates.getClass().equals(java.io.File.class) - || templates.getClass().equals(Integer.class) - || templates.getClass().equals(String.class) - || templates.getClass().isEnum()) { - map.put("templates", templates); - } else if (isListOfFile(templates)) { - for (int i = 0; i < getListSize(templates); i++) { - map.put("templates[" + i + "]", getFromList(templates, i)); - } - } else { - map.put( - "templates", - JSON.getDefault().getMapper().writeValueAsString(templates)); - } - } - if (listInfo != null) { - if (isFileTypeOrListOfFiles(listInfo)) { - fileTypeFound = true; - } - - if (listInfo.getClass().equals(java.io.File.class) - || listInfo.getClass().equals(Integer.class) - || listInfo.getClass().equals(String.class) - || listInfo.getClass().isEnum()) { - map.put("list_info", listInfo); - } else if (isListOfFile(listInfo)) { - for (int i = 0; i < getListSize(listInfo); i++) { - map.put("list_info[" + i + "]", getFromList(listInfo, i)); - } - } else { - map.put( - "list_info", - JSON.getDefault().getMapper().writeValueAsString(listInfo)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java deleted file mode 100644 index 28d04e064..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateRemoveUserRequest */ -@JsonPropertyOrder({ - TemplateRemoveUserRequest.JSON_PROPERTY_ACCOUNT_ID, - TemplateRemoveUserRequest.JSON_PROPERTY_EMAIL_ADDRESS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateRemoveUserRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public TemplateRemoveUserRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateRemoveUserRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateRemoveUserRequest.class); - } - - public static TemplateRemoveUserRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateRemoveUserRequest.class); - } - - public TemplateRemoveUserRequest accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The id or email address of the Account to remove access to the Template. The account id - * prevails if both are provided. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TemplateRemoveUserRequest emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The id or email address of the Account to remove access to the Template. The account id - * prevails if both are provided. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - /** Return true if this TemplateRemoveUserRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateRemoveUserRequest templateRemoveUserRequest = (TemplateRemoveUserRequest) o; - return Objects.equals(this.accountId, templateRemoveUserRequest.accountId) - && Objects.equals(this.emailAddress, templateRemoveUserRequest.emailAddress); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateRemoveUserRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java deleted file mode 100644 index fde4151d3..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ /dev/null @@ -1,987 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains information about the templates you and your team have created. */ -@JsonPropertyOrder({ - TemplateResponse.JSON_PROPERTY_TEMPLATE_ID, - TemplateResponse.JSON_PROPERTY_TITLE, - TemplateResponse.JSON_PROPERTY_MESSAGE, - TemplateResponse.JSON_PROPERTY_UPDATED_AT, - TemplateResponse.JSON_PROPERTY_IS_EMBEDDED, - TemplateResponse.JSON_PROPERTY_IS_CREATOR, - TemplateResponse.JSON_PROPERTY_CAN_EDIT, - TemplateResponse.JSON_PROPERTY_IS_LOCKED, - TemplateResponse.JSON_PROPERTY_METADATA, - TemplateResponse.JSON_PROPERTY_SIGNER_ROLES, - TemplateResponse.JSON_PROPERTY_CC_ROLES, - TemplateResponse.JSON_PROPERTY_DOCUMENTS, - TemplateResponse.JSON_PROPERTY_CUSTOM_FIELDS, - TemplateResponse.JSON_PROPERTY_NAMED_FORM_FIELDS, - TemplateResponse.JSON_PROPERTY_ACCOUNTS, - TemplateResponse.JSON_PROPERTY_ATTACHMENTS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponse { - public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; - - public static final String JSON_PROPERTY_IS_EMBEDDED = "is_embedded"; - private Boolean isEmbedded; - - public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; - - public static final String JSON_PROPERTY_CAN_EDIT = "can_edit"; - private Boolean canEdit; - - public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; - - public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; - - public static final String JSON_PROPERTY_DOCUMENTS = "documents"; - private List documents = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - @Deprecated private List customFields = null; - - public static final String JSON_PROPERTY_NAMED_FORM_FIELDS = "named_form_fields"; - @Deprecated private List namedFormFields = null; - - public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public TemplateResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponse.class); - } - - public static TemplateResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), TemplateResponse.class); - } - - public TemplateResponse templateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * The id of the Template. - * - * @return templateId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTemplateId() { - return templateId; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - public TemplateResponse title(String title) { - this.title = title; - return this; - } - - /** - * The title of the Template. This will also be the default subject of the message sent to - * signers when using this Template to send a SignatureRequest. This can be overridden when - * sending the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public TemplateResponse message(String message) { - this.message = message; - return this; - } - - /** - * The default message that will be sent to signers when using this Template to send a - * SignatureRequest. This can be overridden when sending the SignatureRequest. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public TemplateResponse updatedAt(Integer updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * Time the template was last updated. - * - * @return updatedAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getUpdatedAt() { - return updatedAt; - } - - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { - this.updatedAt = updatedAt; - } - - public TemplateResponse isEmbedded(Boolean isEmbedded) { - this.isEmbedded = isEmbedded; - return this; - } - - /** - * `true` if this template was created using an embedded flow, `false` if it - * was created on our website. Will be `null` when you are not the creator of the - * Template. - * - * @return isEmbedded - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEmbedded() { - return isEmbedded; - } - - @JsonProperty(JSON_PROPERTY_IS_EMBEDDED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEmbedded(Boolean isEmbedded) { - this.isEmbedded = isEmbedded; - } - - public TemplateResponse isCreator(Boolean isCreator) { - this.isCreator = isCreator; - return this; - } - - /** - * `true` if you are the owner of this template, `false` if it's been - * shared with you by a team member. - * - * @return isCreator - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsCreator() { - return isCreator; - } - - @JsonProperty(JSON_PROPERTY_IS_CREATOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { - this.isCreator = isCreator; - } - - public TemplateResponse canEdit(Boolean canEdit) { - this.canEdit = canEdit; - return this; - } - - /** - * Indicates whether edit rights have been granted to you by the owner (always `true` - * if that's you). - * - * @return canEdit - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CAN_EDIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getCanEdit() { - return canEdit; - } - - @JsonProperty(JSON_PROPERTY_CAN_EDIT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanEdit(Boolean canEdit) { - this.canEdit = canEdit; - } - - public TemplateResponse isLocked(Boolean isLocked) { - this.isLocked = isLocked; - return this; - } - - /** - * Indicates whether the template is locked. If `true`, then the template was created - * outside your quota and can only be used in `test_mode`. If `false`, then - * the template is within your quota and can be used to create signature requests. - * - * @return isLocked - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsLocked() { - return isLocked; - } - - @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { - this.isLocked = isLocked; - } - - public TemplateResponse metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public TemplateResponse putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * The metadata attached to the template. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public TemplateResponse signerRoles(List signerRoles) { - this.signerRoles = signerRoles; - return this; - } - - public TemplateResponse addSignerRolesItem(TemplateResponseSignerRole signerRolesItem) { - if (this.signerRoles == null) { - this.signerRoles = new ArrayList<>(); - } - this.signerRoles.add(signerRolesItem); - return this; - } - - /** - * An array of the designated signer roles that must be specified when sending a - * SignatureRequest using this Template. - * - * @return signerRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSignerRoles() { - return signerRoles; - } - - @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { - this.signerRoles = signerRoles; - } - - public TemplateResponse ccRoles(List ccRoles) { - this.ccRoles = ccRoles; - return this; - } - - public TemplateResponse addCcRolesItem(TemplateResponseCCRole ccRolesItem) { - if (this.ccRoles == null) { - this.ccRoles = new ArrayList<>(); - } - this.ccRoles.add(ccRolesItem); - return this; - } - - /** - * An array of the designated CC roles that must be specified when sending a SignatureRequest - * using this Template. - * - * @return ccRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcRoles() { - return ccRoles; - } - - @JsonProperty(JSON_PROPERTY_CC_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { - this.ccRoles = ccRoles; - } - - public TemplateResponse documents(List documents) { - this.documents = documents; - return this; - } - - public TemplateResponse addDocumentsItem(TemplateResponseDocument documentsItem) { - if (this.documents == null) { - this.documents = new ArrayList<>(); - } - this.documents.add(documentsItem); - return this; - } - - /** - * An array describing each document associated with this Template. Includes form field data for - * each document. - * - * @return documents - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOCUMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDocuments() { - return documents; - } - - @JsonProperty(JSON_PROPERTY_DOCUMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocuments(List documents) { - this.documents = documents; - } - - @Deprecated - public TemplateResponse customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public TemplateResponse addCustomFieldsItem( - TemplateResponseDocumentCustomFieldBase customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * Deprecated. Use `custom_fields` inside the - * [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) - * array instead. - * - * @return customFields - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - @Deprecated - public TemplateResponse namedFormFields( - List namedFormFields) { - this.namedFormFields = namedFormFields; - return this; - } - - public TemplateResponse addNamedFormFieldsItem( - TemplateResponseDocumentFormFieldBase namedFormFieldsItem) { - if (this.namedFormFields == null) { - this.namedFormFields = new ArrayList<>(); - } - this.namedFormFields.add(namedFormFieldsItem); - return this; - } - - /** - * Deprecated. Use `form_fields` inside the - * [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) - * array instead. - * - * @return namedFormFields - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAMED_FORM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getNamedFormFields() { - return namedFormFields; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_NAMED_FORM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamedFormFields(List namedFormFields) { - this.namedFormFields = namedFormFields; - } - - public TemplateResponse accounts(List accounts) { - this.accounts = accounts; - return this; - } - - public TemplateResponse addAccountsItem(TemplateResponseAccount accountsItem) { - if (this.accounts == null) { - this.accounts = new ArrayList<>(); - } - this.accounts.add(accountsItem); - return this; - } - - /** - * An array of the Accounts that can use this Template. - * - * @return accounts - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAccounts() { - return accounts; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { - this.accounts = accounts; - } - - public TemplateResponse attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public TemplateResponse addAttachmentsItem(SignatureRequestResponseAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * Signer attachments. - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - /** Return true if this TemplateResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponse templateResponse = (TemplateResponse) o; - return Objects.equals(this.templateId, templateResponse.templateId) - && Objects.equals(this.title, templateResponse.title) - && Objects.equals(this.message, templateResponse.message) - && Objects.equals(this.updatedAt, templateResponse.updatedAt) - && Objects.equals(this.isEmbedded, templateResponse.isEmbedded) - && Objects.equals(this.isCreator, templateResponse.isCreator) - && Objects.equals(this.canEdit, templateResponse.canEdit) - && Objects.equals(this.isLocked, templateResponse.isLocked) - && Objects.equals(this.metadata, templateResponse.metadata) - && Objects.equals(this.signerRoles, templateResponse.signerRoles) - && Objects.equals(this.ccRoles, templateResponse.ccRoles) - && Objects.equals(this.documents, templateResponse.documents) - && Objects.equals(this.customFields, templateResponse.customFields) - && Objects.equals(this.namedFormFields, templateResponse.namedFormFields) - && Objects.equals(this.accounts, templateResponse.accounts) - && Objects.equals(this.attachments, templateResponse.attachments); - } - - @Override - public int hashCode() { - return Objects.hash( - templateId, - title, - message, - updatedAt, - isEmbedded, - isCreator, - canEdit, - isLocked, - metadata, - signerRoles, - ccRoles, - documents, - customFields, - namedFormFields, - accounts, - attachments); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponse {\n"); - sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" isEmbedded: ").append(toIndentedString(isEmbedded)).append("\n"); - sb.append(" isCreator: ").append(toIndentedString(isCreator)).append("\n"); - sb.append(" canEdit: ").append(toIndentedString(canEdit)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" signerRoles: ").append(toIndentedString(signerRoles)).append("\n"); - sb.append(" ccRoles: ").append(toIndentedString(ccRoles)).append("\n"); - sb.append(" documents: ").append(toIndentedString(documents)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" namedFormFields: ").append(toIndentedString(namedFormFields)).append("\n"); - sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateId != null) { - if (isFileTypeOrListOfFiles(templateId)) { - fileTypeFound = true; - } - - if (templateId.getClass().equals(java.io.File.class) - || templateId.getClass().equals(Integer.class) - || templateId.getClass().equals(String.class) - || templateId.getClass().isEnum()) { - map.put("template_id", templateId); - } else if (isListOfFile(templateId)) { - for (int i = 0; i < getListSize(templateId); i++) { - map.put("template_id[" + i + "]", getFromList(templateId, i)); - } - } else { - map.put( - "template_id", - JSON.getDefault().getMapper().writeValueAsString(templateId)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (updatedAt != null) { - if (isFileTypeOrListOfFiles(updatedAt)) { - fileTypeFound = true; - } - - if (updatedAt.getClass().equals(java.io.File.class) - || updatedAt.getClass().equals(Integer.class) - || updatedAt.getClass().equals(String.class) - || updatedAt.getClass().isEnum()) { - map.put("updated_at", updatedAt); - } else if (isListOfFile(updatedAt)) { - for (int i = 0; i < getListSize(updatedAt); i++) { - map.put("updated_at[" + i + "]", getFromList(updatedAt, i)); - } - } else { - map.put( - "updated_at", - JSON.getDefault().getMapper().writeValueAsString(updatedAt)); - } - } - if (isEmbedded != null) { - if (isFileTypeOrListOfFiles(isEmbedded)) { - fileTypeFound = true; - } - - if (isEmbedded.getClass().equals(java.io.File.class) - || isEmbedded.getClass().equals(Integer.class) - || isEmbedded.getClass().equals(String.class) - || isEmbedded.getClass().isEnum()) { - map.put("is_embedded", isEmbedded); - } else if (isListOfFile(isEmbedded)) { - for (int i = 0; i < getListSize(isEmbedded); i++) { - map.put("is_embedded[" + i + "]", getFromList(isEmbedded, i)); - } - } else { - map.put( - "is_embedded", - JSON.getDefault().getMapper().writeValueAsString(isEmbedded)); - } - } - if (isCreator != null) { - if (isFileTypeOrListOfFiles(isCreator)) { - fileTypeFound = true; - } - - if (isCreator.getClass().equals(java.io.File.class) - || isCreator.getClass().equals(Integer.class) - || isCreator.getClass().equals(String.class) - || isCreator.getClass().isEnum()) { - map.put("is_creator", isCreator); - } else if (isListOfFile(isCreator)) { - for (int i = 0; i < getListSize(isCreator); i++) { - map.put("is_creator[" + i + "]", getFromList(isCreator, i)); - } - } else { - map.put( - "is_creator", - JSON.getDefault().getMapper().writeValueAsString(isCreator)); - } - } - if (canEdit != null) { - if (isFileTypeOrListOfFiles(canEdit)) { - fileTypeFound = true; - } - - if (canEdit.getClass().equals(java.io.File.class) - || canEdit.getClass().equals(Integer.class) - || canEdit.getClass().equals(String.class) - || canEdit.getClass().isEnum()) { - map.put("can_edit", canEdit); - } else if (isListOfFile(canEdit)) { - for (int i = 0; i < getListSize(canEdit); i++) { - map.put("can_edit[" + i + "]", getFromList(canEdit, i)); - } - } else { - map.put("can_edit", JSON.getDefault().getMapper().writeValueAsString(canEdit)); - } - } - if (isLocked != null) { - if (isFileTypeOrListOfFiles(isLocked)) { - fileTypeFound = true; - } - - if (isLocked.getClass().equals(java.io.File.class) - || isLocked.getClass().equals(Integer.class) - || isLocked.getClass().equals(String.class) - || isLocked.getClass().isEnum()) { - map.put("is_locked", isLocked); - } else if (isListOfFile(isLocked)) { - for (int i = 0; i < getListSize(isLocked); i++) { - map.put("is_locked[" + i + "]", getFromList(isLocked, i)); - } - } else { - map.put( - "is_locked", - JSON.getDefault().getMapper().writeValueAsString(isLocked)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (signerRoles != null) { - if (isFileTypeOrListOfFiles(signerRoles)) { - fileTypeFound = true; - } - - if (signerRoles.getClass().equals(java.io.File.class) - || signerRoles.getClass().equals(Integer.class) - || signerRoles.getClass().equals(String.class) - || signerRoles.getClass().isEnum()) { - map.put("signer_roles", signerRoles); - } else if (isListOfFile(signerRoles)) { - for (int i = 0; i < getListSize(signerRoles); i++) { - map.put("signer_roles[" + i + "]", getFromList(signerRoles, i)); - } - } else { - map.put( - "signer_roles", - JSON.getDefault().getMapper().writeValueAsString(signerRoles)); - } - } - if (ccRoles != null) { - if (isFileTypeOrListOfFiles(ccRoles)) { - fileTypeFound = true; - } - - if (ccRoles.getClass().equals(java.io.File.class) - || ccRoles.getClass().equals(Integer.class) - || ccRoles.getClass().equals(String.class) - || ccRoles.getClass().isEnum()) { - map.put("cc_roles", ccRoles); - } else if (isListOfFile(ccRoles)) { - for (int i = 0; i < getListSize(ccRoles); i++) { - map.put("cc_roles[" + i + "]", getFromList(ccRoles, i)); - } - } else { - map.put("cc_roles", JSON.getDefault().getMapper().writeValueAsString(ccRoles)); - } - } - if (documents != null) { - if (isFileTypeOrListOfFiles(documents)) { - fileTypeFound = true; - } - - if (documents.getClass().equals(java.io.File.class) - || documents.getClass().equals(Integer.class) - || documents.getClass().equals(String.class) - || documents.getClass().isEnum()) { - map.put("documents", documents); - } else if (isListOfFile(documents)) { - for (int i = 0; i < getListSize(documents); i++) { - map.put("documents[" + i + "]", getFromList(documents, i)); - } - } else { - map.put( - "documents", - JSON.getDefault().getMapper().writeValueAsString(documents)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (namedFormFields != null) { - if (isFileTypeOrListOfFiles(namedFormFields)) { - fileTypeFound = true; - } - - if (namedFormFields.getClass().equals(java.io.File.class) - || namedFormFields.getClass().equals(Integer.class) - || namedFormFields.getClass().equals(String.class) - || namedFormFields.getClass().isEnum()) { - map.put("named_form_fields", namedFormFields); - } else if (isListOfFile(namedFormFields)) { - for (int i = 0; i < getListSize(namedFormFields); i++) { - map.put("named_form_fields[" + i + "]", getFromList(namedFormFields, i)); - } - } else { - map.put( - "named_form_fields", - JSON.getDefault().getMapper().writeValueAsString(namedFormFields)); - } - } - if (accounts != null) { - if (isFileTypeOrListOfFiles(accounts)) { - fileTypeFound = true; - } - - if (accounts.getClass().equals(java.io.File.class) - || accounts.getClass().equals(Integer.class) - || accounts.getClass().equals(String.class) - || accounts.getClass().isEnum()) { - map.put("accounts", accounts); - } else if (isListOfFile(accounts)) { - for (int i = 0; i < getListSize(accounts); i++) { - map.put("accounts[" + i + "]", getFromList(accounts, i)); - } - } else { - map.put("accounts", JSON.getDefault().getMapper().writeValueAsString(accounts)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java deleted file mode 100644 index 901e4be34..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateResponseAccount */ -@JsonPropertyOrder({ - TemplateResponseAccount.JSON_PROPERTY_ACCOUNT_ID, - TemplateResponseAccount.JSON_PROPERTY_EMAIL_ADDRESS, - TemplateResponseAccount.JSON_PROPERTY_IS_LOCKED, - TemplateResponseAccount.JSON_PROPERTY_IS_PAID_HS, - TemplateResponseAccount.JSON_PROPERTY_IS_PAID_HF, - TemplateResponseAccount.JSON_PROPERTY_QUOTAS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseAccount { - public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; - - public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; - - public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; - - public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; - - public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; - - public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private TemplateResponseAccountQuota quotas; - - public TemplateResponseAccount() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseAccount init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseAccount.class); - } - - public static TemplateResponseAccount init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TemplateResponseAccount.class); - } - - public TemplateResponseAccount accountId(String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The id of the Account. - * - * @return accountId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public TemplateResponseAccount emailAddress(String emailAddress) { - this.emailAddress = emailAddress; - return this; - } - - /** - * The email address associated with the Account. - * - * @return emailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEmailAddress() { - return emailAddress; - } - - @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { - this.emailAddress = emailAddress; - } - - public TemplateResponseAccount isLocked(Boolean isLocked) { - this.isLocked = isLocked; - return this; - } - - /** - * Returns `true` if the user has been locked out of their account by a team admin. - * - * @return isLocked - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsLocked() { - return isLocked; - } - - @JsonProperty(JSON_PROPERTY_IS_LOCKED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { - this.isLocked = isLocked; - } - - public TemplateResponseAccount isPaidHs(Boolean isPaidHs) { - this.isPaidHs = isPaidHs; - return this; - } - - /** - * Returns `true` if the user has a paid Dropbox Sign account. - * - * @return isPaidHs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_PAID_HS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPaidHs() { - return isPaidHs; - } - - @JsonProperty(JSON_PROPERTY_IS_PAID_HS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { - this.isPaidHs = isPaidHs; - } - - public TemplateResponseAccount isPaidHf(Boolean isPaidHf) { - this.isPaidHf = isPaidHf; - return this; - } - - /** - * Returns `true` if the user has a paid HelloFax account. - * - * @return isPaidHf - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_PAID_HF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsPaidHf() { - return isPaidHf; - } - - @JsonProperty(JSON_PROPERTY_IS_PAID_HF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { - this.isPaidHf = isPaidHf; - } - - public TemplateResponseAccount quotas(TemplateResponseAccountQuota quotas) { - this.quotas = quotas; - return this; - } - - /** - * Get quotas - * - * @return quotas - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_QUOTAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponseAccountQuota getQuotas() { - return quotas; - } - - @JsonProperty(JSON_PROPERTY_QUOTAS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(TemplateResponseAccountQuota quotas) { - this.quotas = quotas; - } - - /** Return true if this TemplateResponseAccount object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseAccount templateResponseAccount = (TemplateResponseAccount) o; - return Objects.equals(this.accountId, templateResponseAccount.accountId) - && Objects.equals(this.emailAddress, templateResponseAccount.emailAddress) - && Objects.equals(this.isLocked, templateResponseAccount.isLocked) - && Objects.equals(this.isPaidHs, templateResponseAccount.isPaidHs) - && Objects.equals(this.isPaidHf, templateResponseAccount.isPaidHf) - && Objects.equals(this.quotas, templateResponseAccount.quotas); - } - - @Override - public int hashCode() { - return Objects.hash(accountId, emailAddress, isLocked, isPaidHs, isPaidHf, quotas); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseAccount {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" emailAddress: ").append(toIndentedString(emailAddress)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" isPaidHs: ").append(toIndentedString(isPaidHs)).append("\n"); - sb.append(" isPaidHf: ").append(toIndentedString(isPaidHf)).append("\n"); - sb.append(" quotas: ").append(toIndentedString(quotas)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (accountId != null) { - if (isFileTypeOrListOfFiles(accountId)) { - fileTypeFound = true; - } - - if (accountId.getClass().equals(java.io.File.class) - || accountId.getClass().equals(Integer.class) - || accountId.getClass().equals(String.class) - || accountId.getClass().isEnum()) { - map.put("account_id", accountId); - } else if (isListOfFile(accountId)) { - for (int i = 0; i < getListSize(accountId); i++) { - map.put("account_id[" + i + "]", getFromList(accountId, i)); - } - } else { - map.put( - "account_id", - JSON.getDefault().getMapper().writeValueAsString(accountId)); - } - } - if (emailAddress != null) { - if (isFileTypeOrListOfFiles(emailAddress)) { - fileTypeFound = true; - } - - if (emailAddress.getClass().equals(java.io.File.class) - || emailAddress.getClass().equals(Integer.class) - || emailAddress.getClass().equals(String.class) - || emailAddress.getClass().isEnum()) { - map.put("email_address", emailAddress); - } else if (isListOfFile(emailAddress)) { - for (int i = 0; i < getListSize(emailAddress); i++) { - map.put("email_address[" + i + "]", getFromList(emailAddress, i)); - } - } else { - map.put( - "email_address", - JSON.getDefault().getMapper().writeValueAsString(emailAddress)); - } - } - if (isLocked != null) { - if (isFileTypeOrListOfFiles(isLocked)) { - fileTypeFound = true; - } - - if (isLocked.getClass().equals(java.io.File.class) - || isLocked.getClass().equals(Integer.class) - || isLocked.getClass().equals(String.class) - || isLocked.getClass().isEnum()) { - map.put("is_locked", isLocked); - } else if (isListOfFile(isLocked)) { - for (int i = 0; i < getListSize(isLocked); i++) { - map.put("is_locked[" + i + "]", getFromList(isLocked, i)); - } - } else { - map.put( - "is_locked", - JSON.getDefault().getMapper().writeValueAsString(isLocked)); - } - } - if (isPaidHs != null) { - if (isFileTypeOrListOfFiles(isPaidHs)) { - fileTypeFound = true; - } - - if (isPaidHs.getClass().equals(java.io.File.class) - || isPaidHs.getClass().equals(Integer.class) - || isPaidHs.getClass().equals(String.class) - || isPaidHs.getClass().isEnum()) { - map.put("is_paid_hs", isPaidHs); - } else if (isListOfFile(isPaidHs)) { - for (int i = 0; i < getListSize(isPaidHs); i++) { - map.put("is_paid_hs[" + i + "]", getFromList(isPaidHs, i)); - } - } else { - map.put( - "is_paid_hs", - JSON.getDefault().getMapper().writeValueAsString(isPaidHs)); - } - } - if (isPaidHf != null) { - if (isFileTypeOrListOfFiles(isPaidHf)) { - fileTypeFound = true; - } - - if (isPaidHf.getClass().equals(java.io.File.class) - || isPaidHf.getClass().equals(Integer.class) - || isPaidHf.getClass().equals(String.class) - || isPaidHf.getClass().isEnum()) { - map.put("is_paid_hf", isPaidHf); - } else if (isListOfFile(isPaidHf)) { - for (int i = 0; i < getListSize(isPaidHf); i++) { - map.put("is_paid_hf[" + i + "]", getFromList(isPaidHf, i)); - } - } else { - map.put( - "is_paid_hf", - JSON.getDefault().getMapper().writeValueAsString(isPaidHf)); - } - } - if (quotas != null) { - if (isFileTypeOrListOfFiles(quotas)) { - fileTypeFound = true; - } - - if (quotas.getClass().equals(java.io.File.class) - || quotas.getClass().equals(Integer.class) - || quotas.getClass().equals(String.class) - || quotas.getClass().isEnum()) { - map.put("quotas", quotas); - } else if (isListOfFile(quotas)) { - for (int i = 0; i < getListSize(quotas); i++) { - map.put("quotas[" + i + "]", getFromList(quotas, i)); - } - } else { - map.put("quotas", JSON.getDefault().getMapper().writeValueAsString(quotas)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java deleted file mode 100644 index 0ebdbe2a4..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * An array of the designated CC roles that must be specified when sending a SignatureRequest using - * this Template. - */ -@JsonPropertyOrder({ - TemplateResponseAccountQuota.JSON_PROPERTY_TEMPLATES_LEFT, - TemplateResponseAccountQuota.JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT, - TemplateResponseAccountQuota.JSON_PROPERTY_DOCUMENTS_LEFT, - TemplateResponseAccountQuota.JSON_PROPERTY_SMS_VERIFICATIONS_LEFT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseAccountQuota { - public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; - - public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = - "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; - - public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; - - public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; - - public TemplateResponseAccountQuota() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseAccountQuota init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseAccountQuota.class); - } - - public static TemplateResponseAccountQuota init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseAccountQuota.class); - } - - public TemplateResponseAccountQuota templatesLeft(Integer templatesLeft) { - this.templatesLeft = templatesLeft; - return this; - } - - /** - * API templates remaining. - * - * @return templatesLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getTemplatesLeft() { - return templatesLeft; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { - this.templatesLeft = templatesLeft; - } - - public TemplateResponseAccountQuota apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { - this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; - return this; - } - - /** - * API signature requests remaining. - * - * @return apiSignatureRequestsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getApiSignatureRequestsLeft() { - return apiSignatureRequestsLeft; - } - - @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { - this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; - } - - public TemplateResponseAccountQuota documentsLeft(Integer documentsLeft) { - this.documentsLeft = documentsLeft; - return this; - } - - /** - * Signature requests remaining. - * - * @return documentsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getDocumentsLeft() { - return documentsLeft; - } - - @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { - this.documentsLeft = documentsLeft; - } - - public TemplateResponseAccountQuota smsVerificationsLeft(Integer smsVerificationsLeft) { - this.smsVerificationsLeft = smsVerificationsLeft; - return this; - } - - /** - * SMS verifications remaining. - * - * @return smsVerificationsLeft - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getSmsVerificationsLeft() { - return smsVerificationsLeft; - } - - @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { - this.smsVerificationsLeft = smsVerificationsLeft; - } - - /** Return true if this TemplateResponseAccountQuota object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseAccountQuota templateResponseAccountQuota = - (TemplateResponseAccountQuota) o; - return Objects.equals(this.templatesLeft, templateResponseAccountQuota.templatesLeft) - && Objects.equals( - this.apiSignatureRequestsLeft, - templateResponseAccountQuota.apiSignatureRequestsLeft) - && Objects.equals(this.documentsLeft, templateResponseAccountQuota.documentsLeft) - && Objects.equals( - this.smsVerificationsLeft, - templateResponseAccountQuota.smsVerificationsLeft); - } - - @Override - public int hashCode() { - return Objects.hash( - templatesLeft, apiSignatureRequestsLeft, documentsLeft, smsVerificationsLeft); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseAccountQuota {\n"); - sb.append(" templatesLeft: ").append(toIndentedString(templatesLeft)).append("\n"); - sb.append(" apiSignatureRequestsLeft: ") - .append(toIndentedString(apiSignatureRequestsLeft)) - .append("\n"); - sb.append(" documentsLeft: ").append(toIndentedString(documentsLeft)).append("\n"); - sb.append(" smsVerificationsLeft: ") - .append(toIndentedString(smsVerificationsLeft)) - .append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templatesLeft != null) { - if (isFileTypeOrListOfFiles(templatesLeft)) { - fileTypeFound = true; - } - - if (templatesLeft.getClass().equals(java.io.File.class) - || templatesLeft.getClass().equals(Integer.class) - || templatesLeft.getClass().equals(String.class) - || templatesLeft.getClass().isEnum()) { - map.put("templates_left", templatesLeft); - } else if (isListOfFile(templatesLeft)) { - for (int i = 0; i < getListSize(templatesLeft); i++) { - map.put("templates_left[" + i + "]", getFromList(templatesLeft, i)); - } - } else { - map.put( - "templates_left", - JSON.getDefault().getMapper().writeValueAsString(templatesLeft)); - } - } - if (apiSignatureRequestsLeft != null) { - if (isFileTypeOrListOfFiles(apiSignatureRequestsLeft)) { - fileTypeFound = true; - } - - if (apiSignatureRequestsLeft.getClass().equals(java.io.File.class) - || apiSignatureRequestsLeft.getClass().equals(Integer.class) - || apiSignatureRequestsLeft.getClass().equals(String.class) - || apiSignatureRequestsLeft.getClass().isEnum()) { - map.put("api_signature_requests_left", apiSignatureRequestsLeft); - } else if (isListOfFile(apiSignatureRequestsLeft)) { - for (int i = 0; i < getListSize(apiSignatureRequestsLeft); i++) { - map.put( - "api_signature_requests_left[" + i + "]", - getFromList(apiSignatureRequestsLeft, i)); - } - } else { - map.put( - "api_signature_requests_left", - JSON.getDefault() - .getMapper() - .writeValueAsString(apiSignatureRequestsLeft)); - } - } - if (documentsLeft != null) { - if (isFileTypeOrListOfFiles(documentsLeft)) { - fileTypeFound = true; - } - - if (documentsLeft.getClass().equals(java.io.File.class) - || documentsLeft.getClass().equals(Integer.class) - || documentsLeft.getClass().equals(String.class) - || documentsLeft.getClass().isEnum()) { - map.put("documents_left", documentsLeft); - } else if (isListOfFile(documentsLeft)) { - for (int i = 0; i < getListSize(documentsLeft); i++) { - map.put("documents_left[" + i + "]", getFromList(documentsLeft, i)); - } - } else { - map.put( - "documents_left", - JSON.getDefault().getMapper().writeValueAsString(documentsLeft)); - } - } - if (smsVerificationsLeft != null) { - if (isFileTypeOrListOfFiles(smsVerificationsLeft)) { - fileTypeFound = true; - } - - if (smsVerificationsLeft.getClass().equals(java.io.File.class) - || smsVerificationsLeft.getClass().equals(Integer.class) - || smsVerificationsLeft.getClass().equals(String.class) - || smsVerificationsLeft.getClass().isEnum()) { - map.put("sms_verifications_left", smsVerificationsLeft); - } else if (isListOfFile(smsVerificationsLeft)) { - for (int i = 0; i < getListSize(smsVerificationsLeft); i++) { - map.put( - "sms_verifications_left[" + i + "]", - getFromList(smsVerificationsLeft, i)); - } - } else { - map.put( - "sms_verifications_left", - JSON.getDefault().getMapper().writeValueAsString(smsVerificationsLeft)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java deleted file mode 100644 index e4a7d7377..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateResponseCCRole */ -@JsonPropertyOrder({TemplateResponseCCRole.JSON_PROPERTY_NAME}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseCCRole { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public TemplateResponseCCRole() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseCCRole init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseCCRole.class); - } - - public static TemplateResponseCCRole init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), TemplateResponseCCRole.class); - } - - public TemplateResponseCCRole name(String name) { - this.name = name; - return this; - } - - /** - * The name of the Role. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - /** Return true if this TemplateResponseCCRole object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseCCRole templateResponseCCRole = (TemplateResponseCCRole) o; - return Objects.equals(this.name, templateResponseCCRole.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseCCRole {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java deleted file mode 100644 index de32fb5ac..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateResponseDocument */ -@JsonPropertyOrder({ - TemplateResponseDocument.JSON_PROPERTY_NAME, - TemplateResponseDocument.JSON_PROPERTY_INDEX, - TemplateResponseDocument.JSON_PROPERTY_FIELD_GROUPS, - TemplateResponseDocument.JSON_PROPERTY_FORM_FIELDS, - TemplateResponseDocument.JSON_PROPERTY_CUSTOM_FIELDS, - TemplateResponseDocument.JSON_PROPERTY_STATIC_FIELDS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseDocument { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_INDEX = "index"; - private Integer index; - - public static final String JSON_PROPERTY_FIELD_GROUPS = "field_groups"; - private List fieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; - private List formFields = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_STATIC_FIELDS = "static_fields"; - private List staticFields = null; - - public TemplateResponseDocument() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocument init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocument.class); - } - - public static TemplateResponseDocument init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocument.class); - } - - public TemplateResponseDocument name(String name) { - this.name = name; - return this; - } - - /** - * Name of the associated file. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseDocument index(Integer index) { - this.index = index; - return this; - } - - /** - * Document ordering, the lowest index is displayed first and the highest last (0-based - * indexing). - * - * @return index - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getIndex() { - return index; - } - - @JsonProperty(JSON_PROPERTY_INDEX) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndex(Integer index) { - this.index = index; - } - - public TemplateResponseDocument fieldGroups( - List fieldGroups) { - this.fieldGroups = fieldGroups; - return this; - } - - public TemplateResponseDocument addFieldGroupsItem( - TemplateResponseDocumentFieldGroup fieldGroupsItem) { - if (this.fieldGroups == null) { - this.fieldGroups = new ArrayList<>(); - } - this.fieldGroups.add(fieldGroupsItem); - return this; - } - - /** - * An array of Form Field Group objects. - * - * @return fieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFieldGroups() { - return fieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldGroups(List fieldGroups) { - this.fieldGroups = fieldGroups; - } - - public TemplateResponseDocument formFields( - List formFields) { - this.formFields = formFields; - return this; - } - - public TemplateResponseDocument addFormFieldsItem( - TemplateResponseDocumentFormFieldBase formFieldsItem) { - if (this.formFields == null) { - this.formFields = new ArrayList<>(); - } - this.formFields.add(formFieldsItem); - return this; - } - - /** - * An array of Form Field objects containing the name and type of each named field. - * - * @return formFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFields() { - return formFields; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFields(List formFields) { - this.formFields = formFields; - } - - public TemplateResponseDocument customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public TemplateResponseDocument addCustomFieldsItem( - TemplateResponseDocumentCustomFieldBase customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array of Form Field objects containing the name and type of each named field. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public TemplateResponseDocument staticFields( - List staticFields) { - this.staticFields = staticFields; - return this; - } - - public TemplateResponseDocument addStaticFieldsItem( - TemplateResponseDocumentStaticFieldBase staticFieldsItem) { - if (this.staticFields == null) { - this.staticFields = new ArrayList<>(); - } - this.staticFields.add(staticFieldsItem); - return this; - } - - /** - * An array describing static overlay fields. **NOTE:** Only available for certain - * subscriptions. - * - * @return staticFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_STATIC_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getStaticFields() { - return staticFields; - } - - @JsonProperty(JSON_PROPERTY_STATIC_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStaticFields(List staticFields) { - this.staticFields = staticFields; - } - - /** Return true if this TemplateResponseDocument object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocument templateResponseDocument = (TemplateResponseDocument) o; - return Objects.equals(this.name, templateResponseDocument.name) - && Objects.equals(this.index, templateResponseDocument.index) - && Objects.equals(this.fieldGroups, templateResponseDocument.fieldGroups) - && Objects.equals(this.formFields, templateResponseDocument.formFields) - && Objects.equals(this.customFields, templateResponseDocument.customFields) - && Objects.equals(this.staticFields, templateResponseDocument.staticFields); - } - - @Override - public int hashCode() { - return Objects.hash(name, index, fieldGroups, formFields, customFields, staticFields); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocument {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" index: ").append(toIndentedString(index)).append("\n"); - sb.append(" fieldGroups: ").append(toIndentedString(fieldGroups)).append("\n"); - sb.append(" formFields: ").append(toIndentedString(formFields)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" staticFields: ").append(toIndentedString(staticFields)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (index != null) { - if (isFileTypeOrListOfFiles(index)) { - fileTypeFound = true; - } - - if (index.getClass().equals(java.io.File.class) - || index.getClass().equals(Integer.class) - || index.getClass().equals(String.class) - || index.getClass().isEnum()) { - map.put("index", index); - } else if (isListOfFile(index)) { - for (int i = 0; i < getListSize(index); i++) { - map.put("index[" + i + "]", getFromList(index, i)); - } - } else { - map.put("index", JSON.getDefault().getMapper().writeValueAsString(index)); - } - } - if (fieldGroups != null) { - if (isFileTypeOrListOfFiles(fieldGroups)) { - fileTypeFound = true; - } - - if (fieldGroups.getClass().equals(java.io.File.class) - || fieldGroups.getClass().equals(Integer.class) - || fieldGroups.getClass().equals(String.class) - || fieldGroups.getClass().isEnum()) { - map.put("field_groups", fieldGroups); - } else if (isListOfFile(fieldGroups)) { - for (int i = 0; i < getListSize(fieldGroups); i++) { - map.put("field_groups[" + i + "]", getFromList(fieldGroups, i)); - } - } else { - map.put( - "field_groups", - JSON.getDefault().getMapper().writeValueAsString(fieldGroups)); - } - } - if (formFields != null) { - if (isFileTypeOrListOfFiles(formFields)) { - fileTypeFound = true; - } - - if (formFields.getClass().equals(java.io.File.class) - || formFields.getClass().equals(Integer.class) - || formFields.getClass().equals(String.class) - || formFields.getClass().isEnum()) { - map.put("form_fields", formFields); - } else if (isListOfFile(formFields)) { - for (int i = 0; i < getListSize(formFields); i++) { - map.put("form_fields[" + i + "]", getFromList(formFields, i)); - } - } else { - map.put( - "form_fields", - JSON.getDefault().getMapper().writeValueAsString(formFields)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (staticFields != null) { - if (isFileTypeOrListOfFiles(staticFields)) { - fileTypeFound = true; - } - - if (staticFields.getClass().equals(java.io.File.class) - || staticFields.getClass().equals(Integer.class) - || staticFields.getClass().equals(String.class) - || staticFields.getClass().isEnum()) { - map.put("static_fields", staticFields); - } else if (isListOfFile(staticFields)) { - for (int i = 0; i < getListSize(staticFields); i++) { - map.put("static_fields[" + i + "]", getFromList(staticFields, i)); - } - } else { - map.put( - "static_fields", - JSON.getDefault().getMapper().writeValueAsString(staticFields)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java deleted file mode 100644 index d6c0d010c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java +++ /dev/null @@ -1,623 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An array of Form Field objects containing the name and type of each named field. */ -@JsonPropertyOrder({ - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_TYPE, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_API_ID, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_NAME, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_SIGNER, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_X, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_Y, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_WIDTH, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_REQUIRED, - TemplateResponseDocumentCustomFieldBase.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type( - value = TemplateResponseDocumentCustomFieldCheckbox.class, - name = "checkbox"), - @JsonSubTypes.Type(value = TemplateResponseDocumentCustomFieldText.class, name = "text"), -}) -public class TemplateResponseDocumentCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; - - public static final String JSON_PROPERTY_X = "x"; - private Integer x; - - public static final String JSON_PROPERTY_Y = "y"; - private Integer y; - - public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; - - public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentCustomFieldBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentCustomFieldBase init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentCustomFieldBase.class); - } - - public static TemplateResponseDocumentCustomFieldBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentCustomFieldBase.class); - } - - public TemplateResponseDocumentCustomFieldBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentCustomFieldBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * The unique ID for this field. - * - * @return apiId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public TemplateResponseDocumentCustomFieldBase name(String name) { - this.name = name; - return this; - } - - /** - * The name of the Custom Field. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseDocumentCustomFieldBase signer(String signer) { - this.signer = signer; - return this; - } - - public TemplateResponseDocumentCustomFieldBase signer(Integer signer) { - this.signer = String.valueOf(signer); - return this; - } - - /** - * The signer of the Custom Field. Can be `null` if field is a merge field (assigned - * to Sender). - * - * @return signer - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigner() { - return signer; - } - - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { - this.signer = signer; - } - - public void setSigner(Integer signer) { - this.signer = String.valueOf(signer); - } - - public TemplateResponseDocumentCustomFieldBase x(Integer x) { - this.x = x; - return this; - } - - /** - * The horizontal offset in pixels for this form field. - * - * @return x - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getX() { - return x; - } - - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { - this.x = x; - } - - public TemplateResponseDocumentCustomFieldBase y(Integer y) { - this.y = y; - return this; - } - - /** - * The vertical offset in pixels for this form field. - * - * @return y - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getY() { - return y; - } - - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { - this.y = y; - } - - public TemplateResponseDocumentCustomFieldBase width(Integer width) { - this.width = width; - return this; - } - - /** - * The width in pixels of this form field. - * - * @return width - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getWidth() { - return width; - } - - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { - this.width = width; - } - - public TemplateResponseDocumentCustomFieldBase height(Integer height) { - this.height = height; - return this; - } - - /** - * The height in pixels of this form field. - * - * @return height - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getHeight() { - return height; - } - - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { - this.height = height; - } - - public TemplateResponseDocumentCustomFieldBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * Boolean showing whether or not this field is required. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - public TemplateResponseDocumentCustomFieldBase group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null`. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentCustomFieldBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentCustomFieldBase templateResponseDocumentCustomFieldBase = - (TemplateResponseDocumentCustomFieldBase) o; - return Objects.equals(this.type, templateResponseDocumentCustomFieldBase.type) - && Objects.equals(this.apiId, templateResponseDocumentCustomFieldBase.apiId) - && Objects.equals(this.name, templateResponseDocumentCustomFieldBase.name) - && Objects.equals(this.signer, templateResponseDocumentCustomFieldBase.signer) - && Objects.equals(this.x, templateResponseDocumentCustomFieldBase.x) - && Objects.equals(this.y, templateResponseDocumentCustomFieldBase.y) - && Objects.equals(this.width, templateResponseDocumentCustomFieldBase.width) - && Objects.equals(this.height, templateResponseDocumentCustomFieldBase.height) - && Objects.equals(this.required, templateResponseDocumentCustomFieldBase.required) - && Objects.equals(this.group, templateResponseDocumentCustomFieldBase.group); - } - - @Override - public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required, group); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentCustomFieldBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); - sb.append(" x: ").append(toIndentedString(x)).append("\n"); - sb.append(" y: ").append(toIndentedString(y)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (signer != null) { - if (isFileTypeOrListOfFiles(signer)) { - fileTypeFound = true; - } - - if (signer.getClass().equals(java.io.File.class) - || signer.getClass().equals(Integer.class) - || signer.getClass().equals(String.class) - || signer.getClass().isEnum()) { - map.put("signer", signer); - } else if (isListOfFile(signer)) { - for (int i = 0; i < getListSize(signer); i++) { - map.put("signer[" + i + "]", getFromList(signer, i)); - } - } else { - map.put("signer", JSON.getDefault().getMapper().writeValueAsString(signer)); - } - } - if (x != null) { - if (isFileTypeOrListOfFiles(x)) { - fileTypeFound = true; - } - - if (x.getClass().equals(java.io.File.class) - || x.getClass().equals(Integer.class) - || x.getClass().equals(String.class) - || x.getClass().isEnum()) { - map.put("x", x); - } else if (isListOfFile(x)) { - for (int i = 0; i < getListSize(x); i++) { - map.put("x[" + i + "]", getFromList(x, i)); - } - } else { - map.put("x", JSON.getDefault().getMapper().writeValueAsString(x)); - } - } - if (y != null) { - if (isFileTypeOrListOfFiles(y)) { - fileTypeFound = true; - } - - if (y.getClass().equals(java.io.File.class) - || y.getClass().equals(Integer.class) - || y.getClass().equals(String.class) - || y.getClass().isEnum()) { - map.put("y", y); - } else if (isListOfFile(y)) { - for (int i = 0; i < getListSize(y); i++) { - map.put("y[" + i + "]", getFromList(y, i)); - } - } else { - map.put("y", JSON.getDefault().getMapper().writeValueAsString(y)); - } - } - if (width != null) { - if (isFileTypeOrListOfFiles(width)) { - fileTypeFound = true; - } - - if (width.getClass().equals(java.io.File.class) - || width.getClass().equals(Integer.class) - || width.getClass().equals(String.class) - || width.getClass().isEnum()) { - map.put("width", width); - } else if (isListOfFile(width)) { - for (int i = 0; i < getListSize(width); i++) { - map.put("width[" + i + "]", getFromList(width, i)); - } - } else { - map.put("width", JSON.getDefault().getMapper().writeValueAsString(width)); - } - } - if (height != null) { - if (isFileTypeOrListOfFiles(height)) { - fileTypeFound = true; - } - - if (height.getClass().equals(java.io.File.class) - || height.getClass().equals(Integer.class) - || height.getClass().equals(String.class) - || height.getClass().isEnum()) { - map.put("height", height); - } else if (isListOfFile(height)) { - for (int i = 0; i < getListSize(height); i++) { - map.put("height[" + i + "]", getFromList(height, i)); - } - } else { - map.put("height", JSON.getDefault().getMapper().writeValueAsString(height)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", TemplateResponseDocumentCustomFieldCheckbox.class); - mappings.put("text", TemplateResponseDocumentCustomFieldText.class); - mappings.put( - "TemplateResponseDocumentCustomFieldBase", - TemplateResponseDocumentCustomFieldBase.class); - JSON.registerDiscriminator(TemplateResponseDocumentCustomFieldBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java deleted file mode 100644 index b11eca50b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentCustomFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentCustomFieldCheckbox.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentCustomFieldCheckbox - extends TemplateResponseDocumentCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public TemplateResponseDocumentCustomFieldCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentCustomFieldCheckbox init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentCustomFieldCheckbox.class); - } - - public static TemplateResponseDocumentCustomFieldCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentCustomFieldCheckbox.class); - } - - public TemplateResponseDocumentCustomFieldCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * The type of this Custom Field. Only `text` and `checkbox` are currently - * supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses - * `TemplateResponseDocumentCustomFieldCheckbox` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentCustomFieldCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentCustomFieldCheckbox templateResponseDocumentCustomFieldCheckbox = - (TemplateResponseDocumentCustomFieldCheckbox) o; - return Objects.equals(this.type, templateResponseDocumentCustomFieldCheckbox.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentCustomFieldCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentCustomFieldCheckbox", - TemplateResponseDocumentCustomFieldCheckbox.class); - JSON.registerDiscriminator( - TemplateResponseDocumentCustomFieldCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java deleted file mode 100644 index e915dc017..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentCustomFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_TYPE, - TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_AVG_TEXT_LENGTH, - TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_IS_MULTILINE, - TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentCustomFieldText.JSON_PROPERTY_FONT_FAMILY -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentCustomFieldText - extends TemplateResponseDocumentCustomFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; - - public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; - - public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; - - public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; - - public TemplateResponseDocumentCustomFieldText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentCustomFieldText init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentCustomFieldText.class); - } - - public static TemplateResponseDocumentCustomFieldText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentCustomFieldText.class); - } - - public TemplateResponseDocumentCustomFieldText type(String type) { - this.type = type; - return this; - } - - /** - * The type of this Custom Field. Only `text` and `checkbox` are currently - * supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses - * `TemplateResponseDocumentCustomFieldCheckbox` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentCustomFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - return this; - } - - /** - * Get avgTextLength - * - * @return avgTextLength - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponseFieldAvgTextLength getAvgTextLength() { - return avgTextLength; - } - - @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - } - - public TemplateResponseDocumentCustomFieldText isMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - return this; - } - - /** - * Whether this form field is multiline text. - * - * @return isMultiline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsMultiline() { - return isMultiline; - } - - @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - } - - public TemplateResponseDocumentCustomFieldText originalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - return this; - } - - /** - * Original font size used in this form field's text. - * - * @return originalFontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOriginalFontSize() { - return originalFontSize; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - } - - public TemplateResponseDocumentCustomFieldText fontFamily(String fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family used in this form field's text. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { - this.fontFamily = fontFamily; - } - - /** Return true if this TemplateResponseDocumentCustomFieldText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentCustomFieldText templateResponseDocumentCustomFieldText = - (TemplateResponseDocumentCustomFieldText) o; - return Objects.equals(this.type, templateResponseDocumentCustomFieldText.type) - && Objects.equals( - this.avgTextLength, templateResponseDocumentCustomFieldText.avgTextLength) - && Objects.equals( - this.isMultiline, templateResponseDocumentCustomFieldText.isMultiline) - && Objects.equals( - this.originalFontSize, - templateResponseDocumentCustomFieldText.originalFontSize) - && Objects.equals( - this.fontFamily, templateResponseDocumentCustomFieldText.fontFamily) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash( - type, avgTextLength, isMultiline, originalFontSize, fontFamily, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentCustomFieldText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" avgTextLength: ").append(toIndentedString(avgTextLength)).append("\n"); - sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); - sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (avgTextLength != null) { - if (isFileTypeOrListOfFiles(avgTextLength)) { - fileTypeFound = true; - } - - if (avgTextLength.getClass().equals(java.io.File.class) - || avgTextLength.getClass().equals(Integer.class) - || avgTextLength.getClass().equals(String.class) - || avgTextLength.getClass().isEnum()) { - map.put("avg_text_length", avgTextLength); - } else if (isListOfFile(avgTextLength)) { - for (int i = 0; i < getListSize(avgTextLength); i++) { - map.put("avg_text_length[" + i + "]", getFromList(avgTextLength, i)); - } - } else { - map.put( - "avg_text_length", - JSON.getDefault().getMapper().writeValueAsString(avgTextLength)); - } - } - if (isMultiline != null) { - if (isFileTypeOrListOfFiles(isMultiline)) { - fileTypeFound = true; - } - - if (isMultiline.getClass().equals(java.io.File.class) - || isMultiline.getClass().equals(Integer.class) - || isMultiline.getClass().equals(String.class) - || isMultiline.getClass().isEnum()) { - map.put("isMultiline", isMultiline); - } else if (isListOfFile(isMultiline)) { - for (int i = 0; i < getListSize(isMultiline); i++) { - map.put("isMultiline[" + i + "]", getFromList(isMultiline, i)); - } - } else { - map.put( - "isMultiline", - JSON.getDefault().getMapper().writeValueAsString(isMultiline)); - } - } - if (originalFontSize != null) { - if (isFileTypeOrListOfFiles(originalFontSize)) { - fileTypeFound = true; - } - - if (originalFontSize.getClass().equals(java.io.File.class) - || originalFontSize.getClass().equals(Integer.class) - || originalFontSize.getClass().equals(String.class) - || originalFontSize.getClass().isEnum()) { - map.put("originalFontSize", originalFontSize); - } else if (isListOfFile(originalFontSize)) { - for (int i = 0; i < getListSize(originalFontSize); i++) { - map.put("originalFontSize[" + i + "]", getFromList(originalFontSize, i)); - } - } else { - map.put( - "originalFontSize", - JSON.getDefault().getMapper().writeValueAsString(originalFontSize)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("fontFamily", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("fontFamily[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "fontFamily", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentCustomFieldText", - TemplateResponseDocumentCustomFieldText.class); - JSON.registerDiscriminator(TemplateResponseDocumentCustomFieldText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java deleted file mode 100644 index 27dd50e83..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateResponseDocumentFieldGroup */ -@JsonPropertyOrder({ - TemplateResponseDocumentFieldGroup.JSON_PROPERTY_NAME, - TemplateResponseDocumentFieldGroup.JSON_PROPERTY_RULE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseDocumentFieldGroup { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_RULE = "rule"; - private TemplateResponseDocumentFieldGroupRule rule; - - public TemplateResponseDocumentFieldGroup() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFieldGroup init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocumentFieldGroup.class); - } - - public static TemplateResponseDocumentFieldGroup init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFieldGroup.class); - } - - public TemplateResponseDocumentFieldGroup name(String name) { - this.name = name; - return this; - } - - /** - * The name of the form field group. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseDocumentFieldGroup rule(TemplateResponseDocumentFieldGroupRule rule) { - this.rule = rule; - return this; - } - - /** - * Get rule - * - * @return rule - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponseDocumentFieldGroupRule getRule() { - return rule; - } - - @JsonProperty(JSON_PROPERTY_RULE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRule(TemplateResponseDocumentFieldGroupRule rule) { - this.rule = rule; - } - - /** Return true if this TemplateResponseDocumentFieldGroup object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFieldGroup templateResponseDocumentFieldGroup = - (TemplateResponseDocumentFieldGroup) o; - return Objects.equals(this.name, templateResponseDocumentFieldGroup.name) - && Objects.equals(this.rule, templateResponseDocumentFieldGroup.rule); - } - - @Override - public int hashCode() { - return Objects.hash(name, rule); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFieldGroup {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" rule: ").append(toIndentedString(rule)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (rule != null) { - if (isFileTypeOrListOfFiles(rule)) { - fileTypeFound = true; - } - - if (rule.getClass().equals(java.io.File.class) - || rule.getClass().equals(Integer.class) - || rule.getClass().equals(String.class) - || rule.getClass().isEnum()) { - map.put("rule", rule); - } else if (isListOfFile(rule)) { - for (int i = 0; i < getListSize(rule); i++) { - map.put("rule[" + i + "]", getFromList(rule, i)); - } - } else { - map.put("rule", JSON.getDefault().getMapper().writeValueAsString(rule)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java deleted file mode 100644 index 0fa796c46..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * The rule used to validate checkboxes in the form field group. See [checkbox field - * grouping](/api/reference/constants/#checkbox-field-grouping). - */ -@JsonPropertyOrder({ - TemplateResponseDocumentFieldGroupRule.JSON_PROPERTY_REQUIREMENT, - TemplateResponseDocumentFieldGroupRule.JSON_PROPERTY_GROUP_LABEL -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseDocumentFieldGroupRule { - public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; - - public static final String JSON_PROPERTY_GROUP_LABEL = "groupLabel"; - private String groupLabel; - - public TemplateResponseDocumentFieldGroupRule() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFieldGroupRule init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocumentFieldGroupRule.class); - } - - public static TemplateResponseDocumentFieldGroupRule init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFieldGroupRule.class); - } - - public TemplateResponseDocumentFieldGroupRule requirement(String requirement) { - this.requirement = requirement; - return this; - } - - /** - * Examples: `require_0-1` `require_1` `require_1-ormore` - Check - * out the list of [acceptable `requirement` checkbox type - * values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of - * [acceptable `requirement` radio type - * fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** - * two fields per group. - * - * @return requirement - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIREMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequirement() { - return requirement; - } - - @JsonProperty(JSON_PROPERTY_REQUIREMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequirement(String requirement) { - this.requirement = requirement; - } - - public TemplateResponseDocumentFieldGroupRule groupLabel(String groupLabel) { - this.groupLabel = groupLabel; - return this; - } - - /** - * Name of the group - * - * @return groupLabel - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroupLabel() { - return groupLabel; - } - - @JsonProperty(JSON_PROPERTY_GROUP_LABEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupLabel(String groupLabel) { - this.groupLabel = groupLabel; - } - - /** Return true if this TemplateResponseDocumentFieldGroupRule object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFieldGroupRule templateResponseDocumentFieldGroupRule = - (TemplateResponseDocumentFieldGroupRule) o; - return Objects.equals(this.requirement, templateResponseDocumentFieldGroupRule.requirement) - && Objects.equals( - this.groupLabel, templateResponseDocumentFieldGroupRule.groupLabel); - } - - @Override - public int hashCode() { - return Objects.hash(requirement, groupLabel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFieldGroupRule {\n"); - sb.append(" requirement: ").append(toIndentedString(requirement)).append("\n"); - sb.append(" groupLabel: ").append(toIndentedString(groupLabel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (requirement != null) { - if (isFileTypeOrListOfFiles(requirement)) { - fileTypeFound = true; - } - - if (requirement.getClass().equals(java.io.File.class) - || requirement.getClass().equals(Integer.class) - || requirement.getClass().equals(String.class) - || requirement.getClass().isEnum()) { - map.put("requirement", requirement); - } else if (isListOfFile(requirement)) { - for (int i = 0; i < getListSize(requirement); i++) { - map.put("requirement[" + i + "]", getFromList(requirement, i)); - } - } else { - map.put( - "requirement", - JSON.getDefault().getMapper().writeValueAsString(requirement)); - } - } - if (groupLabel != null) { - if (isFileTypeOrListOfFiles(groupLabel)) { - fileTypeFound = true; - } - - if (groupLabel.getClass().equals(java.io.File.class) - || groupLabel.getClass().equals(Integer.class) - || groupLabel.getClass().equals(String.class) - || groupLabel.getClass().isEnum()) { - map.put("groupLabel", groupLabel); - } else if (isListOfFile(groupLabel)) { - for (int i = 0; i < getListSize(groupLabel); i++) { - map.put("groupLabel[" + i + "]", getFromList(groupLabel, i)); - } - } else { - map.put( - "groupLabel", - JSON.getDefault().getMapper().writeValueAsString(groupLabel)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java deleted file mode 100644 index 36940640a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ /dev/null @@ -1,590 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** An array of Form Field objects containing the name and type of each named field. */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_API_ID, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_NAME, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_SIGNER, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_X, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_Y, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_WIDTH, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentFormFieldBase.JSON_PROPERTY_REQUIRED -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = TemplateResponseDocumentFormFieldCheckbox.class, name = "checkbox"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentFormFieldDateSigned.class, - name = "date_signed"), - @JsonSubTypes.Type(value = TemplateResponseDocumentFormFieldDropdown.class, name = "dropdown"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentFormFieldHyperlink.class, - name = "hyperlink"), - @JsonSubTypes.Type(value = TemplateResponseDocumentFormFieldInitials.class, name = "initials"), - @JsonSubTypes.Type(value = TemplateResponseDocumentFormFieldRadio.class, name = "radio"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentFormFieldSignature.class, - name = "signature"), - @JsonSubTypes.Type(value = TemplateResponseDocumentFormFieldText.class, name = "text"), -}) -public class TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; - - public static final String JSON_PROPERTY_X = "x"; - private Integer x; - - public static final String JSON_PROPERTY_Y = "y"; - private Integer y; - - public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; - - public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public TemplateResponseDocumentFormFieldBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldBase init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocumentFormFieldBase.class); - } - - public static TemplateResponseDocumentFormFieldBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldBase.class); - } - - public TemplateResponseDocumentFormFieldBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * A unique id for the form field. - * - * @return apiId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public TemplateResponseDocumentFormFieldBase name(String name) { - this.name = name; - return this; - } - - /** - * The name of the form field. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseDocumentFormFieldBase signer(String signer) { - this.signer = signer; - return this; - } - - public TemplateResponseDocumentFormFieldBase signer(Integer signer) { - this.signer = String.valueOf(signer); - return this; - } - - /** - * The signer of the Form Field. - * - * @return signer - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigner() { - return signer; - } - - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { - this.signer = signer; - } - - public void setSigner(Integer signer) { - this.signer = String.valueOf(signer); - } - - public TemplateResponseDocumentFormFieldBase x(Integer x) { - this.x = x; - return this; - } - - /** - * The horizontal offset in pixels for this form field. - * - * @return x - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getX() { - return x; - } - - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { - this.x = x; - } - - public TemplateResponseDocumentFormFieldBase y(Integer y) { - this.y = y; - return this; - } - - /** - * The vertical offset in pixels for this form field. - * - * @return y - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getY() { - return y; - } - - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { - this.y = y; - } - - public TemplateResponseDocumentFormFieldBase width(Integer width) { - this.width = width; - return this; - } - - /** - * The width in pixels of this form field. - * - * @return width - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getWidth() { - return width; - } - - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { - this.width = width; - } - - public TemplateResponseDocumentFormFieldBase height(Integer height) { - this.height = height; - return this; - } - - /** - * The height in pixels of this form field. - * - * @return height - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getHeight() { - return height; - } - - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { - this.height = height; - } - - public TemplateResponseDocumentFormFieldBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * Boolean showing whether or not this field is required. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - /** Return true if this TemplateResponseDocumentFormFieldBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldBase templateResponseDocumentFormFieldBase = - (TemplateResponseDocumentFormFieldBase) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldBase.type) - && Objects.equals(this.apiId, templateResponseDocumentFormFieldBase.apiId) - && Objects.equals(this.name, templateResponseDocumentFormFieldBase.name) - && Objects.equals(this.signer, templateResponseDocumentFormFieldBase.signer) - && Objects.equals(this.x, templateResponseDocumentFormFieldBase.x) - && Objects.equals(this.y, templateResponseDocumentFormFieldBase.y) - && Objects.equals(this.width, templateResponseDocumentFormFieldBase.width) - && Objects.equals(this.height, templateResponseDocumentFormFieldBase.height) - && Objects.equals(this.required, templateResponseDocumentFormFieldBase.required); - } - - @Override - public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); - sb.append(" x: ").append(toIndentedString(x)).append("\n"); - sb.append(" y: ").append(toIndentedString(y)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (signer != null) { - if (isFileTypeOrListOfFiles(signer)) { - fileTypeFound = true; - } - - if (signer.getClass().equals(java.io.File.class) - || signer.getClass().equals(Integer.class) - || signer.getClass().equals(String.class) - || signer.getClass().isEnum()) { - map.put("signer", signer); - } else if (isListOfFile(signer)) { - for (int i = 0; i < getListSize(signer); i++) { - map.put("signer[" + i + "]", getFromList(signer, i)); - } - } else { - map.put("signer", JSON.getDefault().getMapper().writeValueAsString(signer)); - } - } - if (x != null) { - if (isFileTypeOrListOfFiles(x)) { - fileTypeFound = true; - } - - if (x.getClass().equals(java.io.File.class) - || x.getClass().equals(Integer.class) - || x.getClass().equals(String.class) - || x.getClass().isEnum()) { - map.put("x", x); - } else if (isListOfFile(x)) { - for (int i = 0; i < getListSize(x); i++) { - map.put("x[" + i + "]", getFromList(x, i)); - } - } else { - map.put("x", JSON.getDefault().getMapper().writeValueAsString(x)); - } - } - if (y != null) { - if (isFileTypeOrListOfFiles(y)) { - fileTypeFound = true; - } - - if (y.getClass().equals(java.io.File.class) - || y.getClass().equals(Integer.class) - || y.getClass().equals(String.class) - || y.getClass().isEnum()) { - map.put("y", y); - } else if (isListOfFile(y)) { - for (int i = 0; i < getListSize(y); i++) { - map.put("y[" + i + "]", getFromList(y, i)); - } - } else { - map.put("y", JSON.getDefault().getMapper().writeValueAsString(y)); - } - } - if (width != null) { - if (isFileTypeOrListOfFiles(width)) { - fileTypeFound = true; - } - - if (width.getClass().equals(java.io.File.class) - || width.getClass().equals(Integer.class) - || width.getClass().equals(String.class) - || width.getClass().isEnum()) { - map.put("width", width); - } else if (isListOfFile(width)) { - for (int i = 0; i < getListSize(width); i++) { - map.put("width[" + i + "]", getFromList(width, i)); - } - } else { - map.put("width", JSON.getDefault().getMapper().writeValueAsString(width)); - } - } - if (height != null) { - if (isFileTypeOrListOfFiles(height)) { - fileTypeFound = true; - } - - if (height.getClass().equals(java.io.File.class) - || height.getClass().equals(Integer.class) - || height.getClass().equals(String.class) - || height.getClass().isEnum()) { - map.put("height", height); - } else if (isListOfFile(height)) { - for (int i = 0; i < getListSize(height); i++) { - map.put("height[" + i + "]", getFromList(height, i)); - } - } else { - map.put("height", JSON.getDefault().getMapper().writeValueAsString(height)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", TemplateResponseDocumentFormFieldCheckbox.class); - mappings.put("date_signed", TemplateResponseDocumentFormFieldDateSigned.class); - mappings.put("dropdown", TemplateResponseDocumentFormFieldDropdown.class); - mappings.put("hyperlink", TemplateResponseDocumentFormFieldHyperlink.class); - mappings.put("initials", TemplateResponseDocumentFormFieldInitials.class); - mappings.put("radio", TemplateResponseDocumentFormFieldRadio.class); - mappings.put("signature", TemplateResponseDocumentFormFieldSignature.class); - mappings.put("text", TemplateResponseDocumentFormFieldText.class); - mappings.put( - "TemplateResponseDocumentFormFieldBase", - TemplateResponseDocumentFormFieldBase.class); - JSON.registerDiscriminator(TemplateResponseDocumentFormFieldBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java deleted file mode 100644 index b291ffdd8..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldCheckbox.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldCheckbox - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldCheckbox init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldCheckbox.class); - } - - public static TemplateResponseDocumentFormFieldCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldCheckbox.class); - } - - public TemplateResponseDocumentFormFieldCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldCheckbox group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldCheckbox templateResponseDocumentFormFieldCheckbox = - (TemplateResponseDocumentFormFieldCheckbox) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldCheckbox.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldCheckbox.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldCheckbox", - TemplateResponseDocumentFormFieldCheckbox.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java deleted file mode 100644 index b43906f05..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldDateSigned.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldDateSigned - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldDateSigned() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldDateSigned init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldDateSigned.class); - } - - public static TemplateResponseDocumentFormFieldDateSigned init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldDateSigned.class); - } - - public TemplateResponseDocumentFormFieldDateSigned type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldDateSigned group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldDateSigned object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldDateSigned templateResponseDocumentFormFieldDateSigned = - (TemplateResponseDocumentFormFieldDateSigned) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldDateSigned.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldDateSigned.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldDateSigned {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldDateSigned", - TemplateResponseDocumentFormFieldDateSigned.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldDateSigned.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java deleted file mode 100644 index 1c6289c42..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldDropdown.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldDropdown - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldDropdown() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldDropdown init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldDropdown.class); - } - - public static TemplateResponseDocumentFormFieldDropdown init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldDropdown.class); - } - - public TemplateResponseDocumentFormFieldDropdown type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldDropdown group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldDropdown object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldDropdown templateResponseDocumentFormFieldDropdown = - (TemplateResponseDocumentFormFieldDropdown) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldDropdown.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldDropdown.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldDropdown {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldDropdown", - TemplateResponseDocumentFormFieldDropdown.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldDropdown.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java deleted file mode 100644 index b2af4e8f9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_AVG_TEXT_LENGTH, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_IS_MULTILINE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_FONT_FAMILY, - TemplateResponseDocumentFormFieldHyperlink.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldHyperlink - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; - - public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; - - public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; - - public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; - - public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldHyperlink() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldHyperlink init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldHyperlink.class); - } - - public static TemplateResponseDocumentFormFieldHyperlink init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldHyperlink.class); - } - - public TemplateResponseDocumentFormFieldHyperlink type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldHyperlink avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - return this; - } - - /** - * Get avgTextLength - * - * @return avgTextLength - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponseFieldAvgTextLength getAvgTextLength() { - return avgTextLength; - } - - @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - } - - public TemplateResponseDocumentFormFieldHyperlink isMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - return this; - } - - /** - * Whether this form field is multiline text. - * - * @return isMultiline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsMultiline() { - return isMultiline; - } - - @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - } - - public TemplateResponseDocumentFormFieldHyperlink originalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - return this; - } - - /** - * Original font size used in this form field's text. - * - * @return originalFontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOriginalFontSize() { - return originalFontSize; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - } - - public TemplateResponseDocumentFormFieldHyperlink fontFamily(String fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family used in this form field's text. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { - this.fontFamily = fontFamily; - } - - public TemplateResponseDocumentFormFieldHyperlink group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldHyperlink object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldHyperlink templateResponseDocumentFormFieldHyperlink = - (TemplateResponseDocumentFormFieldHyperlink) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldHyperlink.type) - && Objects.equals( - this.avgTextLength, - templateResponseDocumentFormFieldHyperlink.avgTextLength) - && Objects.equals( - this.isMultiline, templateResponseDocumentFormFieldHyperlink.isMultiline) - && Objects.equals( - this.originalFontSize, - templateResponseDocumentFormFieldHyperlink.originalFontSize) - && Objects.equals( - this.fontFamily, templateResponseDocumentFormFieldHyperlink.fontFamily) - && Objects.equals(this.group, templateResponseDocumentFormFieldHyperlink.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash( - type, - avgTextLength, - isMultiline, - originalFontSize, - fontFamily, - group, - super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldHyperlink {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" avgTextLength: ").append(toIndentedString(avgTextLength)).append("\n"); - sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); - sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (avgTextLength != null) { - if (isFileTypeOrListOfFiles(avgTextLength)) { - fileTypeFound = true; - } - - if (avgTextLength.getClass().equals(java.io.File.class) - || avgTextLength.getClass().equals(Integer.class) - || avgTextLength.getClass().equals(String.class) - || avgTextLength.getClass().isEnum()) { - map.put("avg_text_length", avgTextLength); - } else if (isListOfFile(avgTextLength)) { - for (int i = 0; i < getListSize(avgTextLength); i++) { - map.put("avg_text_length[" + i + "]", getFromList(avgTextLength, i)); - } - } else { - map.put( - "avg_text_length", - JSON.getDefault().getMapper().writeValueAsString(avgTextLength)); - } - } - if (isMultiline != null) { - if (isFileTypeOrListOfFiles(isMultiline)) { - fileTypeFound = true; - } - - if (isMultiline.getClass().equals(java.io.File.class) - || isMultiline.getClass().equals(Integer.class) - || isMultiline.getClass().equals(String.class) - || isMultiline.getClass().isEnum()) { - map.put("isMultiline", isMultiline); - } else if (isListOfFile(isMultiline)) { - for (int i = 0; i < getListSize(isMultiline); i++) { - map.put("isMultiline[" + i + "]", getFromList(isMultiline, i)); - } - } else { - map.put( - "isMultiline", - JSON.getDefault().getMapper().writeValueAsString(isMultiline)); - } - } - if (originalFontSize != null) { - if (isFileTypeOrListOfFiles(originalFontSize)) { - fileTypeFound = true; - } - - if (originalFontSize.getClass().equals(java.io.File.class) - || originalFontSize.getClass().equals(Integer.class) - || originalFontSize.getClass().equals(String.class) - || originalFontSize.getClass().isEnum()) { - map.put("originalFontSize", originalFontSize); - } else if (isListOfFile(originalFontSize)) { - for (int i = 0; i < getListSize(originalFontSize); i++) { - map.put("originalFontSize[" + i + "]", getFromList(originalFontSize, i)); - } - } else { - map.put( - "originalFontSize", - JSON.getDefault().getMapper().writeValueAsString(originalFontSize)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("fontFamily", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("fontFamily[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "fontFamily", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldHyperlink", - TemplateResponseDocumentFormFieldHyperlink.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldHyperlink.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java deleted file mode 100644 index 17bc3553e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldInitials.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldInitials - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldInitials() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldInitials init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldInitials.class); - } - - public static TemplateResponseDocumentFormFieldInitials init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldInitials.class); - } - - public TemplateResponseDocumentFormFieldInitials type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldInitials group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldInitials object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldInitials templateResponseDocumentFormFieldInitials = - (TemplateResponseDocumentFormFieldInitials) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldInitials.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldInitials.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldInitials {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldInitials", - TemplateResponseDocumentFormFieldInitials.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldInitials.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java deleted file mode 100644 index 75b7a72ad..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldRadio.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldRadio() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldRadio init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocumentFormFieldRadio.class); - } - - public static TemplateResponseDocumentFormFieldRadio init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldRadio.class); - } - - public TemplateResponseDocumentFormFieldRadio type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldRadio group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldRadio object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldRadio templateResponseDocumentFormFieldRadio = - (TemplateResponseDocumentFormFieldRadio) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldRadio.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldRadio.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldRadio {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldRadio", - TemplateResponseDocumentFormFieldRadio.class); - JSON.registerDiscriminator(TemplateResponseDocumentFormFieldRadio.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java deleted file mode 100644 index 15630a485..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldSignature.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldSignature - extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldSignature() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldSignature init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentFormFieldSignature.class); - } - - public static TemplateResponseDocumentFormFieldSignature init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldSignature.class); - } - - public TemplateResponseDocumentFormFieldSignature type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldSignature group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldSignature object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldSignature templateResponseDocumentFormFieldSignature = - (TemplateResponseDocumentFormFieldSignature) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldSignature.type) - && Objects.equals(this.group, templateResponseDocumentFormFieldSignature.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, group, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldSignature {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldSignature", - TemplateResponseDocumentFormFieldSignature.class); - JSON.registerDiscriminator( - TemplateResponseDocumentFormFieldSignature.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java deleted file mode 100644 index dbb22a6d1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentFormFieldBase` */ -@JsonPropertyOrder({ - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_TYPE, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_AVG_TEXT_LENGTH, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_IS_MULTILINE, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_ORIGINAL_FONT_SIZE, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_FONT_FAMILY, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_VALIDATION_TYPE, - TemplateResponseDocumentFormFieldText.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; - - public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; - - public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; - - public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; - - /** - * Each text field may contain a `validation_type` parameter. Check out the list of - * [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about - * the possible values. - */ - public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), - - LETTERS_ONLY("letters_only"), - - PHONE_NUMBER("phone_number"), - - BANK_ROUTING_NUMBER("bank_routing_number"), - - BANK_ACCOUNT_NUMBER("bank_account_number"), - - EMAIL_ADDRESS("email_address"), - - ZIP_CODE("zip_code"), - - SOCIAL_SECURITY_NUMBER("social_security_number"), - - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), - - CUSTOM_REGEX("custom_regex"); - - private String value; - - ValidationTypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ValidationTypeEnum fromValue(String value) { - for (ValidationTypeEnum b : ValidationTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } - } - - public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentFormFieldText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentFormFieldText init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseDocumentFormFieldText.class); - } - - public static TemplateResponseDocumentFormFieldText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentFormFieldText.class); - } - - public TemplateResponseDocumentFormFieldText type(String type) { - this.type = type; - return this; - } - - /** - * The type of this form field. See [field types](/api/reference/constants/#field-types). * Text - * Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses - * `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentFormFieldRadio` * Signature Field uses - * `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentFormFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentFormFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - return this; - } - - /** - * Get avgTextLength - * - * @return avgTextLength - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TemplateResponseFieldAvgTextLength getAvgTextLength() { - return avgTextLength; - } - - @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { - this.avgTextLength = avgTextLength; - } - - public TemplateResponseDocumentFormFieldText isMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - return this; - } - - /** - * Whether this form field is multiline text. - * - * @return isMultiline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsMultiline() { - return isMultiline; - } - - @JsonProperty(JSON_PROPERTY_IS_MULTILINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { - this.isMultiline = isMultiline; - } - - public TemplateResponseDocumentFormFieldText originalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - return this; - } - - /** - * Original font size used in this form field's text. - * - * @return originalFontSize - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOriginalFontSize() { - return originalFontSize; - } - - @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { - this.originalFontSize = originalFontSize; - } - - public TemplateResponseDocumentFormFieldText fontFamily(String fontFamily) { - this.fontFamily = fontFamily; - return this; - } - - /** - * Font family used in this form field's text. - * - * @return fontFamily - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getFontFamily() { - return fontFamily; - } - - @JsonProperty(JSON_PROPERTY_FONT_FAMILY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { - this.fontFamily = fontFamily; - } - - public TemplateResponseDocumentFormFieldText validationType(ValidationTypeEnum validationType) { - this.validationType = validationType; - return this; - } - - /** - * Each text field may contain a `validation_type` parameter. Check out the list of - * [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about - * the possible values. - * - * @return validationType - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ValidationTypeEnum getValidationType() { - return validationType; - } - - @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { - this.validationType = validationType; - } - - public TemplateResponseDocumentFormFieldText group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null` except for Radio fields. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentFormFieldText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentFormFieldText templateResponseDocumentFormFieldText = - (TemplateResponseDocumentFormFieldText) o; - return Objects.equals(this.type, templateResponseDocumentFormFieldText.type) - && Objects.equals( - this.avgTextLength, templateResponseDocumentFormFieldText.avgTextLength) - && Objects.equals( - this.isMultiline, templateResponseDocumentFormFieldText.isMultiline) - && Objects.equals( - this.originalFontSize, - templateResponseDocumentFormFieldText.originalFontSize) - && Objects.equals(this.fontFamily, templateResponseDocumentFormFieldText.fontFamily) - && Objects.equals( - this.validationType, templateResponseDocumentFormFieldText.validationType) - && Objects.equals(this.group, templateResponseDocumentFormFieldText.group) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash( - type, - avgTextLength, - isMultiline, - originalFontSize, - fontFamily, - validationType, - group, - super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentFormFieldText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" avgTextLength: ").append(toIndentedString(avgTextLength)).append("\n"); - sb.append(" isMultiline: ").append(toIndentedString(isMultiline)).append("\n"); - sb.append(" originalFontSize: ").append(toIndentedString(originalFontSize)).append("\n"); - sb.append(" fontFamily: ").append(toIndentedString(fontFamily)).append("\n"); - sb.append(" validationType: ").append(toIndentedString(validationType)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (avgTextLength != null) { - if (isFileTypeOrListOfFiles(avgTextLength)) { - fileTypeFound = true; - } - - if (avgTextLength.getClass().equals(java.io.File.class) - || avgTextLength.getClass().equals(Integer.class) - || avgTextLength.getClass().equals(String.class) - || avgTextLength.getClass().isEnum()) { - map.put("avg_text_length", avgTextLength); - } else if (isListOfFile(avgTextLength)) { - for (int i = 0; i < getListSize(avgTextLength); i++) { - map.put("avg_text_length[" + i + "]", getFromList(avgTextLength, i)); - } - } else { - map.put( - "avg_text_length", - JSON.getDefault().getMapper().writeValueAsString(avgTextLength)); - } - } - if (isMultiline != null) { - if (isFileTypeOrListOfFiles(isMultiline)) { - fileTypeFound = true; - } - - if (isMultiline.getClass().equals(java.io.File.class) - || isMultiline.getClass().equals(Integer.class) - || isMultiline.getClass().equals(String.class) - || isMultiline.getClass().isEnum()) { - map.put("isMultiline", isMultiline); - } else if (isListOfFile(isMultiline)) { - for (int i = 0; i < getListSize(isMultiline); i++) { - map.put("isMultiline[" + i + "]", getFromList(isMultiline, i)); - } - } else { - map.put( - "isMultiline", - JSON.getDefault().getMapper().writeValueAsString(isMultiline)); - } - } - if (originalFontSize != null) { - if (isFileTypeOrListOfFiles(originalFontSize)) { - fileTypeFound = true; - } - - if (originalFontSize.getClass().equals(java.io.File.class) - || originalFontSize.getClass().equals(Integer.class) - || originalFontSize.getClass().equals(String.class) - || originalFontSize.getClass().isEnum()) { - map.put("originalFontSize", originalFontSize); - } else if (isListOfFile(originalFontSize)) { - for (int i = 0; i < getListSize(originalFontSize); i++) { - map.put("originalFontSize[" + i + "]", getFromList(originalFontSize, i)); - } - } else { - map.put( - "originalFontSize", - JSON.getDefault().getMapper().writeValueAsString(originalFontSize)); - } - } - if (fontFamily != null) { - if (isFileTypeOrListOfFiles(fontFamily)) { - fileTypeFound = true; - } - - if (fontFamily.getClass().equals(java.io.File.class) - || fontFamily.getClass().equals(Integer.class) - || fontFamily.getClass().equals(String.class) - || fontFamily.getClass().isEnum()) { - map.put("fontFamily", fontFamily); - } else if (isListOfFile(fontFamily)) { - for (int i = 0; i < getListSize(fontFamily); i++) { - map.put("fontFamily[" + i + "]", getFromList(fontFamily, i)); - } - } else { - map.put( - "fontFamily", - JSON.getDefault().getMapper().writeValueAsString(fontFamily)); - } - } - if (validationType != null) { - if (isFileTypeOrListOfFiles(validationType)) { - fileTypeFound = true; - } - - if (validationType.getClass().equals(java.io.File.class) - || validationType.getClass().equals(Integer.class) - || validationType.getClass().equals(String.class) - || validationType.getClass().isEnum()) { - map.put("validation_type", validationType); - } else if (isListOfFile(validationType)) { - for (int i = 0; i < getListSize(validationType); i++) { - map.put("validation_type[" + i + "]", getFromList(validationType, i)); - } - } else { - map.put( - "validation_type", - JSON.getDefault().getMapper().writeValueAsString(validationType)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentFormFieldText", - TemplateResponseDocumentFormFieldText.class); - JSON.registerDiscriminator(TemplateResponseDocumentFormFieldText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java deleted file mode 100644 index 164ee218b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java +++ /dev/null @@ -1,637 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. - */ -@JsonPropertyOrder({ - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_TYPE, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_API_ID, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_NAME, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_SIGNER, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_X, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_Y, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_WIDTH, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_HEIGHT, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_REQUIRED, - TemplateResponseDocumentStaticFieldBase.JSON_PROPERTY_GROUP -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldCheckbox.class, - name = "checkbox"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldDateSigned.class, - name = "date_signed"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldDropdown.class, - name = "dropdown"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldHyperlink.class, - name = "hyperlink"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldInitials.class, - name = "initials"), - @JsonSubTypes.Type(value = TemplateResponseDocumentStaticFieldRadio.class, name = "radio"), - @JsonSubTypes.Type( - value = TemplateResponseDocumentStaticFieldSignature.class, - name = "signature"), - @JsonSubTypes.Type(value = TemplateResponseDocumentStaticFieldText.class, name = "text"), -}) -public class TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer = "me_now"; - - public static final String JSON_PROPERTY_X = "x"; - private Integer x; - - public static final String JSON_PROPERTY_Y = "y"; - private Integer y; - - public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; - - public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; - - public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; - - public static final String JSON_PROPERTY_GROUP = "group"; - private String group; - - public TemplateResponseDocumentStaticFieldBase() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldBase init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldBase.class); - } - - public static TemplateResponseDocumentStaticFieldBase init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldBase.class); - } - - public TemplateResponseDocumentStaticFieldBase type(String type) { - this.type = type; - return this; - } - - /** - * Get type - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - public TemplateResponseDocumentStaticFieldBase apiId(String apiId) { - this.apiId = apiId; - return this; - } - - /** - * A unique id for the static field. - * - * @return apiId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApiId() { - return apiId; - } - - @JsonProperty(JSON_PROPERTY_API_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { - this.apiId = apiId; - } - - public TemplateResponseDocumentStaticFieldBase name(String name) { - this.name = name; - return this; - } - - /** - * The name of the static field. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseDocumentStaticFieldBase signer(String signer) { - this.signer = signer; - return this; - } - - /** - * The signer of the Static Field. - * - * @return signer - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigner() { - return signer; - } - - @JsonProperty(JSON_PROPERTY_SIGNER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { - this.signer = signer; - } - - public TemplateResponseDocumentStaticFieldBase x(Integer x) { - this.x = x; - return this; - } - - /** - * The horizontal offset in pixels for this static field. - * - * @return x - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getX() { - return x; - } - - @JsonProperty(JSON_PROPERTY_X) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { - this.x = x; - } - - public TemplateResponseDocumentStaticFieldBase y(Integer y) { - this.y = y; - return this; - } - - /** - * The vertical offset in pixels for this static field. - * - * @return y - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getY() { - return y; - } - - @JsonProperty(JSON_PROPERTY_Y) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { - this.y = y; - } - - public TemplateResponseDocumentStaticFieldBase width(Integer width) { - this.width = width; - return this; - } - - /** - * The width in pixels of this static field. - * - * @return width - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getWidth() { - return width; - } - - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { - this.width = width; - } - - public TemplateResponseDocumentStaticFieldBase height(Integer height) { - this.height = height; - return this; - } - - /** - * The height in pixels of this static field. - * - * @return height - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getHeight() { - return height; - } - - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { - this.height = height; - } - - public TemplateResponseDocumentStaticFieldBase required(Boolean required) { - this.required = required; - return this; - } - - /** - * Boolean showing whether or not this field is required. - * - * @return required - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getRequired() { - return required; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { - this.required = required; - } - - public TemplateResponseDocumentStaticFieldBase group(String group) { - this.group = group; - return this; - } - - /** - * The name of the group this field is in. If this field is not a group, this defaults to - * `null`. - * - * @return group - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { - return group; - } - - @JsonProperty(JSON_PROPERTY_GROUP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { - this.group = group; - } - - /** Return true if this TemplateResponseDocumentStaticFieldBase object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldBase templateResponseDocumentStaticFieldBase = - (TemplateResponseDocumentStaticFieldBase) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldBase.type) - && Objects.equals(this.apiId, templateResponseDocumentStaticFieldBase.apiId) - && Objects.equals(this.name, templateResponseDocumentStaticFieldBase.name) - && Objects.equals(this.signer, templateResponseDocumentStaticFieldBase.signer) - && Objects.equals(this.x, templateResponseDocumentStaticFieldBase.x) - && Objects.equals(this.y, templateResponseDocumentStaticFieldBase.y) - && Objects.equals(this.width, templateResponseDocumentStaticFieldBase.width) - && Objects.equals(this.height, templateResponseDocumentStaticFieldBase.height) - && Objects.equals(this.required, templateResponseDocumentStaticFieldBase.required) - && Objects.equals(this.group, templateResponseDocumentStaticFieldBase.group); - } - - @Override - public int hashCode() { - return Objects.hash(type, apiId, name, signer, x, y, width, height, required, group); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldBase {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" apiId: ").append(toIndentedString(apiId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" signer: ").append(toIndentedString(signer)).append("\n"); - sb.append(" x: ").append(toIndentedString(x)).append("\n"); - sb.append(" y: ").append(toIndentedString(y)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" required: ").append(toIndentedString(required)).append("\n"); - sb.append(" group: ").append(toIndentedString(group)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (apiId != null) { - if (isFileTypeOrListOfFiles(apiId)) { - fileTypeFound = true; - } - - if (apiId.getClass().equals(java.io.File.class) - || apiId.getClass().equals(Integer.class) - || apiId.getClass().equals(String.class) - || apiId.getClass().isEnum()) { - map.put("api_id", apiId); - } else if (isListOfFile(apiId)) { - for (int i = 0; i < getListSize(apiId); i++) { - map.put("api_id[" + i + "]", getFromList(apiId, i)); - } - } else { - map.put("api_id", JSON.getDefault().getMapper().writeValueAsString(apiId)); - } - } - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (signer != null) { - if (isFileTypeOrListOfFiles(signer)) { - fileTypeFound = true; - } - - if (signer.getClass().equals(java.io.File.class) - || signer.getClass().equals(Integer.class) - || signer.getClass().equals(String.class) - || signer.getClass().isEnum()) { - map.put("signer", signer); - } else if (isListOfFile(signer)) { - for (int i = 0; i < getListSize(signer); i++) { - map.put("signer[" + i + "]", getFromList(signer, i)); - } - } else { - map.put("signer", JSON.getDefault().getMapper().writeValueAsString(signer)); - } - } - if (x != null) { - if (isFileTypeOrListOfFiles(x)) { - fileTypeFound = true; - } - - if (x.getClass().equals(java.io.File.class) - || x.getClass().equals(Integer.class) - || x.getClass().equals(String.class) - || x.getClass().isEnum()) { - map.put("x", x); - } else if (isListOfFile(x)) { - for (int i = 0; i < getListSize(x); i++) { - map.put("x[" + i + "]", getFromList(x, i)); - } - } else { - map.put("x", JSON.getDefault().getMapper().writeValueAsString(x)); - } - } - if (y != null) { - if (isFileTypeOrListOfFiles(y)) { - fileTypeFound = true; - } - - if (y.getClass().equals(java.io.File.class) - || y.getClass().equals(Integer.class) - || y.getClass().equals(String.class) - || y.getClass().isEnum()) { - map.put("y", y); - } else if (isListOfFile(y)) { - for (int i = 0; i < getListSize(y); i++) { - map.put("y[" + i + "]", getFromList(y, i)); - } - } else { - map.put("y", JSON.getDefault().getMapper().writeValueAsString(y)); - } - } - if (width != null) { - if (isFileTypeOrListOfFiles(width)) { - fileTypeFound = true; - } - - if (width.getClass().equals(java.io.File.class) - || width.getClass().equals(Integer.class) - || width.getClass().equals(String.class) - || width.getClass().isEnum()) { - map.put("width", width); - } else if (isListOfFile(width)) { - for (int i = 0; i < getListSize(width); i++) { - map.put("width[" + i + "]", getFromList(width, i)); - } - } else { - map.put("width", JSON.getDefault().getMapper().writeValueAsString(width)); - } - } - if (height != null) { - if (isFileTypeOrListOfFiles(height)) { - fileTypeFound = true; - } - - if (height.getClass().equals(java.io.File.class) - || height.getClass().equals(Integer.class) - || height.getClass().equals(String.class) - || height.getClass().isEnum()) { - map.put("height", height); - } else if (isListOfFile(height)) { - for (int i = 0; i < getListSize(height); i++) { - map.put("height[" + i + "]", getFromList(height, i)); - } - } else { - map.put("height", JSON.getDefault().getMapper().writeValueAsString(height)); - } - } - if (required != null) { - if (isFileTypeOrListOfFiles(required)) { - fileTypeFound = true; - } - - if (required.getClass().equals(java.io.File.class) - || required.getClass().equals(Integer.class) - || required.getClass().equals(String.class) - || required.getClass().isEnum()) { - map.put("required", required); - } else if (isListOfFile(required)) { - for (int i = 0; i < getListSize(required); i++) { - map.put("required[" + i + "]", getFromList(required, i)); - } - } else { - map.put("required", JSON.getDefault().getMapper().writeValueAsString(required)); - } - } - if (group != null) { - if (isFileTypeOrListOfFiles(group)) { - fileTypeFound = true; - } - - if (group.getClass().equals(java.io.File.class) - || group.getClass().equals(Integer.class) - || group.getClass().equals(String.class) - || group.getClass().isEnum()) { - map.put("group", group); - } else if (isListOfFile(group)) { - for (int i = 0; i < getListSize(group); i++) { - map.put("group[" + i + "]", getFromList(group, i)); - } - } else { - map.put("group", JSON.getDefault().getMapper().writeValueAsString(group)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put("checkbox", TemplateResponseDocumentStaticFieldCheckbox.class); - mappings.put("date_signed", TemplateResponseDocumentStaticFieldDateSigned.class); - mappings.put("dropdown", TemplateResponseDocumentStaticFieldDropdown.class); - mappings.put("hyperlink", TemplateResponseDocumentStaticFieldHyperlink.class); - mappings.put("initials", TemplateResponseDocumentStaticFieldInitials.class); - mappings.put("radio", TemplateResponseDocumentStaticFieldRadio.class); - mappings.put("signature", TemplateResponseDocumentStaticFieldSignature.class); - mappings.put("text", TemplateResponseDocumentStaticFieldText.class); - mappings.put( - "TemplateResponseDocumentStaticFieldBase", - TemplateResponseDocumentStaticFieldBase.class); - JSON.registerDiscriminator(TemplateResponseDocumentStaticFieldBase.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java deleted file mode 100644 index 774abc3a2..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldCheckbox.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldCheckbox - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; - - public TemplateResponseDocumentStaticFieldCheckbox() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldCheckbox init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldCheckbox.class); - } - - public static TemplateResponseDocumentStaticFieldCheckbox init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldCheckbox.class); - } - - public TemplateResponseDocumentStaticFieldCheckbox type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldCheckbox object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldCheckbox templateResponseDocumentStaticFieldCheckbox = - (TemplateResponseDocumentStaticFieldCheckbox) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldCheckbox.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldCheckbox {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldCheckbox", - TemplateResponseDocumentStaticFieldCheckbox.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldCheckbox.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java deleted file mode 100644 index d0674f84a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldDateSigned.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldDateSigned - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; - - public TemplateResponseDocumentStaticFieldDateSigned() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldDateSigned init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldDateSigned.class); - } - - public static TemplateResponseDocumentStaticFieldDateSigned init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldDateSigned.class); - } - - public TemplateResponseDocumentStaticFieldDateSigned type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldDateSigned object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldDateSigned - templateResponseDocumentStaticFieldDateSigned = - (TemplateResponseDocumentStaticFieldDateSigned) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldDateSigned.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldDateSigned {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldDateSigned", - TemplateResponseDocumentStaticFieldDateSigned.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldDateSigned.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java deleted file mode 100644 index 343de411d..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldDropdown.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldDropdown - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; - - public TemplateResponseDocumentStaticFieldDropdown() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldDropdown init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldDropdown.class); - } - - public static TemplateResponseDocumentStaticFieldDropdown init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldDropdown.class); - } - - public TemplateResponseDocumentStaticFieldDropdown type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldDropdown object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldDropdown templateResponseDocumentStaticFieldDropdown = - (TemplateResponseDocumentStaticFieldDropdown) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldDropdown.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldDropdown {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldDropdown", - TemplateResponseDocumentStaticFieldDropdown.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldDropdown.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java deleted file mode 100644 index 15267904e..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldHyperlink.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldHyperlink - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; - - public TemplateResponseDocumentStaticFieldHyperlink() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldHyperlink init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldHyperlink.class); - } - - public static TemplateResponseDocumentStaticFieldHyperlink init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldHyperlink.class); - } - - public TemplateResponseDocumentStaticFieldHyperlink type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldHyperlink object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldHyperlink templateResponseDocumentStaticFieldHyperlink = - (TemplateResponseDocumentStaticFieldHyperlink) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldHyperlink.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldHyperlink {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldHyperlink", - TemplateResponseDocumentStaticFieldHyperlink.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldHyperlink.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java deleted file mode 100644 index 01f42023a..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldInitials.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldInitials - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; - - public TemplateResponseDocumentStaticFieldInitials() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldInitials init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldInitials.class); - } - - public static TemplateResponseDocumentStaticFieldInitials init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldInitials.class); - } - - public TemplateResponseDocumentStaticFieldInitials type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldInitials object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldInitials templateResponseDocumentStaticFieldInitials = - (TemplateResponseDocumentStaticFieldInitials) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldInitials.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldInitials {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldInitials", - TemplateResponseDocumentStaticFieldInitials.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldInitials.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java deleted file mode 100644 index c1c658d13..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldRadio.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldRadio - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; - - public TemplateResponseDocumentStaticFieldRadio() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldRadio init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldRadio.class); - } - - public static TemplateResponseDocumentStaticFieldRadio init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldRadio.class); - } - - public TemplateResponseDocumentStaticFieldRadio type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldRadio object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldRadio templateResponseDocumentStaticFieldRadio = - (TemplateResponseDocumentStaticFieldRadio) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldRadio.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldRadio {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldRadio", - TemplateResponseDocumentStaticFieldRadio.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldRadio.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java deleted file mode 100644 index 3fd603737..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldSignature.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldSignature - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; - - public TemplateResponseDocumentStaticFieldSignature() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldSignature init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldSignature.class); - } - - public static TemplateResponseDocumentStaticFieldSignature init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldSignature.class); - } - - public TemplateResponseDocumentStaticFieldSignature type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldSignature object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldSignature templateResponseDocumentStaticFieldSignature = - (TemplateResponseDocumentStaticFieldSignature) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldSignature.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldSignature {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldSignature", - TemplateResponseDocumentStaticFieldSignature.class); - JSON.registerDiscriminator( - TemplateResponseDocumentStaticFieldSignature.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java deleted file mode 100644 index e8f17977b..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** This class extends `TemplateResponseDocumentStaticFieldBase` */ -@JsonPropertyOrder({TemplateResponseDocumentStaticFieldText.JSON_PROPERTY_TYPE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties( - allowSetters = true, // allows the type to be set during deserialization - ignoreUnknown = true) -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true) -public class TemplateResponseDocumentStaticFieldText - extends TemplateResponseDocumentStaticFieldBase { - public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; - - public TemplateResponseDocumentStaticFieldText() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseDocumentStaticFieldText init(String jsonData) throws Exception { - return new ObjectMapper() - .readValue(jsonData, TemplateResponseDocumentStaticFieldText.class); - } - - public static TemplateResponseDocumentStaticFieldText init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseDocumentStaticFieldText.class); - } - - public TemplateResponseDocumentStaticFieldText type(String type) { - this.type = type; - return this; - } - - /** - * The type of this static field. See [field types](/api/reference/constants/#field-types). * - * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses - * `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses - * `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses - * `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses - * `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses - * `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses - * `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses - * `TemplateResponseDocumentStaticFieldInitials` - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { - this.type = type; - } - - /** Return true if this TemplateResponseDocumentStaticFieldText object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseDocumentStaticFieldText templateResponseDocumentStaticFieldText = - (TemplateResponseDocumentStaticFieldText) o; - return Objects.equals(this.type, templateResponseDocumentStaticFieldText.type) - && super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(type, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseDocumentStaticFieldText {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - map.putAll(super.createFormData()); - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } - - static { - // Initialize and register the discriminator mappings. - Map> mappings = new HashMap<>(); - mappings.put( - "TemplateResponseDocumentStaticFieldText", - TemplateResponseDocumentStaticFieldText.class); - JSON.registerDiscriminator(TemplateResponseDocumentStaticFieldText.class, "type", mappings); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java deleted file mode 100644 index b5a9afb52..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Average text length in this field. */ -@JsonPropertyOrder({ - TemplateResponseFieldAvgTextLength.JSON_PROPERTY_NUM_LINES, - TemplateResponseFieldAvgTextLength.JSON_PROPERTY_NUM_CHARS_PER_LINE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseFieldAvgTextLength { - public static final String JSON_PROPERTY_NUM_LINES = "num_lines"; - private Integer numLines; - - public static final String JSON_PROPERTY_NUM_CHARS_PER_LINE = "num_chars_per_line"; - private Integer numCharsPerLine; - - public TemplateResponseFieldAvgTextLength() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseFieldAvgTextLength init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseFieldAvgTextLength.class); - } - - public static TemplateResponseFieldAvgTextLength init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseFieldAvgTextLength.class); - } - - public TemplateResponseFieldAvgTextLength numLines(Integer numLines) { - this.numLines = numLines; - return this; - } - - /** - * Number of lines. - * - * @return numLines - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_LINES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumLines() { - return numLines; - } - - @JsonProperty(JSON_PROPERTY_NUM_LINES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumLines(Integer numLines) { - this.numLines = numLines; - } - - public TemplateResponseFieldAvgTextLength numCharsPerLine(Integer numCharsPerLine) { - this.numCharsPerLine = numCharsPerLine; - return this; - } - - /** - * Number of characters per line. - * - * @return numCharsPerLine - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NUM_CHARS_PER_LINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getNumCharsPerLine() { - return numCharsPerLine; - } - - @JsonProperty(JSON_PROPERTY_NUM_CHARS_PER_LINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumCharsPerLine(Integer numCharsPerLine) { - this.numCharsPerLine = numCharsPerLine; - } - - /** Return true if this TemplateResponseFieldAvgTextLength object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseFieldAvgTextLength templateResponseFieldAvgTextLength = - (TemplateResponseFieldAvgTextLength) o; - return Objects.equals(this.numLines, templateResponseFieldAvgTextLength.numLines) - && Objects.equals( - this.numCharsPerLine, templateResponseFieldAvgTextLength.numCharsPerLine); - } - - @Override - public int hashCode() { - return Objects.hash(numLines, numCharsPerLine); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseFieldAvgTextLength {\n"); - sb.append(" numLines: ").append(toIndentedString(numLines)).append("\n"); - sb.append(" numCharsPerLine: ").append(toIndentedString(numCharsPerLine)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (numLines != null) { - if (isFileTypeOrListOfFiles(numLines)) { - fileTypeFound = true; - } - - if (numLines.getClass().equals(java.io.File.class) - || numLines.getClass().equals(Integer.class) - || numLines.getClass().equals(String.class) - || numLines.getClass().isEnum()) { - map.put("num_lines", numLines); - } else if (isListOfFile(numLines)) { - for (int i = 0; i < getListSize(numLines); i++) { - map.put("num_lines[" + i + "]", getFromList(numLines, i)); - } - } else { - map.put( - "num_lines", - JSON.getDefault().getMapper().writeValueAsString(numLines)); - } - } - if (numCharsPerLine != null) { - if (isFileTypeOrListOfFiles(numCharsPerLine)) { - fileTypeFound = true; - } - - if (numCharsPerLine.getClass().equals(java.io.File.class) - || numCharsPerLine.getClass().equals(Integer.class) - || numCharsPerLine.getClass().equals(String.class) - || numCharsPerLine.getClass().isEnum()) { - map.put("num_chars_per_line", numCharsPerLine); - } else if (isListOfFile(numCharsPerLine)) { - for (int i = 0; i < getListSize(numCharsPerLine); i++) { - map.put("num_chars_per_line[" + i + "]", getFromList(numCharsPerLine, i)); - } - } else { - map.put( - "num_chars_per_line", - JSON.getDefault().getMapper().writeValueAsString(numCharsPerLine)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java deleted file mode 100644 index 4724f47e5..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateResponseSignerRole */ -@JsonPropertyOrder({ - TemplateResponseSignerRole.JSON_PROPERTY_NAME, - TemplateResponseSignerRole.JSON_PROPERTY_ORDER -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateResponseSignerRole { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; - - public TemplateResponseSignerRole() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateResponseSignerRole init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateResponseSignerRole.class); - } - - public static TemplateResponseSignerRole init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateResponseSignerRole.class); - } - - public TemplateResponseSignerRole name(String name) { - this.name = name; - return this; - } - - /** - * The name of the Role. - * - * @return name - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - public TemplateResponseSignerRole order(Integer order) { - this.order = order; - return this; - } - - /** - * If signer order is assigned this is the 0-based index for this role. - * - * @return order - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getOrder() { - return order; - } - - @JsonProperty(JSON_PROPERTY_ORDER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { - this.order = order; - } - - /** Return true if this TemplateResponseSignerRole object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateResponseSignerRole templateResponseSignerRole = (TemplateResponseSignerRole) o; - return Objects.equals(this.name, templateResponseSignerRole.name) - && Objects.equals(this.order, templateResponseSignerRole.order); - } - - @Override - public int hashCode() { - return Objects.hash(name, order); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateResponseSignerRole {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" order: ").append(toIndentedString(order)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (name != null) { - if (isFileTypeOrListOfFiles(name)) { - fileTypeFound = true; - } - - if (name.getClass().equals(java.io.File.class) - || name.getClass().equals(Integer.class) - || name.getClass().equals(String.class) - || name.getClass().isEnum()) { - map.put("name", name); - } else if (isListOfFile(name)) { - for (int i = 0; i < getListSize(name); i++) { - map.put("name[" + i + "]", getFromList(name, i)); - } - } else { - map.put("name", JSON.getDefault().getMapper().writeValueAsString(name)); - } - } - if (order != null) { - if (isFileTypeOrListOfFiles(order)) { - fileTypeFound = true; - } - - if (order.getClass().equals(java.io.File.class) - || order.getClass().equals(Integer.class) - || order.getClass().equals(String.class) - || order.getClass().isEnum()) { - map.put("order", order); - } else if (isListOfFile(order)) { - for (int i = 0; i < getListSize(order); i++) { - map.put("order[" + i + "]", getFromList(order, i)); - } - } else { - map.put("order", JSON.getDefault().getMapper().writeValueAsString(order)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java deleted file mode 100644 index 6404a95aa..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** TemplateUpdateFilesRequest */ -@JsonPropertyOrder({ - TemplateUpdateFilesRequest.JSON_PROPERTY_CLIENT_ID, - TemplateUpdateFilesRequest.JSON_PROPERTY_FILES, - TemplateUpdateFilesRequest.JSON_PROPERTY_FILE_URLS, - TemplateUpdateFilesRequest.JSON_PROPERTY_MESSAGE, - TemplateUpdateFilesRequest.JSON_PROPERTY_SUBJECT, - TemplateUpdateFilesRequest.JSON_PROPERTY_TEST_MODE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateUpdateFilesRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public TemplateUpdateFilesRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateUpdateFilesRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateUpdateFilesRequest.class); - } - - public static TemplateUpdateFilesRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateUpdateFilesRequest.class); - } - - public TemplateUpdateFilesRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app you're using to update this template. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public TemplateUpdateFilesRequest files(List files) { - this.files = files; - return this; - } - - public TemplateUpdateFilesRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to use for the template. This - * endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public TemplateUpdateFilesRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public TemplateUpdateFilesRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the - * template. This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public TemplateUpdateFilesRequest message(String message) { - this.message = message; - return this; - } - - /** - * The new default template email message. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public TemplateUpdateFilesRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The new default template email subject. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public TemplateUpdateFilesRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - /** Return true if this TemplateUpdateFilesRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateUpdateFilesRequest templateUpdateFilesRequest = (TemplateUpdateFilesRequest) o; - return Objects.equals(this.clientId, templateUpdateFilesRequest.clientId) - && Objects.equals(this.files, templateUpdateFilesRequest.files) - && Objects.equals(this.fileUrls, templateUpdateFilesRequest.fileUrls) - && Objects.equals(this.message, templateUpdateFilesRequest.message) - && Objects.equals(this.subject, templateUpdateFilesRequest.subject) - && Objects.equals(this.testMode, templateUpdateFilesRequest.testMode); - } - - @Override - public int hashCode() { - return Objects.hash(clientId, files, fileUrls, message, subject, testMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateUpdateFilesRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java deleted file mode 100644 index 396c7548f..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** TemplateUpdateFilesResponse */ -@JsonPropertyOrder({TemplateUpdateFilesResponse.JSON_PROPERTY_TEMPLATE}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateUpdateFilesResponse { - public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateUpdateFilesResponseTemplate template; - - public TemplateUpdateFilesResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateUpdateFilesResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateUpdateFilesResponse.class); - } - - public static TemplateUpdateFilesResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateUpdateFilesResponse.class); - } - - public TemplateUpdateFilesResponse template(TemplateUpdateFilesResponseTemplate template) { - this.template = template; - return this; - } - - /** - * Get template - * - * @return template - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TemplateUpdateFilesResponseTemplate getTemplate() { - return template; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateUpdateFilesResponseTemplate template) { - this.template = template; - } - - /** Return true if this TemplateUpdateFilesResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateUpdateFilesResponse templateUpdateFilesResponse = (TemplateUpdateFilesResponse) o; - return Objects.equals(this.template, templateUpdateFilesResponse.template); - } - - @Override - public int hashCode() { - return Objects.hash(template); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateUpdateFilesResponse {\n"); - sb.append(" template: ").append(toIndentedString(template)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (template != null) { - if (isFileTypeOrListOfFiles(template)) { - fileTypeFound = true; - } - - if (template.getClass().equals(java.io.File.class) - || template.getClass().equals(Integer.class) - || template.getClass().equals(String.class) - || template.getClass().isEnum()) { - map.put("template", template); - } else if (isListOfFile(template)) { - for (int i = 0; i < getListSize(template); i++) { - map.put("template[" + i + "]", getFromList(template, i)); - } - } else { - map.put("template", JSON.getDefault().getMapper().writeValueAsString(template)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java deleted file mode 100644 index 08f0784e7..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** Contains template id */ -@JsonPropertyOrder({ - TemplateUpdateFilesResponseTemplate.JSON_PROPERTY_TEMPLATE_ID, - TemplateUpdateFilesResponseTemplate.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class TemplateUpdateFilesResponseTemplate { - public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; - - public TemplateUpdateFilesResponseTemplate() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static TemplateUpdateFilesResponseTemplate init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, TemplateUpdateFilesResponseTemplate.class); - } - - public static TemplateUpdateFilesResponseTemplate init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - TemplateUpdateFilesResponseTemplate.class); - } - - public TemplateUpdateFilesResponseTemplate templateId(String templateId) { - this.templateId = templateId; - return this; - } - - /** - * The id of the Template. - * - * @return templateId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTemplateId() { - return templateId; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - @Deprecated - public TemplateUpdateFilesResponseTemplate warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public TemplateUpdateFilesResponseTemplate addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @Deprecated - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this TemplateUpdateFilesResponseTemplate object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TemplateUpdateFilesResponseTemplate templateUpdateFilesResponseTemplate = - (TemplateUpdateFilesResponseTemplate) o; - return Objects.equals(this.templateId, templateUpdateFilesResponseTemplate.templateId) - && Objects.equals(this.warnings, templateUpdateFilesResponseTemplate.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(templateId, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TemplateUpdateFilesResponseTemplate {\n"); - sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (templateId != null) { - if (isFileTypeOrListOfFiles(templateId)) { - fileTypeFound = true; - } - - if (templateId.getClass().equals(java.io.File.class) - || templateId.getClass().equals(Integer.class) - || templateId.getClass().equals(String.class) - || templateId.getClass().isEnum()) { - map.put("template_id", templateId); - } else if (isListOfFile(templateId)) { - for (int i = 0; i < getListSize(templateId); i++) { - map.put("template_id[" + i + "]", getFromList(templateId, i)); - } - } else { - map.put( - "template_id", - JSON.getDefault().getMapper().writeValueAsString(templateId)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java deleted file mode 100644 index 17f7ccabf..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java +++ /dev/null @@ -1,2157 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** */ -@JsonPropertyOrder({ - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_CLIENT_ID, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FILES, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FILE_URLS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_ALLOW_CCS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_ALLOW_DECLINE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_ALLOW_REASSIGN, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_ATTACHMENTS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_CUSTOM_FIELDS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_EDITOR_OPTIONS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FIELD_OPTIONS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FORCE_SIGNER_PAGE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FORCE_SUBJECT_MESSAGE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELD_RULES, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_HOLD_REQUEST, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_MESSAGE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_METADATA, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_REQUESTING_REDIRECT_URL, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SHOW_PREVIEW, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SIGNERS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SIGNING_OPTIONS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SKIP_ME_NOW, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_SUBJECT, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_TEST_MODE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_TYPE, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_USE_TEXT_TAGS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, - UnclaimedDraftCreateEmbeddedRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftCreateEmbeddedRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORCE_SIGNER_PAGE = "force_signer_page"; - private Boolean forceSignerPage = false; - - public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; - - public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; - - public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - /** - * The type of the draft. By default this is `request_signature`, but you can set it - * to `send_document` if you want to self sign a document and download it. - */ - public enum TypeEnum { - SEND_DOCUMENT("send_document"), - - REQUEST_SIGNATURE("request_signature"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; - - public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public UnclaimedDraftCreateEmbeddedRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftCreateEmbeddedRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, UnclaimedDraftCreateEmbeddedRequest.class); - } - - public static UnclaimedDraftCreateEmbeddedRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - UnclaimedDraftCreateEmbeddedRequest.class); - } - - public UnclaimedDraftCreateEmbeddedRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app used to create the draft. Used to apply the branding and callback url - * defined for the app. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - return this; - } - - /** - * The email address of the user that should be designated as the requester of this draft, if - * the draft type is `request_signature`. - * - * @return requesterEmailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRequesterEmailAddress() { - return requesterEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - } - - public UnclaimedDraftCreateEmbeddedRequest files(List files) { - this.files = files; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public UnclaimedDraftCreateEmbeddedRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public UnclaimedDraftCreateEmbeddedRequest allowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - return this; - } - - /** - * This allows the requester to specify whether the user is allowed to provide email addresses - * to CC when claiming the draft. - * - * @return allowCcs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowCcs() { - return allowCcs; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - } - - public UnclaimedDraftCreateEmbeddedRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public UnclaimedDraftCreateEmbeddedRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public UnclaimedDraftCreateEmbeddedRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addCcEmailAddressesItem( - String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public UnclaimedDraftCreateEmbeddedRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public UnclaimedDraftCreateEmbeddedRequest editorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - return this; - } - - /** - * Get editorOptions - * - * @return editorOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubEditorOptions getEditorOptions() { - return editorOptions; - } - - @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - } - - public UnclaimedDraftCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public UnclaimedDraftCreateEmbeddedRequest forceSignerPage(Boolean forceSignerPage) { - this.forceSignerPage = forceSignerPage; - return this; - } - - /** - * Provide users the ability to review/edit the signers. - * - * @return forceSignerPage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSignerPage() { - return forceSignerPage; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_PAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerPage(Boolean forceSignerPage) { - this.forceSignerPage = forceSignerPage; - } - - public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - return this; - } - - /** - * Provide users the ability to review/edit the subject and message. - * - * @return forceSubjectMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSubjectMessage() { - return forceSubjectMessage; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - } - - public UnclaimedDraftCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public UnclaimedDraftCreateEmbeddedRequest formFieldRules( - List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addFormFieldRulesItem( - SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public UnclaimedDraftCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public UnclaimedDraftCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable automatic Text Tag removal. - * Defaults to `false`. When using Text Tags it is preferred that you set this to - * `false` and hide your tags with white text or something similar because the - * automatic removal system can cause unwanted clipping. See the [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more - * details. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - public UnclaimedDraftCreateEmbeddedRequest holdRequest(Boolean holdRequest) { - this.holdRequest = holdRequest; - return this; - } - - /** - * The request from this draft will not automatically send to signers post-claim if set to - * `true`. Requester must - * [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when - * ready to send. Defaults to `false`. - * - * @return holdRequest - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHoldRequest() { - return holdRequest; - } - - @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { - this.holdRequest = holdRequest; - } - - public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - return this; - } - - /** - * The request created from this draft will also be signable in embedded mode if set to - * `true`. Defaults to `false`. - * - * @return isForEmbeddedSigning - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsForEmbeddedSigning() { - return isForEmbeddedSigning; - } - - @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - } - - public UnclaimedDraftCreateEmbeddedRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public UnclaimedDraftCreateEmbeddedRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully request a signature. - * - * @return requestingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestingRedirectUrl() { - return requestingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - } - - public UnclaimedDraftCreateEmbeddedRequest showPreview(Boolean showPreview) { - this.showPreview = showPreview; - return this; - } - - /** - * This allows the requester to enable the editor/preview experience. - - * `show_preview=true`: Allows requesters to enable the editor/preview - * experience. - `show_preview=false`: Allows requesters to disable the - * editor/preview experience. - * - * @return showPreview - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPreview() { - return showPreview; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { - this.showPreview = showPreview; - } - - public UnclaimedDraftCreateEmbeddedRequest showProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public UnclaimedDraftCreateEmbeddedRequest signers(List signers) { - this.signers = signers; - return this; - } - - public UnclaimedDraftCreateEmbeddedRequest addSignersItem(SubUnclaimedDraftSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Unclaimed Draft Signature Request. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public UnclaimedDraftCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public UnclaimedDraftCreateEmbeddedRequest skipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - return this; - } - - /** - * Disables the \"Me (Now)\" option for the person preparing the document. Does not - * work with type `send_document`. Defaults to `false`. - * - * @return skipMeNow - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSkipMeNow() { - return skipMeNow; - } - - @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - } - - public UnclaimedDraftCreateEmbeddedRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public UnclaimedDraftCreateEmbeddedRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public UnclaimedDraftCreateEmbeddedRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * The type of the draft. By default this is `request_signature`, but you can set it - * to `send_document` if you want to self sign a document and download it. - * - * @return type - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TypeEnum getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { - this.type = type; - } - - public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - return this; - } - - /** - * Set `use_text_tags` to `true` to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document (defaults to disabled, or `false`). Alternatively, if your PDF contains - * pre-defined fields, enable the detection of these fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). Currently we only support use of either `use_text_tags` or - * `use_preexisting_fields` parameter, not both. - * - * @return usePreexistingFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUsePreexistingFields() { - return usePreexistingFields; - } - - @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - } - - public UnclaimedDraftCreateEmbeddedRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Set `use_text_tags` to `true` to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document (defaults to disabled, or `false`). Alternatively, if your PDF contains - * pre-defined fields, enable the detection of these fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). Currently we only support use of either `use_text_tags` or - * `use_preexisting_fields` parameter, not both. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public UnclaimedDraftCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - public UnclaimedDraftCreateEmbeddedRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * **NOTE:** This does not correspond to the **expires_at** returned in the response. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this UnclaimedDraftCreateEmbeddedRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftCreateEmbeddedRequest unclaimedDraftCreateEmbeddedRequest = - (UnclaimedDraftCreateEmbeddedRequest) o; - return Objects.equals(this.clientId, unclaimedDraftCreateEmbeddedRequest.clientId) - && Objects.equals( - this.requesterEmailAddress, - unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress) - && Objects.equals(this.files, unclaimedDraftCreateEmbeddedRequest.files) - && Objects.equals(this.fileUrls, unclaimedDraftCreateEmbeddedRequest.fileUrls) - && Objects.equals(this.allowCcs, unclaimedDraftCreateEmbeddedRequest.allowCcs) - && Objects.equals( - this.allowDecline, unclaimedDraftCreateEmbeddedRequest.allowDecline) - && Objects.equals( - this.allowReassign, unclaimedDraftCreateEmbeddedRequest.allowReassign) - && Objects.equals(this.attachments, unclaimedDraftCreateEmbeddedRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, unclaimedDraftCreateEmbeddedRequest.ccEmailAddresses) - && Objects.equals( - this.customFields, unclaimedDraftCreateEmbeddedRequest.customFields) - && Objects.equals( - this.editorOptions, unclaimedDraftCreateEmbeddedRequest.editorOptions) - && Objects.equals( - this.fieldOptions, unclaimedDraftCreateEmbeddedRequest.fieldOptions) - && Objects.equals( - this.forceSignerPage, unclaimedDraftCreateEmbeddedRequest.forceSignerPage) - && Objects.equals( - this.forceSubjectMessage, - unclaimedDraftCreateEmbeddedRequest.forceSubjectMessage) - && Objects.equals( - this.formFieldGroups, unclaimedDraftCreateEmbeddedRequest.formFieldGroups) - && Objects.equals( - this.formFieldRules, unclaimedDraftCreateEmbeddedRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - unclaimedDraftCreateEmbeddedRequest.formFieldsPerDocument) - && Objects.equals( - this.hideTextTags, unclaimedDraftCreateEmbeddedRequest.hideTextTags) - && Objects.equals(this.holdRequest, unclaimedDraftCreateEmbeddedRequest.holdRequest) - && Objects.equals( - this.isForEmbeddedSigning, - unclaimedDraftCreateEmbeddedRequest.isForEmbeddedSigning) - && Objects.equals(this.message, unclaimedDraftCreateEmbeddedRequest.message) - && Objects.equals(this.metadata, unclaimedDraftCreateEmbeddedRequest.metadata) - && Objects.equals( - this.requestingRedirectUrl, - unclaimedDraftCreateEmbeddedRequest.requestingRedirectUrl) - && Objects.equals(this.showPreview, unclaimedDraftCreateEmbeddedRequest.showPreview) - && Objects.equals( - this.showProgressStepper, - unclaimedDraftCreateEmbeddedRequest.showProgressStepper) - && Objects.equals(this.signers, unclaimedDraftCreateEmbeddedRequest.signers) - && Objects.equals( - this.signingOptions, unclaimedDraftCreateEmbeddedRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, - unclaimedDraftCreateEmbeddedRequest.signingRedirectUrl) - && Objects.equals(this.skipMeNow, unclaimedDraftCreateEmbeddedRequest.skipMeNow) - && Objects.equals(this.subject, unclaimedDraftCreateEmbeddedRequest.subject) - && Objects.equals(this.testMode, unclaimedDraftCreateEmbeddedRequest.testMode) - && Objects.equals(this.type, unclaimedDraftCreateEmbeddedRequest.type) - && Objects.equals( - this.usePreexistingFields, - unclaimedDraftCreateEmbeddedRequest.usePreexistingFields) - && Objects.equals(this.useTextTags, unclaimedDraftCreateEmbeddedRequest.useTextTags) - && Objects.equals( - this.populateAutoFillFields, - unclaimedDraftCreateEmbeddedRequest.populateAutoFillFields) - && Objects.equals(this.expiresAt, unclaimedDraftCreateEmbeddedRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - requesterEmailAddress, - files, - fileUrls, - allowCcs, - allowDecline, - allowReassign, - attachments, - ccEmailAddresses, - customFields, - editorOptions, - fieldOptions, - forceSignerPage, - forceSubjectMessage, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - holdRequest, - isForEmbeddedSigning, - message, - metadata, - requestingRedirectUrl, - showPreview, - showProgressStepper, - signers, - signingOptions, - signingRedirectUrl, - skipMeNow, - subject, - testMode, - type, - usePreexistingFields, - useTextTags, - populateAutoFillFields, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftCreateEmbeddedRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" requesterEmailAddress: ") - .append(toIndentedString(requesterEmailAddress)) - .append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" allowCcs: ").append(toIndentedString(allowCcs)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" editorOptions: ").append(toIndentedString(editorOptions)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" forceSignerPage: ").append(toIndentedString(forceSignerPage)).append("\n"); - sb.append(" forceSubjectMessage: ") - .append(toIndentedString(forceSubjectMessage)) - .append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" holdRequest: ").append(toIndentedString(holdRequest)).append("\n"); - sb.append(" isForEmbeddedSigning: ") - .append(toIndentedString(isForEmbeddedSigning)) - .append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" requestingRedirectUrl: ") - .append(toIndentedString(requestingRedirectUrl)) - .append("\n"); - sb.append(" showPreview: ").append(toIndentedString(showPreview)).append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" skipMeNow: ").append(toIndentedString(skipMeNow)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" usePreexistingFields: ") - .append(toIndentedString(usePreexistingFields)) - .append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (requesterEmailAddress != null) { - if (isFileTypeOrListOfFiles(requesterEmailAddress)) { - fileTypeFound = true; - } - - if (requesterEmailAddress.getClass().equals(java.io.File.class) - || requesterEmailAddress.getClass().equals(Integer.class) - || requesterEmailAddress.getClass().equals(String.class) - || requesterEmailAddress.getClass().isEnum()) { - map.put("requester_email_address", requesterEmailAddress); - } else if (isListOfFile(requesterEmailAddress)) { - for (int i = 0; i < getListSize(requesterEmailAddress); i++) { - map.put( - "requester_email_address[" + i + "]", - getFromList(requesterEmailAddress, i)); - } - } else { - map.put( - "requester_email_address", - JSON.getDefault() - .getMapper() - .writeValueAsString(requesterEmailAddress)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (allowCcs != null) { - if (isFileTypeOrListOfFiles(allowCcs)) { - fileTypeFound = true; - } - - if (allowCcs.getClass().equals(java.io.File.class) - || allowCcs.getClass().equals(Integer.class) - || allowCcs.getClass().equals(String.class) - || allowCcs.getClass().isEnum()) { - map.put("allow_ccs", allowCcs); - } else if (isListOfFile(allowCcs)) { - for (int i = 0; i < getListSize(allowCcs); i++) { - map.put("allow_ccs[" + i + "]", getFromList(allowCcs, i)); - } - } else { - map.put( - "allow_ccs", - JSON.getDefault().getMapper().writeValueAsString(allowCcs)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (editorOptions != null) { - if (isFileTypeOrListOfFiles(editorOptions)) { - fileTypeFound = true; - } - - if (editorOptions.getClass().equals(java.io.File.class) - || editorOptions.getClass().equals(Integer.class) - || editorOptions.getClass().equals(String.class) - || editorOptions.getClass().isEnum()) { - map.put("editor_options", editorOptions); - } else if (isListOfFile(editorOptions)) { - for (int i = 0; i < getListSize(editorOptions); i++) { - map.put("editor_options[" + i + "]", getFromList(editorOptions, i)); - } - } else { - map.put( - "editor_options", - JSON.getDefault().getMapper().writeValueAsString(editorOptions)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (forceSignerPage != null) { - if (isFileTypeOrListOfFiles(forceSignerPage)) { - fileTypeFound = true; - } - - if (forceSignerPage.getClass().equals(java.io.File.class) - || forceSignerPage.getClass().equals(Integer.class) - || forceSignerPage.getClass().equals(String.class) - || forceSignerPage.getClass().isEnum()) { - map.put("force_signer_page", forceSignerPage); - } else if (isListOfFile(forceSignerPage)) { - for (int i = 0; i < getListSize(forceSignerPage); i++) { - map.put("force_signer_page[" + i + "]", getFromList(forceSignerPage, i)); - } - } else { - map.put( - "force_signer_page", - JSON.getDefault().getMapper().writeValueAsString(forceSignerPage)); - } - } - if (forceSubjectMessage != null) { - if (isFileTypeOrListOfFiles(forceSubjectMessage)) { - fileTypeFound = true; - } - - if (forceSubjectMessage.getClass().equals(java.io.File.class) - || forceSubjectMessage.getClass().equals(Integer.class) - || forceSubjectMessage.getClass().equals(String.class) - || forceSubjectMessage.getClass().isEnum()) { - map.put("force_subject_message", forceSubjectMessage); - } else if (isListOfFile(forceSubjectMessage)) { - for (int i = 0; i < getListSize(forceSubjectMessage); i++) { - map.put( - "force_subject_message[" + i + "]", - getFromList(forceSubjectMessage, i)); - } - } else { - map.put( - "force_subject_message", - JSON.getDefault().getMapper().writeValueAsString(forceSubjectMessage)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (holdRequest != null) { - if (isFileTypeOrListOfFiles(holdRequest)) { - fileTypeFound = true; - } - - if (holdRequest.getClass().equals(java.io.File.class) - || holdRequest.getClass().equals(Integer.class) - || holdRequest.getClass().equals(String.class) - || holdRequest.getClass().isEnum()) { - map.put("hold_request", holdRequest); - } else if (isListOfFile(holdRequest)) { - for (int i = 0; i < getListSize(holdRequest); i++) { - map.put("hold_request[" + i + "]", getFromList(holdRequest, i)); - } - } else { - map.put( - "hold_request", - JSON.getDefault().getMapper().writeValueAsString(holdRequest)); - } - } - if (isForEmbeddedSigning != null) { - if (isFileTypeOrListOfFiles(isForEmbeddedSigning)) { - fileTypeFound = true; - } - - if (isForEmbeddedSigning.getClass().equals(java.io.File.class) - || isForEmbeddedSigning.getClass().equals(Integer.class) - || isForEmbeddedSigning.getClass().equals(String.class) - || isForEmbeddedSigning.getClass().isEnum()) { - map.put("is_for_embedded_signing", isForEmbeddedSigning); - } else if (isListOfFile(isForEmbeddedSigning)) { - for (int i = 0; i < getListSize(isForEmbeddedSigning); i++) { - map.put( - "is_for_embedded_signing[" + i + "]", - getFromList(isForEmbeddedSigning, i)); - } - } else { - map.put( - "is_for_embedded_signing", - JSON.getDefault().getMapper().writeValueAsString(isForEmbeddedSigning)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (requestingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(requestingRedirectUrl)) { - fileTypeFound = true; - } - - if (requestingRedirectUrl.getClass().equals(java.io.File.class) - || requestingRedirectUrl.getClass().equals(Integer.class) - || requestingRedirectUrl.getClass().equals(String.class) - || requestingRedirectUrl.getClass().isEnum()) { - map.put("requesting_redirect_url", requestingRedirectUrl); - } else if (isListOfFile(requestingRedirectUrl)) { - for (int i = 0; i < getListSize(requestingRedirectUrl); i++) { - map.put( - "requesting_redirect_url[" + i + "]", - getFromList(requestingRedirectUrl, i)); - } - } else { - map.put( - "requesting_redirect_url", - JSON.getDefault() - .getMapper() - .writeValueAsString(requestingRedirectUrl)); - } - } - if (showPreview != null) { - if (isFileTypeOrListOfFiles(showPreview)) { - fileTypeFound = true; - } - - if (showPreview.getClass().equals(java.io.File.class) - || showPreview.getClass().equals(Integer.class) - || showPreview.getClass().equals(String.class) - || showPreview.getClass().isEnum()) { - map.put("show_preview", showPreview); - } else if (isListOfFile(showPreview)) { - for (int i = 0; i < getListSize(showPreview); i++) { - map.put("show_preview[" + i + "]", getFromList(showPreview, i)); - } - } else { - map.put( - "show_preview", - JSON.getDefault().getMapper().writeValueAsString(showPreview)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (skipMeNow != null) { - if (isFileTypeOrListOfFiles(skipMeNow)) { - fileTypeFound = true; - } - - if (skipMeNow.getClass().equals(java.io.File.class) - || skipMeNow.getClass().equals(Integer.class) - || skipMeNow.getClass().equals(String.class) - || skipMeNow.getClass().isEnum()) { - map.put("skip_me_now", skipMeNow); - } else if (isListOfFile(skipMeNow)) { - for (int i = 0; i < getListSize(skipMeNow); i++) { - map.put("skip_me_now[" + i + "]", getFromList(skipMeNow, i)); - } - } else { - map.put( - "skip_me_now", - JSON.getDefault().getMapper().writeValueAsString(skipMeNow)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (usePreexistingFields != null) { - if (isFileTypeOrListOfFiles(usePreexistingFields)) { - fileTypeFound = true; - } - - if (usePreexistingFields.getClass().equals(java.io.File.class) - || usePreexistingFields.getClass().equals(Integer.class) - || usePreexistingFields.getClass().equals(String.class) - || usePreexistingFields.getClass().isEnum()) { - map.put("use_preexisting_fields", usePreexistingFields); - } else if (isListOfFile(usePreexistingFields)) { - for (int i = 0; i < getListSize(usePreexistingFields); i++) { - map.put( - "use_preexisting_fields[" + i + "]", - getFromList(usePreexistingFields, i)); - } - } else { - map.put( - "use_preexisting_fields", - JSON.getDefault().getMapper().writeValueAsString(usePreexistingFields)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java deleted file mode 100644 index 8310985d9..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java +++ /dev/null @@ -1,1779 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** UnclaimedDraftCreateEmbeddedWithTemplateRequest */ -@JsonPropertyOrder({ - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CLIENT_ID, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEMPLATE_IDS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_DECLINE, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_REASSIGN, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CCS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_EDITOR_OPTIONS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FIELD_OPTIONS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FILES, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FILE_URLS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FORCE_SIGNER_ROLES, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_FORCE_SUBJECT_MESSAGE, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_HOLD_REQUEST, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_MESSAGE, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_METADATA, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_PREVIEW_ONLY, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_REQUESTING_REDIRECT_URL, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SHOW_PREVIEW, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNERS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SKIP_ME_NOW, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_SUBJECT, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TEST_MODE, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_TITLE, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS, - UnclaimedDraftCreateEmbeddedWithTemplateRequest.JSON_PROPERTY_ALLOW_CCS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftCreateEmbeddedWithTemplateRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; - - public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; - - public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; - - public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; - - public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; - - public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; - - public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; - - public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_TITLE = "title"; - private String title; - - public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = - "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; - - public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = false; - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftCreateEmbeddedWithTemplateRequest init(String jsonData) - throws Exception { - return new ObjectMapper() - .readValue(jsonData, UnclaimedDraftCreateEmbeddedWithTemplateRequest.class); - } - - public static UnclaimedDraftCreateEmbeddedWithTemplateRequest init(HashMap data) - throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - UnclaimedDraftCreateEmbeddedWithTemplateRequest.class); - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app used to create the draft. Used to apply the branding and callback url - * defined for the app. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest requesterEmailAddress( - String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - return this; - } - - /** - * The email address of the user that should be designated as the requester of this draft. - * - * @return requesterEmailAddress - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getRequesterEmailAddress() { - return requesterEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { - this.templateIds = templateIds; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addTemplateIdsItem( - String templateIdsItem) { - if (this.templateIds == null) { - this.templateIds = new ArrayList<>(); - } - this.templateIds.add(templateIdsItem); - return this; - } - - /** - * Use `template_ids` to create a SignatureRequest from one or more templates, in the - * order in which the templates will be used. - * - * @return templateIds - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getTemplateIds() { - return templateIds; - } - - @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { - this.templateIds = templateIds; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - return this; - } - - /** - * Allows signers to reassign their signature requests to other signers if set to - * `true`. Defaults to `false`. **NOTE:** Only available for Premium plan - * and higher. - * - * @return allowReassign - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowReassign() { - return allowReassign; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { - this.allowReassign = allowReassign; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs(List ccs) { - this.ccs = ccs; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addCcsItem(SubCC ccsItem) { - if (this.ccs == null) { - this.ccs = new ArrayList<>(); - } - this.ccs.add(ccsItem); - return this; - } - - /** - * Add CC email recipients. Required when a CC role exists for the Template. - * - * @return ccs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcs() { - return ccs; - } - - @JsonProperty(JSON_PROPERTY_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { - this.ccs = ccs; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest customFields( - List customFields) { - this.customFields = customFields; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addCustomFieldsItem( - SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * An array defining values and options for custom fields. Required when a custom field exists - * in the Template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest editorOptions( - SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - return this; - } - - /** - * Get editorOptions - * - * @return editorOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubEditorOptions getEditorOptions() { - return editorOptions; - } - - @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fieldOptions( - SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest files(List files) { - this.files = files; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to append additional files to the signature request being created - * from the template. Dropbox Sign will parse the files for [text - * tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature - * request. Text tags for signers not on the template(s) will be ignored. **files** or - * **file_urls[]** is required, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use file_urls[] to append additional files to the signature request being created from the - * template. Dropbox Sign will download the file, then parse it for [text - * tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature - * request. Text tags for signers not on the template(s) will be ignored. **files** or - * **file_urls[]** is required, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSignerRoles( - Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - return this; - } - - /** - * Provide users the ability to review/edit the template signer roles. - * - * @return forceSignerRoles - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSignerRoles() { - return forceSignerRoles; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { - this.forceSignerRoles = forceSignerRoles; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSubjectMessage( - Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - return this; - } - - /** - * Provide users the ability to review/edit the template subject and message. - * - * @return forceSubjectMessage - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getForceSubjectMessage() { - return forceSubjectMessage; - } - - @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { - this.forceSubjectMessage = forceSubjectMessage; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest(Boolean holdRequest) { - this.holdRequest = holdRequest; - return this; - } - - /** - * The request from this draft will not automatically send to signers post-claim if set to 1. - * Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request - * from hold when ready to send. Defaults to `false`. - * - * @return holdRequest - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHoldRequest() { - return holdRequest; - } - - @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { - this.holdRequest = holdRequest; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest isForEmbeddedSigning( - Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - return this; - } - - /** - * The request created from this draft will also be signable in embedded mode if set to - * `true`. Defaults to `false`. - * - * @return isForEmbeddedSigning - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsForEmbeddedSigning() { - return isForEmbeddedSigning; - } - - @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest putMetadataItem( - String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly(Boolean previewOnly) { - this.previewOnly = previewOnly; - return this; - } - - /** - * This allows the requester to enable the preview experience (i.e. does not allow the - * requester's end user to add any additional fields via the editor). - - * `preview_only=true`: Allows requesters to enable the preview only experience. - * - `preview_only=false`: Allows requesters to disable the preview only - * experience. **NOTE:** This parameter overwrites `show_preview=1` (if set). - * - * @return previewOnly - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPreviewOnly() { - return previewOnly; - } - - @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { - this.previewOnly = previewOnly; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest requestingRedirectUrl( - String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully request a signature. - * - * @return requestingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestingRedirectUrl() { - return requestingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview(Boolean showPreview) { - this.showPreview = showPreview; - return this; - } - - /** - * This allows the requester to enable the editor/preview experience. - - * `show_preview=true`: Allows requesters to enable the editor/preview - * experience. - `show_preview=false`: Allows requesters to disable the - * editor/preview experience. - * - * @return showPreview - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowPreview() { - return showPreview; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { - this.showPreview = showPreview; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showProgressStepper( - Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signers( - List signers) { - this.signers = signers; - return this; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest addSignersItem( - SubUnclaimedDraftTemplateSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Templated-based Signature Request. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - return this; - } - - /** - * Disables the \"Me (Now)\" option for the person preparing the document. Does not - * work with type `send_document`. Defaults to `false`. - * - * @return skipMeNow - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getSkipMeNow() { - return skipMeNow; - } - - @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { - this.skipMeNow = skipMeNow; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest title(String title) { - this.title = title; - return this; - } - - /** - * The title you want to assign to the SignatureRequest. - * - * @return title - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTitle() { - return title; - } - - @JsonProperty(JSON_PROPERTY_TITLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { - this.title = title; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - return this; - } - - /** - * Controls whether [auto fill - * fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can - * automatically populate a signer's information during signing. **NOTE:** Keep your - * signer's information safe by ensuring that the _signer on your signature request is the - * intended party_ before using this feature. - * - * @return populateAutoFillFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getPopulateAutoFillFields() { - return populateAutoFillFields; - } - - @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { - this.populateAutoFillFields = populateAutoFillFields; - } - - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - return this; - } - - /** - * This allows the requester to specify whether the user is allowed to provide email addresses - * to CC when claiming the draft. - * - * @return allowCcs - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowCcs() { - return allowCcs; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_CCS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { - this.allowCcs = allowCcs; - } - - /** Return true if this UnclaimedDraftCreateEmbeddedWithTemplateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftCreateEmbeddedWithTemplateRequest - unclaimedDraftCreateEmbeddedWithTemplateRequest = - (UnclaimedDraftCreateEmbeddedWithTemplateRequest) o; - return Objects.equals( - this.clientId, unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId) - && Objects.equals( - this.requesterEmailAddress, - unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress) - && Objects.equals( - this.templateIds, - unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds) - && Objects.equals( - this.allowDecline, - unclaimedDraftCreateEmbeddedWithTemplateRequest.allowDecline) - && Objects.equals( - this.allowReassign, - unclaimedDraftCreateEmbeddedWithTemplateRequest.allowReassign) - && Objects.equals(this.ccs, unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs) - && Objects.equals( - this.customFields, - unclaimedDraftCreateEmbeddedWithTemplateRequest.customFields) - && Objects.equals( - this.editorOptions, - unclaimedDraftCreateEmbeddedWithTemplateRequest.editorOptions) - && Objects.equals( - this.fieldOptions, - unclaimedDraftCreateEmbeddedWithTemplateRequest.fieldOptions) - && Objects.equals(this.files, unclaimedDraftCreateEmbeddedWithTemplateRequest.files) - && Objects.equals( - this.fileUrls, unclaimedDraftCreateEmbeddedWithTemplateRequest.fileUrls) - && Objects.equals( - this.forceSignerRoles, - unclaimedDraftCreateEmbeddedWithTemplateRequest.forceSignerRoles) - && Objects.equals( - this.forceSubjectMessage, - unclaimedDraftCreateEmbeddedWithTemplateRequest.forceSubjectMessage) - && Objects.equals( - this.holdRequest, - unclaimedDraftCreateEmbeddedWithTemplateRequest.holdRequest) - && Objects.equals( - this.isForEmbeddedSigning, - unclaimedDraftCreateEmbeddedWithTemplateRequest.isForEmbeddedSigning) - && Objects.equals( - this.message, unclaimedDraftCreateEmbeddedWithTemplateRequest.message) - && Objects.equals( - this.metadata, unclaimedDraftCreateEmbeddedWithTemplateRequest.metadata) - && Objects.equals( - this.previewOnly, - unclaimedDraftCreateEmbeddedWithTemplateRequest.previewOnly) - && Objects.equals( - this.requestingRedirectUrl, - unclaimedDraftCreateEmbeddedWithTemplateRequest.requestingRedirectUrl) - && Objects.equals( - this.showPreview, - unclaimedDraftCreateEmbeddedWithTemplateRequest.showPreview) - && Objects.equals( - this.showProgressStepper, - unclaimedDraftCreateEmbeddedWithTemplateRequest.showProgressStepper) - && Objects.equals( - this.signers, unclaimedDraftCreateEmbeddedWithTemplateRequest.signers) - && Objects.equals( - this.signingOptions, - unclaimedDraftCreateEmbeddedWithTemplateRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, - unclaimedDraftCreateEmbeddedWithTemplateRequest.signingRedirectUrl) - && Objects.equals( - this.skipMeNow, unclaimedDraftCreateEmbeddedWithTemplateRequest.skipMeNow) - && Objects.equals( - this.subject, unclaimedDraftCreateEmbeddedWithTemplateRequest.subject) - && Objects.equals( - this.testMode, unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode) - && Objects.equals(this.title, unclaimedDraftCreateEmbeddedWithTemplateRequest.title) - && Objects.equals( - this.populateAutoFillFields, - unclaimedDraftCreateEmbeddedWithTemplateRequest.populateAutoFillFields) - && Objects.equals( - this.allowCcs, unclaimedDraftCreateEmbeddedWithTemplateRequest.allowCcs); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - requesterEmailAddress, - templateIds, - allowDecline, - allowReassign, - ccs, - customFields, - editorOptions, - fieldOptions, - files, - fileUrls, - forceSignerRoles, - forceSubjectMessage, - holdRequest, - isForEmbeddedSigning, - message, - metadata, - previewOnly, - requestingRedirectUrl, - showPreview, - showProgressStepper, - signers, - signingOptions, - signingRedirectUrl, - skipMeNow, - subject, - testMode, - title, - populateAutoFillFields, - allowCcs); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftCreateEmbeddedWithTemplateRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" requesterEmailAddress: ") - .append(toIndentedString(requesterEmailAddress)) - .append("\n"); - sb.append(" templateIds: ").append(toIndentedString(templateIds)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" allowReassign: ").append(toIndentedString(allowReassign)).append("\n"); - sb.append(" ccs: ").append(toIndentedString(ccs)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" editorOptions: ").append(toIndentedString(editorOptions)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" forceSignerRoles: ").append(toIndentedString(forceSignerRoles)).append("\n"); - sb.append(" forceSubjectMessage: ") - .append(toIndentedString(forceSubjectMessage)) - .append("\n"); - sb.append(" holdRequest: ").append(toIndentedString(holdRequest)).append("\n"); - sb.append(" isForEmbeddedSigning: ") - .append(toIndentedString(isForEmbeddedSigning)) - .append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" previewOnly: ").append(toIndentedString(previewOnly)).append("\n"); - sb.append(" requestingRedirectUrl: ") - .append(toIndentedString(requestingRedirectUrl)) - .append("\n"); - sb.append(" showPreview: ").append(toIndentedString(showPreview)).append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" skipMeNow: ").append(toIndentedString(skipMeNow)).append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" title: ").append(toIndentedString(title)).append("\n"); - sb.append(" populateAutoFillFields: ") - .append(toIndentedString(populateAutoFillFields)) - .append("\n"); - sb.append(" allowCcs: ").append(toIndentedString(allowCcs)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (requesterEmailAddress != null) { - if (isFileTypeOrListOfFiles(requesterEmailAddress)) { - fileTypeFound = true; - } - - if (requesterEmailAddress.getClass().equals(java.io.File.class) - || requesterEmailAddress.getClass().equals(Integer.class) - || requesterEmailAddress.getClass().equals(String.class) - || requesterEmailAddress.getClass().isEnum()) { - map.put("requester_email_address", requesterEmailAddress); - } else if (isListOfFile(requesterEmailAddress)) { - for (int i = 0; i < getListSize(requesterEmailAddress); i++) { - map.put( - "requester_email_address[" + i + "]", - getFromList(requesterEmailAddress, i)); - } - } else { - map.put( - "requester_email_address", - JSON.getDefault() - .getMapper() - .writeValueAsString(requesterEmailAddress)); - } - } - if (templateIds != null) { - if (isFileTypeOrListOfFiles(templateIds)) { - fileTypeFound = true; - } - - if (templateIds.getClass().equals(java.io.File.class) - || templateIds.getClass().equals(Integer.class) - || templateIds.getClass().equals(String.class) - || templateIds.getClass().isEnum()) { - map.put("template_ids", templateIds); - } else if (isListOfFile(templateIds)) { - for (int i = 0; i < getListSize(templateIds); i++) { - map.put("template_ids[" + i + "]", getFromList(templateIds, i)); - } - } else { - map.put( - "template_ids", - JSON.getDefault().getMapper().writeValueAsString(templateIds)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (allowReassign != null) { - if (isFileTypeOrListOfFiles(allowReassign)) { - fileTypeFound = true; - } - - if (allowReassign.getClass().equals(java.io.File.class) - || allowReassign.getClass().equals(Integer.class) - || allowReassign.getClass().equals(String.class) - || allowReassign.getClass().isEnum()) { - map.put("allow_reassign", allowReassign); - } else if (isListOfFile(allowReassign)) { - for (int i = 0; i < getListSize(allowReassign); i++) { - map.put("allow_reassign[" + i + "]", getFromList(allowReassign, i)); - } - } else { - map.put( - "allow_reassign", - JSON.getDefault().getMapper().writeValueAsString(allowReassign)); - } - } - if (ccs != null) { - if (isFileTypeOrListOfFiles(ccs)) { - fileTypeFound = true; - } - - if (ccs.getClass().equals(java.io.File.class) - || ccs.getClass().equals(Integer.class) - || ccs.getClass().equals(String.class) - || ccs.getClass().isEnum()) { - map.put("ccs", ccs); - } else if (isListOfFile(ccs)) { - for (int i = 0; i < getListSize(ccs); i++) { - map.put("ccs[" + i + "]", getFromList(ccs, i)); - } - } else { - map.put("ccs", JSON.getDefault().getMapper().writeValueAsString(ccs)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (editorOptions != null) { - if (isFileTypeOrListOfFiles(editorOptions)) { - fileTypeFound = true; - } - - if (editorOptions.getClass().equals(java.io.File.class) - || editorOptions.getClass().equals(Integer.class) - || editorOptions.getClass().equals(String.class) - || editorOptions.getClass().isEnum()) { - map.put("editor_options", editorOptions); - } else if (isListOfFile(editorOptions)) { - for (int i = 0; i < getListSize(editorOptions); i++) { - map.put("editor_options[" + i + "]", getFromList(editorOptions, i)); - } - } else { - map.put( - "editor_options", - JSON.getDefault().getMapper().writeValueAsString(editorOptions)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (forceSignerRoles != null) { - if (isFileTypeOrListOfFiles(forceSignerRoles)) { - fileTypeFound = true; - } - - if (forceSignerRoles.getClass().equals(java.io.File.class) - || forceSignerRoles.getClass().equals(Integer.class) - || forceSignerRoles.getClass().equals(String.class) - || forceSignerRoles.getClass().isEnum()) { - map.put("force_signer_roles", forceSignerRoles); - } else if (isListOfFile(forceSignerRoles)) { - for (int i = 0; i < getListSize(forceSignerRoles); i++) { - map.put("force_signer_roles[" + i + "]", getFromList(forceSignerRoles, i)); - } - } else { - map.put( - "force_signer_roles", - JSON.getDefault().getMapper().writeValueAsString(forceSignerRoles)); - } - } - if (forceSubjectMessage != null) { - if (isFileTypeOrListOfFiles(forceSubjectMessage)) { - fileTypeFound = true; - } - - if (forceSubjectMessage.getClass().equals(java.io.File.class) - || forceSubjectMessage.getClass().equals(Integer.class) - || forceSubjectMessage.getClass().equals(String.class) - || forceSubjectMessage.getClass().isEnum()) { - map.put("force_subject_message", forceSubjectMessage); - } else if (isListOfFile(forceSubjectMessage)) { - for (int i = 0; i < getListSize(forceSubjectMessage); i++) { - map.put( - "force_subject_message[" + i + "]", - getFromList(forceSubjectMessage, i)); - } - } else { - map.put( - "force_subject_message", - JSON.getDefault().getMapper().writeValueAsString(forceSubjectMessage)); - } - } - if (holdRequest != null) { - if (isFileTypeOrListOfFiles(holdRequest)) { - fileTypeFound = true; - } - - if (holdRequest.getClass().equals(java.io.File.class) - || holdRequest.getClass().equals(Integer.class) - || holdRequest.getClass().equals(String.class) - || holdRequest.getClass().isEnum()) { - map.put("hold_request", holdRequest); - } else if (isListOfFile(holdRequest)) { - for (int i = 0; i < getListSize(holdRequest); i++) { - map.put("hold_request[" + i + "]", getFromList(holdRequest, i)); - } - } else { - map.put( - "hold_request", - JSON.getDefault().getMapper().writeValueAsString(holdRequest)); - } - } - if (isForEmbeddedSigning != null) { - if (isFileTypeOrListOfFiles(isForEmbeddedSigning)) { - fileTypeFound = true; - } - - if (isForEmbeddedSigning.getClass().equals(java.io.File.class) - || isForEmbeddedSigning.getClass().equals(Integer.class) - || isForEmbeddedSigning.getClass().equals(String.class) - || isForEmbeddedSigning.getClass().isEnum()) { - map.put("is_for_embedded_signing", isForEmbeddedSigning); - } else if (isListOfFile(isForEmbeddedSigning)) { - for (int i = 0; i < getListSize(isForEmbeddedSigning); i++) { - map.put( - "is_for_embedded_signing[" + i + "]", - getFromList(isForEmbeddedSigning, i)); - } - } else { - map.put( - "is_for_embedded_signing", - JSON.getDefault().getMapper().writeValueAsString(isForEmbeddedSigning)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (previewOnly != null) { - if (isFileTypeOrListOfFiles(previewOnly)) { - fileTypeFound = true; - } - - if (previewOnly.getClass().equals(java.io.File.class) - || previewOnly.getClass().equals(Integer.class) - || previewOnly.getClass().equals(String.class) - || previewOnly.getClass().isEnum()) { - map.put("preview_only", previewOnly); - } else if (isListOfFile(previewOnly)) { - for (int i = 0; i < getListSize(previewOnly); i++) { - map.put("preview_only[" + i + "]", getFromList(previewOnly, i)); - } - } else { - map.put( - "preview_only", - JSON.getDefault().getMapper().writeValueAsString(previewOnly)); - } - } - if (requestingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(requestingRedirectUrl)) { - fileTypeFound = true; - } - - if (requestingRedirectUrl.getClass().equals(java.io.File.class) - || requestingRedirectUrl.getClass().equals(Integer.class) - || requestingRedirectUrl.getClass().equals(String.class) - || requestingRedirectUrl.getClass().isEnum()) { - map.put("requesting_redirect_url", requestingRedirectUrl); - } else if (isListOfFile(requestingRedirectUrl)) { - for (int i = 0; i < getListSize(requestingRedirectUrl); i++) { - map.put( - "requesting_redirect_url[" + i + "]", - getFromList(requestingRedirectUrl, i)); - } - } else { - map.put( - "requesting_redirect_url", - JSON.getDefault() - .getMapper() - .writeValueAsString(requestingRedirectUrl)); - } - } - if (showPreview != null) { - if (isFileTypeOrListOfFiles(showPreview)) { - fileTypeFound = true; - } - - if (showPreview.getClass().equals(java.io.File.class) - || showPreview.getClass().equals(Integer.class) - || showPreview.getClass().equals(String.class) - || showPreview.getClass().isEnum()) { - map.put("show_preview", showPreview); - } else if (isListOfFile(showPreview)) { - for (int i = 0; i < getListSize(showPreview); i++) { - map.put("show_preview[" + i + "]", getFromList(showPreview, i)); - } - } else { - map.put( - "show_preview", - JSON.getDefault().getMapper().writeValueAsString(showPreview)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (skipMeNow != null) { - if (isFileTypeOrListOfFiles(skipMeNow)) { - fileTypeFound = true; - } - - if (skipMeNow.getClass().equals(java.io.File.class) - || skipMeNow.getClass().equals(Integer.class) - || skipMeNow.getClass().equals(String.class) - || skipMeNow.getClass().isEnum()) { - map.put("skip_me_now", skipMeNow); - } else if (isListOfFile(skipMeNow)) { - for (int i = 0; i < getListSize(skipMeNow); i++) { - map.put("skip_me_now[" + i + "]", getFromList(skipMeNow, i)); - } - } else { - map.put( - "skip_me_now", - JSON.getDefault().getMapper().writeValueAsString(skipMeNow)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (title != null) { - if (isFileTypeOrListOfFiles(title)) { - fileTypeFound = true; - } - - if (title.getClass().equals(java.io.File.class) - || title.getClass().equals(Integer.class) - || title.getClass().equals(String.class) - || title.getClass().isEnum()) { - map.put("title", title); - } else if (isListOfFile(title)) { - for (int i = 0; i < getListSize(title); i++) { - map.put("title[" + i + "]", getFromList(title, i)); - } - } else { - map.put("title", JSON.getDefault().getMapper().writeValueAsString(title)); - } - } - if (populateAutoFillFields != null) { - if (isFileTypeOrListOfFiles(populateAutoFillFields)) { - fileTypeFound = true; - } - - if (populateAutoFillFields.getClass().equals(java.io.File.class) - || populateAutoFillFields.getClass().equals(Integer.class) - || populateAutoFillFields.getClass().equals(String.class) - || populateAutoFillFields.getClass().isEnum()) { - map.put("populate_auto_fill_fields", populateAutoFillFields); - } else if (isListOfFile(populateAutoFillFields)) { - for (int i = 0; i < getListSize(populateAutoFillFields); i++) { - map.put( - "populate_auto_fill_fields[" + i + "]", - getFromList(populateAutoFillFields, i)); - } - } else { - map.put( - "populate_auto_fill_fields", - JSON.getDefault() - .getMapper() - .writeValueAsString(populateAutoFillFields)); - } - } - if (allowCcs != null) { - if (isFileTypeOrListOfFiles(allowCcs)) { - fileTypeFound = true; - } - - if (allowCcs.getClass().equals(java.io.File.class) - || allowCcs.getClass().equals(Integer.class) - || allowCcs.getClass().equals(String.class) - || allowCcs.getClass().isEnum()) { - map.put("allow_ccs", allowCcs); - } else if (isListOfFile(allowCcs)) { - for (int i = 0; i < getListSize(allowCcs); i++) { - map.put("allow_ccs[" + i + "]", getFromList(allowCcs, i)); - } - } else { - map.put( - "allow_ccs", - JSON.getDefault().getMapper().writeValueAsString(allowCcs)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java deleted file mode 100644 index 2c2d0ff14..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java +++ /dev/null @@ -1,1497 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** */ -@JsonPropertyOrder({ - UnclaimedDraftCreateRequest.JSON_PROPERTY_TYPE, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FILES, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FILE_URLS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_ALLOW_DECLINE, - UnclaimedDraftCreateRequest.JSON_PROPERTY_ATTACHMENTS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_CC_EMAIL_ADDRESSES, - UnclaimedDraftCreateRequest.JSON_PROPERTY_CLIENT_ID, - UnclaimedDraftCreateRequest.JSON_PROPERTY_CUSTOM_FIELDS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FIELD_OPTIONS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FORM_FIELD_GROUPS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FORM_FIELD_RULES, - UnclaimedDraftCreateRequest.JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT, - UnclaimedDraftCreateRequest.JSON_PROPERTY_HIDE_TEXT_TAGS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_MESSAGE, - UnclaimedDraftCreateRequest.JSON_PROPERTY_METADATA, - UnclaimedDraftCreateRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - UnclaimedDraftCreateRequest.JSON_PROPERTY_SIGNERS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_SIGNING_OPTIONS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - UnclaimedDraftCreateRequest.JSON_PROPERTY_SUBJECT, - UnclaimedDraftCreateRequest.JSON_PROPERTY_TEST_MODE, - UnclaimedDraftCreateRequest.JSON_PROPERTY_USE_PREEXISTING_FIELDS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_USE_TEXT_TAGS, - UnclaimedDraftCreateRequest.JSON_PROPERTY_EXPIRES_AT -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftCreateRequest { - /** - * The type of unclaimed draft to create. Use `send_document` to create a claimable - * file, and `request_signature` for a claimable signature request. If the type is - * `request_signature` then signers name and email_address are not optional. - */ - public enum TypeEnum { - SEND_DOCUMENT("send_document"), - - REQUEST_SIGNATURE("request_signature"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; - - public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; - - public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; - - public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; - - public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; - - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; - - public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; - - public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; - - public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; - - public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; - - public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; - - public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; - - public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public UnclaimedDraftCreateRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftCreateRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, UnclaimedDraftCreateRequest.class); - } - - public static UnclaimedDraftCreateRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - UnclaimedDraftCreateRequest.class); - } - - public UnclaimedDraftCreateRequest type(TypeEnum type) { - this.type = type; - return this; - } - - /** - * The type of unclaimed draft to create. Use `send_document` to create a claimable - * file, and `request_signature` for a claimable signature request. If the type is - * `request_signature` then signers name and email_address are not optional. - * - * @return type - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TypeEnum getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { - this.type = type; - } - - public UnclaimedDraftCreateRequest files(List files) { - this.files = files; - return this; - } - - public UnclaimedDraftCreateRequest addFilesItem(File filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint - * requires either **files** or **file_urls[]**, but not both. - * - * @return files - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFiles() { - return files; - } - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - public UnclaimedDraftCreateRequest fileUrls(List fileUrls) { - this.fileUrls = fileUrls; - return this; - } - - public UnclaimedDraftCreateRequest addFileUrlsItem(String fileUrlsItem) { - if (this.fileUrls == null) { - this.fileUrls = new ArrayList<>(); - } - this.fileUrls.add(fileUrlsItem); - return this; - } - - /** - * Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. - * This endpoint requires either **files** or **file_urls[]**, but not both. - * - * @return fileUrls - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFileUrls() { - return fileUrls; - } - - @JsonProperty(JSON_PROPERTY_FILE_URLS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { - this.fileUrls = fileUrls; - } - - public UnclaimedDraftCreateRequest allowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - return this; - } - - /** - * Allows signers to decline to sign a document if `true`. Defaults to - * `false`. - * - * @return allowDecline - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getAllowDecline() { - return allowDecline; - } - - @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { - this.allowDecline = allowDecline; - } - - public UnclaimedDraftCreateRequest attachments(List attachments) { - this.attachments = attachments; - return this; - } - - public UnclaimedDraftCreateRequest addAttachmentsItem(SubAttachment attachmentsItem) { - if (this.attachments == null) { - this.attachments = new ArrayList<>(); - } - this.attachments.add(attachmentsItem); - return this; - } - - /** - * A list describing the attachments - * - * @return attachments - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAttachments() { - return attachments; - } - - @JsonProperty(JSON_PROPERTY_ATTACHMENTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { - this.attachments = attachments; - } - - public UnclaimedDraftCreateRequest ccEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - return this; - } - - public UnclaimedDraftCreateRequest addCcEmailAddressesItem(String ccEmailAddressesItem) { - if (this.ccEmailAddresses == null) { - this.ccEmailAddresses = new ArrayList<>(); - } - this.ccEmailAddresses.add(ccEmailAddressesItem); - return this; - } - - /** - * The email addresses that should be CCed. - * - * @return ccEmailAddresses - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCcEmailAddresses() { - return ccEmailAddresses; - } - - @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { - this.ccEmailAddresses = ccEmailAddresses; - } - - public UnclaimedDraftCreateRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app used to create the draft. Used to apply the branding and callback url - * defined for the app. - * - * @return clientId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public UnclaimedDraftCreateRequest customFields(List customFields) { - this.customFields = customFields; - return this; - } - - public UnclaimedDraftCreateRequest addCustomFieldsItem(SubCustomField customFieldsItem) { - if (this.customFields == null) { - this.customFields = new ArrayList<>(); - } - this.customFields.add(customFieldsItem); - return this; - } - - /** - * When used together with merge fields, `custom_fields` allows users to add - * pre-filled data to their signature requests. Pre-filled data can be used with - * \"send-once\" signature requests by adding merge fields with - * `form_fields_per_document` or [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values - * back with `custom_fields` together in one API call. For using pre-filled on - * repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or - * by calling - * [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and - * then passing `custom_fields` on subsequent signature requests referencing that - * template. - * - * @return customFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCustomFields() { - return customFields; - } - - @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { - this.customFields = customFields; - } - - public UnclaimedDraftCreateRequest fieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - return this; - } - - /** - * Get fieldOptions - * - * @return fieldOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubFieldOptions getFieldOptions() { - return fieldOptions; - } - - @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { - this.fieldOptions = fieldOptions; - } - - public UnclaimedDraftCreateRequest formFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - return this; - } - - public UnclaimedDraftCreateRequest addFormFieldGroupsItem( - SubFormFieldGroup formFieldGroupsItem) { - if (this.formFieldGroups == null) { - this.formFieldGroups = new ArrayList<>(); - } - this.formFieldGroups.add(formFieldGroupsItem); - return this; - } - - /** - * Group information for fields defined in `form_fields_per_document`. String-indexed - * JSON array with `group_label` and `requirement` keys. - * `form_fields_per_document` must contain fields referencing a group defined in - * `form_field_groups`. - * - * @return formFieldGroups - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldGroups() { - return formFieldGroups; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { - this.formFieldGroups = formFieldGroups; - } - - public UnclaimedDraftCreateRequest formFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - return this; - } - - public UnclaimedDraftCreateRequest addFormFieldRulesItem(SubFormFieldRule formFieldRulesItem) { - if (this.formFieldRules == null) { - this.formFieldRules = new ArrayList<>(); - } - this.formFieldRules.add(formFieldRulesItem); - return this; - } - - /** - * Conditional Logic rules for fields defined in `form_fields_per_document`. - * - * @return formFieldRules - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldRules() { - return formFieldRules; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { - this.formFieldRules = formFieldRules; - } - - public UnclaimedDraftCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - return this; - } - - public UnclaimedDraftCreateRequest addFormFieldsPerDocumentItem( - SubFormFieldsPerDocumentBase formFieldsPerDocumentItem) { - if (this.formFieldsPerDocument == null) { - this.formFieldsPerDocument = new ArrayList<>(); - } - this.formFieldsPerDocument.add(formFieldsPerDocumentItem); - return this; - } - - /** - * The fields that should appear on the document, expressed as an array of objects. (For more - * details you can read about it here: [Using Form Fields per - * Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, - * **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and - * optional parameters. Check out the list of [additional - * parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text - * Field use `SubFormFieldsPerDocumentText` * Dropdown Field use - * `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use - * `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use - * `SubFormFieldsPerDocumentCheckbox` * Radio Field use - * `SubFormFieldsPerDocumentRadio` * Signature Field use - * `SubFormFieldsPerDocumentSignature` * Date Signed Field use - * `SubFormFieldsPerDocumentDateSigned` * Initials Field use - * `SubFormFieldsPerDocumentInitials` * Text Merge Field use - * `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use - * `SubFormFieldsPerDocumentCheckboxMerge` - * - * @return formFieldsPerDocument - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getFormFieldsPerDocument() { - return formFieldsPerDocument; - } - - @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { - this.formFieldsPerDocument = formFieldsPerDocument; - } - - public UnclaimedDraftCreateRequest hideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - return this; - } - - /** - * Send with a value of `true` if you wish to enable automatic Text Tag removal. - * Defaults to `false`. When using Text Tags it is preferred that you set this to - * `false` and hide your tags with white text or something similar because the - * automatic removal system can cause unwanted clipping. See the [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more - * details. - * - * @return hideTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getHideTextTags() { - return hideTextTags; - } - - @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { - this.hideTextTags = hideTextTags; - } - - public UnclaimedDraftCreateRequest message(String message) { - this.message = message; - return this; - } - - /** - * The custom message in the email that will be sent to the signers. - * - * @return message - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getMessage() { - return message; - } - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - public UnclaimedDraftCreateRequest metadata(Map metadata) { - this.metadata = metadata; - return this; - } - - public UnclaimedDraftCreateRequest putMetadataItem(String key, Object metadataItem) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); - } - this.metadata.put(key, metadataItem); - return this; - } - - /** - * Key-value data that should be attached to the signature request. This metadata is included in - * all API responses and events involving the signature request. For example, use the metadata - * field to store a signer's order number for look up when receiving events for the - * signature request. Each request can include up to 10 metadata keys (or 50 nested metadata - * keys), with key names up to 40 characters long and values up to 1000 characters long. - * - * @return metadata - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public Map getMetadata() { - return metadata; - } - - @JsonProperty(JSON_PROPERTY_METADATA) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { - this.metadata = metadata; - } - - public UnclaimedDraftCreateRequest showProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public UnclaimedDraftCreateRequest signers(List signers) { - this.signers = signers; - return this; - } - - public UnclaimedDraftCreateRequest addSignersItem(SubUnclaimedDraftSigner signersItem) { - if (this.signers == null) { - this.signers = new ArrayList<>(); - } - this.signers.add(signersItem); - return this; - } - - /** - * Add Signers to your Unclaimed Draft Signature Request. - * - * @return signers - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getSigners() { - return signers; - } - - @JsonProperty(JSON_PROPERTY_SIGNERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { - this.signers = signers; - } - - public UnclaimedDraftCreateRequest signingOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - return this; - } - - /** - * Get signingOptions - * - * @return signingOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubSigningOptions getSigningOptions() { - return signingOptions; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { - this.signingOptions = signingOptions; - } - - public UnclaimedDraftCreateRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public UnclaimedDraftCreateRequest subject(String subject) { - this.subject = subject; - return this; - } - - /** - * The subject in the email that will be sent to the signers. - * - * @return subject - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSubject() { - return subject; - } - - @JsonProperty(JSON_PROPERTY_SUBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { - this.subject = subject; - } - - public UnclaimedDraftCreateRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - public UnclaimedDraftCreateRequest usePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - return this; - } - - /** - * Set `use_text_tags` to `true` to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document (defaults to disabled, or `false`). Alternatively, if your PDF contains - * pre-defined fields, enable the detection of these fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). Currently we only support use of either `use_text_tags` or - * `use_preexisting_fields` parameter, not both. - * - * @return usePreexistingFields - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUsePreexistingFields() { - return usePreexistingFields; - } - - @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { - this.usePreexistingFields = usePreexistingFields; - } - - public UnclaimedDraftCreateRequest useTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - return this; - } - - /** - * Set `use_text_tags` to `true` to enable [Text - * Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your - * document (defaults to disabled, or `false`). Alternatively, if your PDF contains - * pre-defined fields, enable the detection of these fields by setting the - * `use_preexisting_fields` to `true` (defaults to disabled, or - * `false`). Currently we only support use of either `use_text_tags` or - * `use_preexisting_fields` parameter, not both. - * - * @return useTextTags - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getUseTextTags() { - return useTextTags; - } - - @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { - this.useTextTags = useTextTags; - } - - public UnclaimedDraftCreateRequest expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the signature request will expire. Unsigned signatures will be moved to the expired - * status, and no longer signable. See [Signature Request Expiration - * Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. - * **NOTE:** This does not correspond to the **expires_at** returned in the response. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - /** Return true if this UnclaimedDraftCreateRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftCreateRequest unclaimedDraftCreateRequest = (UnclaimedDraftCreateRequest) o; - return Objects.equals(this.type, unclaimedDraftCreateRequest.type) - && Objects.equals(this.files, unclaimedDraftCreateRequest.files) - && Objects.equals(this.fileUrls, unclaimedDraftCreateRequest.fileUrls) - && Objects.equals(this.allowDecline, unclaimedDraftCreateRequest.allowDecline) - && Objects.equals(this.attachments, unclaimedDraftCreateRequest.attachments) - && Objects.equals( - this.ccEmailAddresses, unclaimedDraftCreateRequest.ccEmailAddresses) - && Objects.equals(this.clientId, unclaimedDraftCreateRequest.clientId) - && Objects.equals(this.customFields, unclaimedDraftCreateRequest.customFields) - && Objects.equals(this.fieldOptions, unclaimedDraftCreateRequest.fieldOptions) - && Objects.equals(this.formFieldGroups, unclaimedDraftCreateRequest.formFieldGroups) - && Objects.equals(this.formFieldRules, unclaimedDraftCreateRequest.formFieldRules) - && Objects.equals( - this.formFieldsPerDocument, - unclaimedDraftCreateRequest.formFieldsPerDocument) - && Objects.equals(this.hideTextTags, unclaimedDraftCreateRequest.hideTextTags) - && Objects.equals(this.message, unclaimedDraftCreateRequest.message) - && Objects.equals(this.metadata, unclaimedDraftCreateRequest.metadata) - && Objects.equals( - this.showProgressStepper, unclaimedDraftCreateRequest.showProgressStepper) - && Objects.equals(this.signers, unclaimedDraftCreateRequest.signers) - && Objects.equals(this.signingOptions, unclaimedDraftCreateRequest.signingOptions) - && Objects.equals( - this.signingRedirectUrl, unclaimedDraftCreateRequest.signingRedirectUrl) - && Objects.equals(this.subject, unclaimedDraftCreateRequest.subject) - && Objects.equals(this.testMode, unclaimedDraftCreateRequest.testMode) - && Objects.equals( - this.usePreexistingFields, unclaimedDraftCreateRequest.usePreexistingFields) - && Objects.equals(this.useTextTags, unclaimedDraftCreateRequest.useTextTags) - && Objects.equals(this.expiresAt, unclaimedDraftCreateRequest.expiresAt); - } - - @Override - public int hashCode() { - return Objects.hash( - type, - files, - fileUrls, - allowDecline, - attachments, - ccEmailAddresses, - clientId, - customFields, - fieldOptions, - formFieldGroups, - formFieldRules, - formFieldsPerDocument, - hideTextTags, - message, - metadata, - showProgressStepper, - signers, - signingOptions, - signingRedirectUrl, - subject, - testMode, - usePreexistingFields, - useTextTags, - expiresAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftCreateRequest {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append(" fileUrls: ").append(toIndentedString(fileUrls)).append("\n"); - sb.append(" allowDecline: ").append(toIndentedString(allowDecline)).append("\n"); - sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n"); - sb.append(" ccEmailAddresses: ").append(toIndentedString(ccEmailAddresses)).append("\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); - sb.append(" fieldOptions: ").append(toIndentedString(fieldOptions)).append("\n"); - sb.append(" formFieldGroups: ").append(toIndentedString(formFieldGroups)).append("\n"); - sb.append(" formFieldRules: ").append(toIndentedString(formFieldRules)).append("\n"); - sb.append(" formFieldsPerDocument: ") - .append(toIndentedString(formFieldsPerDocument)) - .append("\n"); - sb.append(" hideTextTags: ").append(toIndentedString(hideTextTags)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" signers: ").append(toIndentedString(signers)).append("\n"); - sb.append(" signingOptions: ").append(toIndentedString(signingOptions)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append(" usePreexistingFields: ") - .append(toIndentedString(usePreexistingFields)) - .append("\n"); - sb.append(" useTextTags: ").append(toIndentedString(useTextTags)).append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (type != null) { - if (isFileTypeOrListOfFiles(type)) { - fileTypeFound = true; - } - - if (type.getClass().equals(java.io.File.class) - || type.getClass().equals(Integer.class) - || type.getClass().equals(String.class) - || type.getClass().isEnum()) { - map.put("type", type); - } else if (isListOfFile(type)) { - for (int i = 0; i < getListSize(type); i++) { - map.put("type[" + i + "]", getFromList(type, i)); - } - } else { - map.put("type", JSON.getDefault().getMapper().writeValueAsString(type)); - } - } - if (files != null) { - if (isFileTypeOrListOfFiles(files)) { - fileTypeFound = true; - } - - if (files.getClass().equals(java.io.File.class) - || files.getClass().equals(Integer.class) - || files.getClass().equals(String.class) - || files.getClass().isEnum()) { - map.put("files", files); - } else if (isListOfFile(files)) { - for (int i = 0; i < getListSize(files); i++) { - map.put("files[" + i + "]", getFromList(files, i)); - } - } else { - map.put("files", JSON.getDefault().getMapper().writeValueAsString(files)); - } - } - if (fileUrls != null) { - if (isFileTypeOrListOfFiles(fileUrls)) { - fileTypeFound = true; - } - - if (fileUrls.getClass().equals(java.io.File.class) - || fileUrls.getClass().equals(Integer.class) - || fileUrls.getClass().equals(String.class) - || fileUrls.getClass().isEnum()) { - map.put("file_urls", fileUrls); - } else if (isListOfFile(fileUrls)) { - for (int i = 0; i < getListSize(fileUrls); i++) { - map.put("file_urls[" + i + "]", getFromList(fileUrls, i)); - } - } else { - map.put( - "file_urls", - JSON.getDefault().getMapper().writeValueAsString(fileUrls)); - } - } - if (allowDecline != null) { - if (isFileTypeOrListOfFiles(allowDecline)) { - fileTypeFound = true; - } - - if (allowDecline.getClass().equals(java.io.File.class) - || allowDecline.getClass().equals(Integer.class) - || allowDecline.getClass().equals(String.class) - || allowDecline.getClass().isEnum()) { - map.put("allow_decline", allowDecline); - } else if (isListOfFile(allowDecline)) { - for (int i = 0; i < getListSize(allowDecline); i++) { - map.put("allow_decline[" + i + "]", getFromList(allowDecline, i)); - } - } else { - map.put( - "allow_decline", - JSON.getDefault().getMapper().writeValueAsString(allowDecline)); - } - } - if (attachments != null) { - if (isFileTypeOrListOfFiles(attachments)) { - fileTypeFound = true; - } - - if (attachments.getClass().equals(java.io.File.class) - || attachments.getClass().equals(Integer.class) - || attachments.getClass().equals(String.class) - || attachments.getClass().isEnum()) { - map.put("attachments", attachments); - } else if (isListOfFile(attachments)) { - for (int i = 0; i < getListSize(attachments); i++) { - map.put("attachments[" + i + "]", getFromList(attachments, i)); - } - } else { - map.put( - "attachments", - JSON.getDefault().getMapper().writeValueAsString(attachments)); - } - } - if (ccEmailAddresses != null) { - if (isFileTypeOrListOfFiles(ccEmailAddresses)) { - fileTypeFound = true; - } - - if (ccEmailAddresses.getClass().equals(java.io.File.class) - || ccEmailAddresses.getClass().equals(Integer.class) - || ccEmailAddresses.getClass().equals(String.class) - || ccEmailAddresses.getClass().isEnum()) { - map.put("cc_email_addresses", ccEmailAddresses); - } else if (isListOfFile(ccEmailAddresses)) { - for (int i = 0; i < getListSize(ccEmailAddresses); i++) { - map.put("cc_email_addresses[" + i + "]", getFromList(ccEmailAddresses, i)); - } - } else { - map.put( - "cc_email_addresses", - JSON.getDefault().getMapper().writeValueAsString(ccEmailAddresses)); - } - } - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (customFields != null) { - if (isFileTypeOrListOfFiles(customFields)) { - fileTypeFound = true; - } - - if (customFields.getClass().equals(java.io.File.class) - || customFields.getClass().equals(Integer.class) - || customFields.getClass().equals(String.class) - || customFields.getClass().isEnum()) { - map.put("custom_fields", customFields); - } else if (isListOfFile(customFields)) { - for (int i = 0; i < getListSize(customFields); i++) { - map.put("custom_fields[" + i + "]", getFromList(customFields, i)); - } - } else { - map.put( - "custom_fields", - JSON.getDefault().getMapper().writeValueAsString(customFields)); - } - } - if (fieldOptions != null) { - if (isFileTypeOrListOfFiles(fieldOptions)) { - fileTypeFound = true; - } - - if (fieldOptions.getClass().equals(java.io.File.class) - || fieldOptions.getClass().equals(Integer.class) - || fieldOptions.getClass().equals(String.class) - || fieldOptions.getClass().isEnum()) { - map.put("field_options", fieldOptions); - } else if (isListOfFile(fieldOptions)) { - for (int i = 0; i < getListSize(fieldOptions); i++) { - map.put("field_options[" + i + "]", getFromList(fieldOptions, i)); - } - } else { - map.put( - "field_options", - JSON.getDefault().getMapper().writeValueAsString(fieldOptions)); - } - } - if (formFieldGroups != null) { - if (isFileTypeOrListOfFiles(formFieldGroups)) { - fileTypeFound = true; - } - - if (formFieldGroups.getClass().equals(java.io.File.class) - || formFieldGroups.getClass().equals(Integer.class) - || formFieldGroups.getClass().equals(String.class) - || formFieldGroups.getClass().isEnum()) { - map.put("form_field_groups", formFieldGroups); - } else if (isListOfFile(formFieldGroups)) { - for (int i = 0; i < getListSize(formFieldGroups); i++) { - map.put("form_field_groups[" + i + "]", getFromList(formFieldGroups, i)); - } - } else { - map.put( - "form_field_groups", - JSON.getDefault().getMapper().writeValueAsString(formFieldGroups)); - } - } - if (formFieldRules != null) { - if (isFileTypeOrListOfFiles(formFieldRules)) { - fileTypeFound = true; - } - - if (formFieldRules.getClass().equals(java.io.File.class) - || formFieldRules.getClass().equals(Integer.class) - || formFieldRules.getClass().equals(String.class) - || formFieldRules.getClass().isEnum()) { - map.put("form_field_rules", formFieldRules); - } else if (isListOfFile(formFieldRules)) { - for (int i = 0; i < getListSize(formFieldRules); i++) { - map.put("form_field_rules[" + i + "]", getFromList(formFieldRules, i)); - } - } else { - map.put( - "form_field_rules", - JSON.getDefault().getMapper().writeValueAsString(formFieldRules)); - } - } - if (formFieldsPerDocument != null) { - if (isFileTypeOrListOfFiles(formFieldsPerDocument)) { - fileTypeFound = true; - } - - if (formFieldsPerDocument.getClass().equals(java.io.File.class) - || formFieldsPerDocument.getClass().equals(Integer.class) - || formFieldsPerDocument.getClass().equals(String.class) - || formFieldsPerDocument.getClass().isEnum()) { - map.put("form_fields_per_document", formFieldsPerDocument); - } else if (isListOfFile(formFieldsPerDocument)) { - for (int i = 0; i < getListSize(formFieldsPerDocument); i++) { - map.put( - "form_fields_per_document[" + i + "]", - getFromList(formFieldsPerDocument, i)); - } - } else { - map.put( - "form_fields_per_document", - JSON.getDefault() - .getMapper() - .writeValueAsString(formFieldsPerDocument)); - } - } - if (hideTextTags != null) { - if (isFileTypeOrListOfFiles(hideTextTags)) { - fileTypeFound = true; - } - - if (hideTextTags.getClass().equals(java.io.File.class) - || hideTextTags.getClass().equals(Integer.class) - || hideTextTags.getClass().equals(String.class) - || hideTextTags.getClass().isEnum()) { - map.put("hide_text_tags", hideTextTags); - } else if (isListOfFile(hideTextTags)) { - for (int i = 0; i < getListSize(hideTextTags); i++) { - map.put("hide_text_tags[" + i + "]", getFromList(hideTextTags, i)); - } - } else { - map.put( - "hide_text_tags", - JSON.getDefault().getMapper().writeValueAsString(hideTextTags)); - } - } - if (message != null) { - if (isFileTypeOrListOfFiles(message)) { - fileTypeFound = true; - } - - if (message.getClass().equals(java.io.File.class) - || message.getClass().equals(Integer.class) - || message.getClass().equals(String.class) - || message.getClass().isEnum()) { - map.put("message", message); - } else if (isListOfFile(message)) { - for (int i = 0; i < getListSize(message); i++) { - map.put("message[" + i + "]", getFromList(message, i)); - } - } else { - map.put("message", JSON.getDefault().getMapper().writeValueAsString(message)); - } - } - if (metadata != null) { - if (isFileTypeOrListOfFiles(metadata)) { - fileTypeFound = true; - } - - if (metadata.getClass().equals(java.io.File.class) - || metadata.getClass().equals(Integer.class) - || metadata.getClass().equals(String.class) - || metadata.getClass().isEnum()) { - map.put("metadata", metadata); - } else if (isListOfFile(metadata)) { - for (int i = 0; i < getListSize(metadata); i++) { - map.put("metadata[" + i + "]", getFromList(metadata, i)); - } - } else { - map.put("metadata", JSON.getDefault().getMapper().writeValueAsString(metadata)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (signers != null) { - if (isFileTypeOrListOfFiles(signers)) { - fileTypeFound = true; - } - - if (signers.getClass().equals(java.io.File.class) - || signers.getClass().equals(Integer.class) - || signers.getClass().equals(String.class) - || signers.getClass().isEnum()) { - map.put("signers", signers); - } else if (isListOfFile(signers)) { - for (int i = 0; i < getListSize(signers); i++) { - map.put("signers[" + i + "]", getFromList(signers, i)); - } - } else { - map.put("signers", JSON.getDefault().getMapper().writeValueAsString(signers)); - } - } - if (signingOptions != null) { - if (isFileTypeOrListOfFiles(signingOptions)) { - fileTypeFound = true; - } - - if (signingOptions.getClass().equals(java.io.File.class) - || signingOptions.getClass().equals(Integer.class) - || signingOptions.getClass().equals(String.class) - || signingOptions.getClass().isEnum()) { - map.put("signing_options", signingOptions); - } else if (isListOfFile(signingOptions)) { - for (int i = 0; i < getListSize(signingOptions); i++) { - map.put("signing_options[" + i + "]", getFromList(signingOptions, i)); - } - } else { - map.put( - "signing_options", - JSON.getDefault().getMapper().writeValueAsString(signingOptions)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (subject != null) { - if (isFileTypeOrListOfFiles(subject)) { - fileTypeFound = true; - } - - if (subject.getClass().equals(java.io.File.class) - || subject.getClass().equals(Integer.class) - || subject.getClass().equals(String.class) - || subject.getClass().isEnum()) { - map.put("subject", subject); - } else if (isListOfFile(subject)) { - for (int i = 0; i < getListSize(subject); i++) { - map.put("subject[" + i + "]", getFromList(subject, i)); - } - } else { - map.put("subject", JSON.getDefault().getMapper().writeValueAsString(subject)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - if (usePreexistingFields != null) { - if (isFileTypeOrListOfFiles(usePreexistingFields)) { - fileTypeFound = true; - } - - if (usePreexistingFields.getClass().equals(java.io.File.class) - || usePreexistingFields.getClass().equals(Integer.class) - || usePreexistingFields.getClass().equals(String.class) - || usePreexistingFields.getClass().isEnum()) { - map.put("use_preexisting_fields", usePreexistingFields); - } else if (isListOfFile(usePreexistingFields)) { - for (int i = 0; i < getListSize(usePreexistingFields); i++) { - map.put( - "use_preexisting_fields[" + i + "]", - getFromList(usePreexistingFields, i)); - } - } else { - map.put( - "use_preexisting_fields", - JSON.getDefault().getMapper().writeValueAsString(usePreexistingFields)); - } - } - if (useTextTags != null) { - if (isFileTypeOrListOfFiles(useTextTags)) { - fileTypeFound = true; - } - - if (useTextTags.getClass().equals(java.io.File.class) - || useTextTags.getClass().equals(Integer.class) - || useTextTags.getClass().equals(String.class) - || useTextTags.getClass().isEnum()) { - map.put("use_text_tags", useTextTags); - } else if (isListOfFile(useTextTags)) { - for (int i = 0; i < getListSize(useTextTags); i++) { - map.put("use_text_tags[" + i + "]", getFromList(useTextTags, i)); - } - } else { - map.put( - "use_text_tags", - JSON.getDefault().getMapper().writeValueAsString(useTextTags)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java deleted file mode 100644 index 6e6ed41c1..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** UnclaimedDraftCreateResponse */ -@JsonPropertyOrder({ - UnclaimedDraftCreateResponse.JSON_PROPERTY_UNCLAIMED_DRAFT, - UnclaimedDraftCreateResponse.JSON_PROPERTY_WARNINGS -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftCreateResponse { - public static final String JSON_PROPERTY_UNCLAIMED_DRAFT = "unclaimed_draft"; - private UnclaimedDraftResponse unclaimedDraft; - - public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; - - public UnclaimedDraftCreateResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftCreateResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, UnclaimedDraftCreateResponse.class); - } - - public static UnclaimedDraftCreateResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - UnclaimedDraftCreateResponse.class); - } - - public UnclaimedDraftCreateResponse unclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { - this.unclaimedDraft = unclaimedDraft; - return this; - } - - /** - * Get unclaimedDraft - * - * @return unclaimedDraft - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_UNCLAIMED_DRAFT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UnclaimedDraftResponse getUnclaimedDraft() { - return unclaimedDraft; - } - - @JsonProperty(JSON_PROPERTY_UNCLAIMED_DRAFT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUnclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { - this.unclaimedDraft = unclaimedDraft; - } - - public UnclaimedDraftCreateResponse warnings(List warnings) { - this.warnings = warnings; - return this; - } - - public UnclaimedDraftCreateResponse addWarningsItem(WarningResponse warningsItem) { - if (this.warnings == null) { - this.warnings = new ArrayList<>(); - } - this.warnings.add(warningsItem); - return this; - } - - /** - * A list of warnings. - * - * @return warnings - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getWarnings() { - return warnings; - } - - @JsonProperty(JSON_PROPERTY_WARNINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { - this.warnings = warnings; - } - - /** Return true if this UnclaimedDraftCreateResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftCreateResponse unclaimedDraftCreateResponse = - (UnclaimedDraftCreateResponse) o; - return Objects.equals(this.unclaimedDraft, unclaimedDraftCreateResponse.unclaimedDraft) - && Objects.equals(this.warnings, unclaimedDraftCreateResponse.warnings); - } - - @Override - public int hashCode() { - return Objects.hash(unclaimedDraft, warnings); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftCreateResponse {\n"); - sb.append(" unclaimedDraft: ").append(toIndentedString(unclaimedDraft)).append("\n"); - sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (unclaimedDraft != null) { - if (isFileTypeOrListOfFiles(unclaimedDraft)) { - fileTypeFound = true; - } - - if (unclaimedDraft.getClass().equals(java.io.File.class) - || unclaimedDraft.getClass().equals(Integer.class) - || unclaimedDraft.getClass().equals(String.class) - || unclaimedDraft.getClass().isEnum()) { - map.put("unclaimed_draft", unclaimedDraft); - } else if (isListOfFile(unclaimedDraft)) { - for (int i = 0; i < getListSize(unclaimedDraft); i++) { - map.put("unclaimed_draft[" + i + "]", getFromList(unclaimedDraft, i)); - } - } else { - map.put( - "unclaimed_draft", - JSON.getDefault().getMapper().writeValueAsString(unclaimedDraft)); - } - } - if (warnings != null) { - if (isFileTypeOrListOfFiles(warnings)) { - fileTypeFound = true; - } - - if (warnings.getClass().equals(java.io.File.class) - || warnings.getClass().equals(Integer.class) - || warnings.getClass().equals(String.class) - || warnings.getClass().isEnum()) { - map.put("warnings", warnings); - } else if (isListOfFile(warnings)) { - for (int i = 0; i < getListSize(warnings); i++) { - map.put("warnings[" + i + "]", getFromList(warnings, i)); - } - } else { - map.put("warnings", JSON.getDefault().getMapper().writeValueAsString(warnings)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java deleted file mode 100644 index eabad715c..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** UnclaimedDraftEditAndResendRequest */ -@JsonPropertyOrder({ - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_CLIENT_ID, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_EDITOR_OPTIONS, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_REQUESTING_REDIRECT_URL, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_SHOW_PROGRESS_STEPPER, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_SIGNING_REDIRECT_URL, - UnclaimedDraftEditAndResendRequest.JSON_PROPERTY_TEST_MODE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftEditAndResendRequest { - public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; - - public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; - - public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning; - - public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; - - public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; - - public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; - - public UnclaimedDraftEditAndResendRequest() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftEditAndResendRequest init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, UnclaimedDraftEditAndResendRequest.class); - } - - public static UnclaimedDraftEditAndResendRequest init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), - UnclaimedDraftEditAndResendRequest.class); - } - - public UnclaimedDraftEditAndResendRequest clientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Client id of the app used to create the draft. Used to apply the branding and callback url - * defined for the app. - * - * @return clientId - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getClientId() { - return clientId; - } - - @JsonProperty(JSON_PROPERTY_CLIENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public UnclaimedDraftEditAndResendRequest editorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - return this; - } - - /** - * Get editorOptions - * - * @return editorOptions - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SubEditorOptions getEditorOptions() { - return editorOptions; - } - - @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { - this.editorOptions = editorOptions; - } - - public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - return this; - } - - /** - * The request created from this draft will also be signable in embedded mode if set to - * `true`. - * - * @return isForEmbeddedSigning - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsForEmbeddedSigning() { - return isForEmbeddedSigning; - } - - @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { - this.isForEmbeddedSigning = isForEmbeddedSigning; - } - - public UnclaimedDraftEditAndResendRequest requesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - return this; - } - - /** - * The email address of the user that should be designated as the requester of this draft. If - * not set, original requester's email address will be used. - * - * @return requesterEmailAddress - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequesterEmailAddress() { - return requesterEmailAddress; - } - - @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { - this.requesterEmailAddress = requesterEmailAddress; - } - - public UnclaimedDraftEditAndResendRequest requestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully request a signature. - * - * @return requestingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestingRedirectUrl() { - return requestingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - } - - public UnclaimedDraftEditAndResendRequest showProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - return this; - } - - /** - * When only one step remains in the signature request process and this parameter is set to - * `false` then the progress stepper will be hidden. - * - * @return showProgressStepper - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getShowProgressStepper() { - return showProgressStepper; - } - - @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { - this.showProgressStepper = showProgressStepper; - } - - public UnclaimedDraftEditAndResendRequest signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public UnclaimedDraftEditAndResendRequest testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test, the signature request created from this draft will not be legally - * binding if set to `true`. Defaults to `false`. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - /** Return true if this UnclaimedDraftEditAndResendRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftEditAndResendRequest unclaimedDraftEditAndResendRequest = - (UnclaimedDraftEditAndResendRequest) o; - return Objects.equals(this.clientId, unclaimedDraftEditAndResendRequest.clientId) - && Objects.equals( - this.editorOptions, unclaimedDraftEditAndResendRequest.editorOptions) - && Objects.equals( - this.isForEmbeddedSigning, - unclaimedDraftEditAndResendRequest.isForEmbeddedSigning) - && Objects.equals( - this.requesterEmailAddress, - unclaimedDraftEditAndResendRequest.requesterEmailAddress) - && Objects.equals( - this.requestingRedirectUrl, - unclaimedDraftEditAndResendRequest.requestingRedirectUrl) - && Objects.equals( - this.showProgressStepper, - unclaimedDraftEditAndResendRequest.showProgressStepper) - && Objects.equals( - this.signingRedirectUrl, - unclaimedDraftEditAndResendRequest.signingRedirectUrl) - && Objects.equals(this.testMode, unclaimedDraftEditAndResendRequest.testMode); - } - - @Override - public int hashCode() { - return Objects.hash( - clientId, - editorOptions, - isForEmbeddedSigning, - requesterEmailAddress, - requestingRedirectUrl, - showProgressStepper, - signingRedirectUrl, - testMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftEditAndResendRequest {\n"); - sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" editorOptions: ").append(toIndentedString(editorOptions)).append("\n"); - sb.append(" isForEmbeddedSigning: ") - .append(toIndentedString(isForEmbeddedSigning)) - .append("\n"); - sb.append(" requesterEmailAddress: ") - .append(toIndentedString(requesterEmailAddress)) - .append("\n"); - sb.append(" requestingRedirectUrl: ") - .append(toIndentedString(requestingRedirectUrl)) - .append("\n"); - sb.append(" showProgressStepper: ") - .append(toIndentedString(showProgressStepper)) - .append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (clientId != null) { - if (isFileTypeOrListOfFiles(clientId)) { - fileTypeFound = true; - } - - if (clientId.getClass().equals(java.io.File.class) - || clientId.getClass().equals(Integer.class) - || clientId.getClass().equals(String.class) - || clientId.getClass().isEnum()) { - map.put("client_id", clientId); - } else if (isListOfFile(clientId)) { - for (int i = 0; i < getListSize(clientId); i++) { - map.put("client_id[" + i + "]", getFromList(clientId, i)); - } - } else { - map.put( - "client_id", - JSON.getDefault().getMapper().writeValueAsString(clientId)); - } - } - if (editorOptions != null) { - if (isFileTypeOrListOfFiles(editorOptions)) { - fileTypeFound = true; - } - - if (editorOptions.getClass().equals(java.io.File.class) - || editorOptions.getClass().equals(Integer.class) - || editorOptions.getClass().equals(String.class) - || editorOptions.getClass().isEnum()) { - map.put("editor_options", editorOptions); - } else if (isListOfFile(editorOptions)) { - for (int i = 0; i < getListSize(editorOptions); i++) { - map.put("editor_options[" + i + "]", getFromList(editorOptions, i)); - } - } else { - map.put( - "editor_options", - JSON.getDefault().getMapper().writeValueAsString(editorOptions)); - } - } - if (isForEmbeddedSigning != null) { - if (isFileTypeOrListOfFiles(isForEmbeddedSigning)) { - fileTypeFound = true; - } - - if (isForEmbeddedSigning.getClass().equals(java.io.File.class) - || isForEmbeddedSigning.getClass().equals(Integer.class) - || isForEmbeddedSigning.getClass().equals(String.class) - || isForEmbeddedSigning.getClass().isEnum()) { - map.put("is_for_embedded_signing", isForEmbeddedSigning); - } else if (isListOfFile(isForEmbeddedSigning)) { - for (int i = 0; i < getListSize(isForEmbeddedSigning); i++) { - map.put( - "is_for_embedded_signing[" + i + "]", - getFromList(isForEmbeddedSigning, i)); - } - } else { - map.put( - "is_for_embedded_signing", - JSON.getDefault().getMapper().writeValueAsString(isForEmbeddedSigning)); - } - } - if (requesterEmailAddress != null) { - if (isFileTypeOrListOfFiles(requesterEmailAddress)) { - fileTypeFound = true; - } - - if (requesterEmailAddress.getClass().equals(java.io.File.class) - || requesterEmailAddress.getClass().equals(Integer.class) - || requesterEmailAddress.getClass().equals(String.class) - || requesterEmailAddress.getClass().isEnum()) { - map.put("requester_email_address", requesterEmailAddress); - } else if (isListOfFile(requesterEmailAddress)) { - for (int i = 0; i < getListSize(requesterEmailAddress); i++) { - map.put( - "requester_email_address[" + i + "]", - getFromList(requesterEmailAddress, i)); - } - } else { - map.put( - "requester_email_address", - JSON.getDefault() - .getMapper() - .writeValueAsString(requesterEmailAddress)); - } - } - if (requestingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(requestingRedirectUrl)) { - fileTypeFound = true; - } - - if (requestingRedirectUrl.getClass().equals(java.io.File.class) - || requestingRedirectUrl.getClass().equals(Integer.class) - || requestingRedirectUrl.getClass().equals(String.class) - || requestingRedirectUrl.getClass().isEnum()) { - map.put("requesting_redirect_url", requestingRedirectUrl); - } else if (isListOfFile(requestingRedirectUrl)) { - for (int i = 0; i < getListSize(requestingRedirectUrl); i++) { - map.put( - "requesting_redirect_url[" + i + "]", - getFromList(requestingRedirectUrl, i)); - } - } else { - map.put( - "requesting_redirect_url", - JSON.getDefault() - .getMapper() - .writeValueAsString(requestingRedirectUrl)); - } - } - if (showProgressStepper != null) { - if (isFileTypeOrListOfFiles(showProgressStepper)) { - fileTypeFound = true; - } - - if (showProgressStepper.getClass().equals(java.io.File.class) - || showProgressStepper.getClass().equals(Integer.class) - || showProgressStepper.getClass().equals(String.class) - || showProgressStepper.getClass().isEnum()) { - map.put("show_progress_stepper", showProgressStepper); - } else if (isListOfFile(showProgressStepper)) { - for (int i = 0; i < getListSize(showProgressStepper); i++) { - map.put( - "show_progress_stepper[" + i + "]", - getFromList(showProgressStepper, i)); - } - } else { - map.put( - "show_progress_stepper", - JSON.getDefault().getMapper().writeValueAsString(showProgressStepper)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java deleted file mode 100644 index 7de5a3ecf..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** A group of documents that a user can take ownership of via the claim URL. */ -@JsonPropertyOrder({ - UnclaimedDraftResponse.JSON_PROPERTY_SIGNATURE_REQUEST_ID, - UnclaimedDraftResponse.JSON_PROPERTY_CLAIM_URL, - UnclaimedDraftResponse.JSON_PROPERTY_SIGNING_REDIRECT_URL, - UnclaimedDraftResponse.JSON_PROPERTY_REQUESTING_REDIRECT_URL, - UnclaimedDraftResponse.JSON_PROPERTY_EXPIRES_AT, - UnclaimedDraftResponse.JSON_PROPERTY_TEST_MODE -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class UnclaimedDraftResponse { - public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; - - public static final String JSON_PROPERTY_CLAIM_URL = "claim_url"; - private String claimUrl; - - public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; - - public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; - - public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; - - public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode; - - public UnclaimedDraftResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static UnclaimedDraftResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, UnclaimedDraftResponse.class); - } - - public static UnclaimedDraftResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue( - new ObjectMapper().writeValueAsString(data), UnclaimedDraftResponse.class); - } - - public UnclaimedDraftResponse signatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - return this; - } - - /** - * The ID of the signature request that is represented by this UnclaimedDraft. - * - * @return signatureRequestId - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSignatureRequestId() { - return signatureRequestId; - } - - @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { - this.signatureRequestId = signatureRequestId; - } - - public UnclaimedDraftResponse claimUrl(String claimUrl) { - this.claimUrl = claimUrl; - return this; - } - - /** - * The URL to be used to claim this UnclaimedDraft. - * - * @return claimUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_CLAIM_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClaimUrl() { - return claimUrl; - } - - @JsonProperty(JSON_PROPERTY_CLAIM_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClaimUrl(String claimUrl) { - this.claimUrl = claimUrl; - } - - public UnclaimedDraftResponse signingRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully sign. - * - * @return signingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSigningRedirectUrl() { - return signingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { - this.signingRedirectUrl = signingRedirectUrl; - } - - public UnclaimedDraftResponse requestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - return this; - } - - /** - * The URL you want signers redirected to after they successfully request a signature (Will only - * be returned in the response if it is applicable to the request.). - * - * @return requestingRedirectUrl - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRequestingRedirectUrl() { - return requestingRedirectUrl; - } - - @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { - this.requestingRedirectUrl = requestingRedirectUrl; - } - - public UnclaimedDraftResponse expiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - return this; - } - - /** - * When the link expires. - * - * @return expiresAt - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Integer getExpiresAt() { - return expiresAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRES_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { - this.expiresAt = expiresAt; - } - - public UnclaimedDraftResponse testMode(Boolean testMode) { - this.testMode = testMode; - return this; - } - - /** - * Whether this is a test draft. Signature requests made from test drafts have no legal value. - * - * @return testMode - */ - @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getTestMode() { - return testMode; - } - - @JsonProperty(JSON_PROPERTY_TEST_MODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { - this.testMode = testMode; - } - - /** Return true if this UnclaimedDraftResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UnclaimedDraftResponse unclaimedDraftResponse = (UnclaimedDraftResponse) o; - return Objects.equals(this.signatureRequestId, unclaimedDraftResponse.signatureRequestId) - && Objects.equals(this.claimUrl, unclaimedDraftResponse.claimUrl) - && Objects.equals( - this.signingRedirectUrl, unclaimedDraftResponse.signingRedirectUrl) - && Objects.equals( - this.requestingRedirectUrl, unclaimedDraftResponse.requestingRedirectUrl) - && Objects.equals(this.expiresAt, unclaimedDraftResponse.expiresAt) - && Objects.equals(this.testMode, unclaimedDraftResponse.testMode); - } - - @Override - public int hashCode() { - return Objects.hash( - signatureRequestId, - claimUrl, - signingRedirectUrl, - requestingRedirectUrl, - expiresAt, - testMode); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class UnclaimedDraftResponse {\n"); - sb.append(" signatureRequestId: ") - .append(toIndentedString(signatureRequestId)) - .append("\n"); - sb.append(" claimUrl: ").append(toIndentedString(claimUrl)).append("\n"); - sb.append(" signingRedirectUrl: ") - .append(toIndentedString(signingRedirectUrl)) - .append("\n"); - sb.append(" requestingRedirectUrl: ") - .append(toIndentedString(requestingRedirectUrl)) - .append("\n"); - sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); - sb.append(" testMode: ").append(toIndentedString(testMode)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (signatureRequestId != null) { - if (isFileTypeOrListOfFiles(signatureRequestId)) { - fileTypeFound = true; - } - - if (signatureRequestId.getClass().equals(java.io.File.class) - || signatureRequestId.getClass().equals(Integer.class) - || signatureRequestId.getClass().equals(String.class) - || signatureRequestId.getClass().isEnum()) { - map.put("signature_request_id", signatureRequestId); - } else if (isListOfFile(signatureRequestId)) { - for (int i = 0; i < getListSize(signatureRequestId); i++) { - map.put( - "signature_request_id[" + i + "]", - getFromList(signatureRequestId, i)); - } - } else { - map.put( - "signature_request_id", - JSON.getDefault().getMapper().writeValueAsString(signatureRequestId)); - } - } - if (claimUrl != null) { - if (isFileTypeOrListOfFiles(claimUrl)) { - fileTypeFound = true; - } - - if (claimUrl.getClass().equals(java.io.File.class) - || claimUrl.getClass().equals(Integer.class) - || claimUrl.getClass().equals(String.class) - || claimUrl.getClass().isEnum()) { - map.put("claim_url", claimUrl); - } else if (isListOfFile(claimUrl)) { - for (int i = 0; i < getListSize(claimUrl); i++) { - map.put("claim_url[" + i + "]", getFromList(claimUrl, i)); - } - } else { - map.put( - "claim_url", - JSON.getDefault().getMapper().writeValueAsString(claimUrl)); - } - } - if (signingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(signingRedirectUrl)) { - fileTypeFound = true; - } - - if (signingRedirectUrl.getClass().equals(java.io.File.class) - || signingRedirectUrl.getClass().equals(Integer.class) - || signingRedirectUrl.getClass().equals(String.class) - || signingRedirectUrl.getClass().isEnum()) { - map.put("signing_redirect_url", signingRedirectUrl); - } else if (isListOfFile(signingRedirectUrl)) { - for (int i = 0; i < getListSize(signingRedirectUrl); i++) { - map.put( - "signing_redirect_url[" + i + "]", - getFromList(signingRedirectUrl, i)); - } - } else { - map.put( - "signing_redirect_url", - JSON.getDefault().getMapper().writeValueAsString(signingRedirectUrl)); - } - } - if (requestingRedirectUrl != null) { - if (isFileTypeOrListOfFiles(requestingRedirectUrl)) { - fileTypeFound = true; - } - - if (requestingRedirectUrl.getClass().equals(java.io.File.class) - || requestingRedirectUrl.getClass().equals(Integer.class) - || requestingRedirectUrl.getClass().equals(String.class) - || requestingRedirectUrl.getClass().isEnum()) { - map.put("requesting_redirect_url", requestingRedirectUrl); - } else if (isListOfFile(requestingRedirectUrl)) { - for (int i = 0; i < getListSize(requestingRedirectUrl); i++) { - map.put( - "requesting_redirect_url[" + i + "]", - getFromList(requestingRedirectUrl, i)); - } - } else { - map.put( - "requesting_redirect_url", - JSON.getDefault() - .getMapper() - .writeValueAsString(requestingRedirectUrl)); - } - } - if (expiresAt != null) { - if (isFileTypeOrListOfFiles(expiresAt)) { - fileTypeFound = true; - } - - if (expiresAt.getClass().equals(java.io.File.class) - || expiresAt.getClass().equals(Integer.class) - || expiresAt.getClass().equals(String.class) - || expiresAt.getClass().isEnum()) { - map.put("expires_at", expiresAt); - } else if (isListOfFile(expiresAt)) { - for (int i = 0; i < getListSize(expiresAt); i++) { - map.put("expires_at[" + i + "]", getFromList(expiresAt, i)); - } - } else { - map.put( - "expires_at", - JSON.getDefault().getMapper().writeValueAsString(expiresAt)); - } - } - if (testMode != null) { - if (isFileTypeOrListOfFiles(testMode)) { - fileTypeFound = true; - } - - if (testMode.getClass().equals(java.io.File.class) - || testMode.getClass().equals(Integer.class) - || testMode.getClass().equals(String.class) - || testMode.getClass().isEnum()) { - map.put("test_mode", testMode); - } else if (isListOfFile(testMode)) { - for (int i = 0; i < getListSize(testMode); i++) { - map.put("test_mode[" + i + "]", getFromList(testMode, i)); - } - } else { - map.put( - "test_mode", - JSON.getDefault().getMapper().writeValueAsString(testMode)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java deleted file mode 100644 index acbd565ff..000000000 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Dropbox Sign API - * Dropbox Sign v3 API - * - * The version of the OpenAPI document: 3.0.0 - * Contact: apisupport@hellosign.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.dropbox.sign.model; - -import com.dropbox.sign.ApiException; -import com.dropbox.sign.JSON; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** A list of warnings. */ -@JsonPropertyOrder({ - WarningResponse.JSON_PROPERTY_WARNING_MSG, - WarningResponse.JSON_PROPERTY_WARNING_NAME -}) -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") -@JsonIgnoreProperties(ignoreUnknown = true) -public class WarningResponse { - public static final String JSON_PROPERTY_WARNING_MSG = "warning_msg"; - private String warningMsg; - - public static final String JSON_PROPERTY_WARNING_NAME = "warning_name"; - private String warningName; - - public WarningResponse() {} - - /** - * Attempt to instantiate and hydrate a new instance of this class - * - * @param jsonData String of JSON data representing target object - */ - public static WarningResponse init(String jsonData) throws Exception { - return new ObjectMapper().readValue(jsonData, WarningResponse.class); - } - - public static WarningResponse init(HashMap data) throws Exception { - return new ObjectMapper() - .readValue(new ObjectMapper().writeValueAsString(data), WarningResponse.class); - } - - public WarningResponse warningMsg(String warningMsg) { - this.warningMsg = warningMsg; - return this; - } - - /** - * Warning message - * - * @return warningMsg - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_WARNING_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getWarningMsg() { - return warningMsg; - } - - @JsonProperty(JSON_PROPERTY_WARNING_MSG) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningMsg(String warningMsg) { - this.warningMsg = warningMsg; - } - - public WarningResponse warningName(String warningName) { - this.warningName = warningName; - return this; - } - - /** - * Warning name - * - * @return warningName - */ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_WARNING_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getWarningName() { - return warningName; - } - - @JsonProperty(JSON_PROPERTY_WARNING_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningName(String warningName) { - this.warningName = warningName; - } - - /** Return true if this WarningResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WarningResponse warningResponse = (WarningResponse) o; - return Objects.equals(this.warningMsg, warningResponse.warningMsg) - && Objects.equals(this.warningName, warningResponse.warningName); - } - - @Override - public int hashCode() { - return Objects.hash(warningMsg, warningName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WarningResponse {\n"); - sb.append(" warningMsg: ").append(toIndentedString(warningMsg)).append("\n"); - sb.append(" warningName: ").append(toIndentedString(warningName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - public Map createFormData() throws ApiException { - Map map = new HashMap<>(); - boolean fileTypeFound = false; - try { - if (warningMsg != null) { - if (isFileTypeOrListOfFiles(warningMsg)) { - fileTypeFound = true; - } - - if (warningMsg.getClass().equals(java.io.File.class) - || warningMsg.getClass().equals(Integer.class) - || warningMsg.getClass().equals(String.class) - || warningMsg.getClass().isEnum()) { - map.put("warning_msg", warningMsg); - } else if (isListOfFile(warningMsg)) { - for (int i = 0; i < getListSize(warningMsg); i++) { - map.put("warning_msg[" + i + "]", getFromList(warningMsg, i)); - } - } else { - map.put( - "warning_msg", - JSON.getDefault().getMapper().writeValueAsString(warningMsg)); - } - } - if (warningName != null) { - if (isFileTypeOrListOfFiles(warningName)) { - fileTypeFound = true; - } - - if (warningName.getClass().equals(java.io.File.class) - || warningName.getClass().equals(Integer.class) - || warningName.getClass().equals(String.class) - || warningName.getClass().isEnum()) { - map.put("warning_name", warningName); - } else if (isListOfFile(warningName)) { - for (int i = 0; i < getListSize(warningName); i++) { - map.put("warning_name[" + i + "]", getFromList(warningName, i)); - } - } else { - map.put( - "warning_name", - JSON.getDefault().getMapper().writeValueAsString(warningName)); - } - } - } catch (Exception e) { - throw new ApiException(e); - } - - return fileTypeFound ? map : new HashMap<>(); - } - - private boolean isFileTypeOrListOfFiles(Object obj) throws Exception { - return obj.getClass().equals(java.io.File.class) || isListOfFile(obj); - } - - private boolean isListOfFile(Object obj) throws Exception { - return obj instanceof java.util.List - && !isListEmpty(obj) - && getFromList(obj, 0) instanceof java.io.File; - } - - private boolean isListEmpty(Object obj) throws Exception { - return (boolean) - Class.forName(java.util.List.class.getName()).getMethod("isEmpty").invoke(obj); - } - - private Object getFromList(Object obj, int index) throws Exception { - return Class.forName(java.util.List.class.getName()) - .getMethod("get", int.class) - .invoke(obj, index); - } - - private int getListSize(Object obj) throws Exception { - return (int) Class.forName(java.util.List.class.getName()).getMethod("size").invoke(obj); - } - - /** - * 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 "); - } -} diff --git a/sdks/java-v1/templates/BeanValidationException.mustache b/sdks/java-v1/templates/BeanValidationException.mustache index d8b0fa695..d551902f8 100644 --- a/sdks/java-v1/templates/BeanValidationException.mustache +++ b/sdks/java-v1/templates/BeanValidationException.mustache @@ -4,8 +4,8 @@ package {{invokerPackage}}; import java.util.Set; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ValidationException; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.ValidationException; public class BeanValidationException extends ValidationException { /** diff --git a/sdks/java-v1/templates/JSON.mustache b/sdks/java-v1/templates/JSON.mustache index 1d0a81387..5ef02660d 100644 --- a/sdks/java-v1/templates/JSON.mustache +++ b/sdks/java-v1/templates/JSON.mustache @@ -31,9 +31,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache b/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache new file mode 100644 index 000000000..c8196cfef --- /dev/null +++ b/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache @@ -0,0 +1,89 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import java.io.IOException; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAccessor; +import java.util.function.BiFunction; +import java.util.function.Function; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature; +import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; + +{{>generatedAnnotation}} +public class RFC3339InstantDeserializer extends InstantDeserializer { + + private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault(); + private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + = JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault(); + + public static final RFC3339InstantDeserializer INSTANT = new RFC3339InstantDeserializer<>( + Instant.class, DateTimeFormatter.ISO_INSTANT, + Instant::from, + a -> Instant.ofEpochMilli( a.value ), + a -> Instant.ofEpochSecond( a.integer, a.fraction ), + null, + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>( + OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, + OffsetDateTime::from, + a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + (d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ? + d : + d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ), + true, // yes, replace zero offset with Z + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + public static final RFC3339InstantDeserializer ZONED_DATE_TIME = new RFC3339InstantDeserializer<>( + ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, + ZonedDateTime::from, + a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), + a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), + ZonedDateTime::withZoneSameInstant, + false, // keep zero offset and Z separate since zones explicitly supported + DEFAULT_NORMALIZE_ZONE_ID, + DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS + ); + + protected RFC3339InstantDeserializer( + Class supportedType, + DateTimeFormatter formatter, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust, + boolean replaceZeroOffsetAsZ, + boolean normalizeZoneId, + boolean readNumericStringsAsTimestamp) { + super( + supportedType, + formatter, + parsedToValue, + fromMilliseconds, + fromNanoseconds, + adjust, + replaceZeroOffsetAsZ, + normalizeZoneId, + readNumericStringsAsTimestamp + ); + } + + @Override + protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException { + return super._fromString(p, ctxt, string0.replace( ' ', 'T' )); + } +} \ No newline at end of file diff --git a/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache b/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache new file mode 100644 index 000000000..7cc80277a --- /dev/null +++ b/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache @@ -0,0 +1,20 @@ +{{>licenseInfo}} +package {{invokerPackage}}; + +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZonedDateTime; + +import com.fasterxml.jackson.databind.module.SimpleModule; + +{{>generatedAnnotation}} +public class RFC3339JavaTimeModule extends SimpleModule { + + public RFC3339JavaTimeModule() { + super("RFC3339JavaTimeModule"); + + addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT); + addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME); + addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME); + } +} diff --git a/sdks/java-v1/templates/build.gradle.mustache b/sdks/java-v1/templates/build.gradle.mustache index 06f9bd5e9..6557a7c70 100644 --- a/sdks/java-v1/templates/build.gradle.mustache +++ b/sdks/java-v1/templates/build.gradle.mustache @@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') { task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + archiveClassifier = 'sources' } artifacts { @@ -97,12 +97,12 @@ if(hasProperty('target') && target == 'android') { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -126,6 +126,9 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -148,6 +151,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "junit:junit:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/javaBuilder.mustache b/sdks/java-v1/templates/javaBuilder.mustache index c02730081..4a0e102b8 100644 --- a/sdks/java-v1/templates/javaBuilder.mustache +++ b/sdks/java-v1/templates/javaBuilder.mustache @@ -14,9 +14,9 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par } {{#vars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.instance.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} this.instance.{{name}} = {{name}}; @@ -24,7 +24,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } @@ -32,12 +32,12 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par {{/vars}} {{#parentVars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { // inherited: {{isInherited}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}} super.{{name}}({{name}}); return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache index a00c6dc45..67a110392 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache @@ -137,7 +137,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient(CloseableHttpClient httpClient) { objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); @@ -149,6 +149,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{#openApiNullable}} objectMapper.registerModule(new JsonNullableModule()); {{/openApiNullable}} + objectMapper.registerModule(new RFC3339JavaTimeModule()); objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); dateFormat = ApiClient.buildDefaultDateFormat(); @@ -444,7 +445,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } @@ -466,7 +467,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param value The header's value * @return API client */ - public ApiClient addDefaultHeader(String key, String value) { + public final ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } @@ -622,7 +623,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @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 diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache index 27b456417..cfcd9f04c 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache @@ -24,8 +24,8 @@ import java.util.Map; import java.util.StringJoiner; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} @@ -99,7 +99,7 @@ public class {{classname}} extends BaseApi { {{/required}}{{/allParams}} // create path and map variables String localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString(apiClient.parameterToString({{{paramName}}}))){{/pathParams}}; StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache index b4393ea82..05b2bf9fd 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache index 74a70a3ea..1eb78a7a0 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache @@ -358,9 +358,11 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 diff --git a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache index 9a5b9bcd0..f51743a75 100644 --- a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache @@ -173,7 +173,12 @@ public class ApiClient { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#failOnUnknownProperties}} + objectMapper.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.setDateFormat(new RFC3339DateFormat()); @@ -181,6 +186,7 @@ public class ApiClient { objectMapper.registerModule(new JodaModule()); {{/joda}} objectMapper.registerModule(new JavaTimeModule()); + objectMapper.registerModule(new RFC3339JavaTimeModule()); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); objectMapper.registerModule(jnm); diff --git a/sdks/java-v1/templates/libraries/feign/README.mustache b/sdks/java-v1/templates/libraries/feign/README.mustache index fed3cbebd..c3d948749 100644 --- a/sdks/java-v1/templates/libraries/feign/README.mustache +++ b/sdks/java-v1/templates/libraries/feign/README.mustache @@ -32,7 +32,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -And to use the api you can follow the examples bellow: +And to use the api you can follow the examples below: ```java diff --git a/sdks/java-v1/templates/libraries/feign/api.mustache b/sdks/java-v1/templates/libraries/feign/api.mustache index af05d6595..d67de9a28 100644 --- a/sdks/java-v1/templates/libraries/feign/api.mustache +++ b/sdks/java-v1/templates/libraries/feign/api.mustache @@ -15,8 +15,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import feign.*; @@ -47,8 +47,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -77,8 +77,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -122,8 +122,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -162,8 +162,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ - {{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", - {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + {{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", + {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) diff --git a/sdks/java-v1/templates/libraries/feign/api_test.mustache b/sdks/java-v1/templates/libraries/feign/api_test.mustache index 1db841158..62521123f 100644 --- a/sdks/java-v1/templates/libraries/feign/api_test.mustache +++ b/sdks/java-v1/templates/libraries/feign/api_test.mustache @@ -14,8 +14,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache index 8af1cb136..2b4e0340e 100644 --- a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache @@ -114,6 +114,9 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -127,9 +130,9 @@ dependencies { implementation "io.github.openfeign:feign-okhttp:$feign_version" implementation "io.github.openfeign.form:feign-form:$feign_form_version" {{#jackson}} - {{#joda}} + {{#joda}} implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version" - {{/joda}} + {{/joda}} implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" @@ -142,11 +145,14 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1" testImplementation "org.hamcrest:hamcrest:2.2" - testImplementation "commons-io:commons-io:2.8.0" + testImplementation "commons-io:commons-io:2.16.1" testImplementation "ch.qos.logback:logback-classic:1.2.3" } diff --git a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache index 9af32c270..1a24b99f5 100644 --- a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache @@ -28,11 +28,14 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", "org.hamcrest" % "hamcrest" % "2.2" % "test", - "commons-io" % "commons-io" % "2.8.0" % "test", + "commons-io" % "commons-io" % "2.16.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/feign/model.mustache b/sdks/java-v1/templates/libraries/feign/model.mustache index 5fa9bca80..108748f60 100644 --- a/sdks/java-v1/templates/libraries/feign/model.mustache +++ b/sdks/java-v1/templates/libraries/feign/model.mustache @@ -59,8 +59,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/feign/pojo.mustache b/sdks/java-v1/templates/libraries/feign/pojo.mustache index fe97e3b1b..76f119eb4 100644 --- a/sdks/java-v1/templates/libraries/feign/pojo.mustache +++ b/sdks/java-v1/templates/libraries/feign/pojo.mustache @@ -72,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -189,17 +190,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -246,7 +237,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -272,7 +263,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} @@ -288,7 +280,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -309,6 +301,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} sb.append("}"); return sb.toString(); } diff --git a/sdks/java-v1/templates/libraries/feign/pom.mustache b/sdks/java-v1/templates/libraries/feign/pom.mustache index 9be4a094f..c915ea0ec 100644 --- a/sdks/java-v1/templates/libraries/feign/pom.mustache +++ b/sdks/java-v1/templates/libraries/feign/pom.mustache @@ -345,6 +345,14 @@ provided {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -403,13 +411,15 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.0 1.0.0 8.3.3 diff --git a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache index 03c44a8ed..7d3e50fe1 100644 --- a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache @@ -34,7 +34,12 @@ public class ApiClient { // A reasonable default object mapper. Client can pass in a chosen ObjectMapper anyway, this is just for reasonable defaults. private static ObjectMapper createDefaultObjectMapper() { ObjectMapper objectMapper = new ObjectMapper() + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .setDateFormat(new RFC3339DateFormat()); {{#joda}} diff --git a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache index 6d5f8334e..fef695d69 100644 --- a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache @@ -1001,24 +1001,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1047,6 +1033,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1377,7 +1393,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache index e1f17c972..566a5c0df 100644 --- a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache @@ -33,7 +33,7 @@ public class JSON implements ContextResolver { .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) {{^useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) @@ -50,6 +50,7 @@ public class JSON implements ContextResolver { {{#openApiNullable}} .addModule(new JsonNullableModule()) {{/openApiNullable}} + .addModule(new RFC3339JavaTimeModule()) .build(); } diff --git a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/api.mustache b/sdks/java-v1/templates/libraries/jersey2/api.mustache index b39d00df3..035edb3b7 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api.mustache @@ -12,8 +12,8 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; @@ -72,7 +72,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details - +
+ {{#responses}} @@ -115,7 +116,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -226,7 +228,7 @@ public class {{classname}} { GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} {{^useCustomTemplateCode}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); {{/useCustomTemplateCode}} @@ -282,7 +284,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -302,7 +305,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache index 7b8214bd4..926ba0a82 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache index 39aa19299..65f988278 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache @@ -229,9 +229,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} -{{#useCustomTemplateCode}} - mockito_version = "3.12.4" -{{/useCustomTemplateCode}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -265,6 +265,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" {{#useCustomTemplateCode}} diff --git a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache index bb525bf1f..3883888fe 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache @@ -36,6 +36,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey2/model.mustache b/sdks/java-v1/templates/libraries/jersey2/model.mustache index 509857733..bf30b7f6e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/model.mustache @@ -42,8 +42,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache index 09906d7b0..5b60d0743 100644 --- a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} - {{#isArray}} - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache index 0ba5ad05a..a1e80db20 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache @@ -91,14 +91,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{^useCustomTemplateCode}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - {{#isContainer}} - private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; - {{/isContainer}} - {{^isContainer}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{/useCustomTemplateCode}} @@ -150,7 +143,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -242,17 +235,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -302,7 +285,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey2/pom.mustache b/sdks/java-v1/templates/libraries/jersey2/pom.mustache index 9a596b00d..809547352 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pom.mustache @@ -404,6 +404,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -434,9 +443,11 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 @@ -448,6 +459,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 {{#useCustomTemplateCode}} 3.12.4 diff --git a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache index 09563afa7..7c581212e 100644 --- a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache @@ -988,24 +988,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1034,6 +1020,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1340,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache index 97cee6394..bfb6d7826 100644 --- a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache @@ -32,7 +32,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) @@ -45,6 +45,7 @@ public class JSON implements ContextResolver { {{#openApiNullable}} .addModule(new JsonNullableModule()) {{/openApiNullable}} + .addModule(new RFC3339JavaTimeModule()) .build(); } diff --git a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/api.mustache b/sdks/java-v1/templates/libraries/jersey3/api.mustache index 8d3e62f27..be8861553 100644 --- a/sdks/java-v1/templates/libraries/jersey3/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/api.mustache @@ -67,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -101,7 +102,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -195,7 +197,7 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); } @@ -232,7 +234,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -252,7 +255,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache index 42908c8bb..f95eafca0 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache index 6e89375a6..5f07e5671 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache index 09906d7b0..5b60d0743 100644 --- a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} - {{#isArray}} - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache index 06be4ddf2..0d8bc23c6 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache @@ -81,6 +81,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -197,17 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -257,7 +248,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey3/pom.mustache b/sdks/java-v1/templates/libraries/jersey3/pom.mustache index d2f13457c..a3c115041 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -400,9 +409,7 @@ 2.17.1 0.2.6 2.1.1 - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -410,6 +417,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/sdks/java-v1/templates/libraries/microprofile/api.mustache b/sdks/java-v1/templates/libraries/microprofile/api.mustache index 6e25c1f10..0b0a7c4ba 100644 --- a/sdks/java-v1/templates/libraries/microprofile/api.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/api.mustache @@ -71,10 +71,10 @@ public interface {{classname}} { {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} -{{^useSingleRequestParameter}} - {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; -{{/useSingleRequestParameter}} -{{#useSingleRequestParameter}} +{{^singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; +{{/singleRequestParameter}} +{{#singleRequestParameter}} {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException; {{#hasNonBodyParams}} public class {{operationIdCamelCase}}Request { @@ -91,6 +91,9 @@ public interface {{classname}} { {{#formParams}} private {{>formParams}}; {{/formParams}} + {{#cookieParams}} + private {{>cookieParams}}; + {{/cookieParams}} private {{operationIdCamelCase}}Request() { } @@ -106,7 +109,7 @@ public interface {{classname}} { * @param {{paramName}}{{>formParamsNameSuffix}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) * @return {{operationIdCamelCase}}Request */ - public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}) { + public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}{{>cookieParamsImpl}}) { this.{{paramName}}{{>formParamsNameSuffix}} = {{paramName}}{{>formParamsNameSuffix}}; return this; } @@ -114,7 +117,7 @@ public interface {{classname}} { {{/allParams}} } {{/hasNonBodyParams}} -{{/useSingleRequestParameter}} +{{/singleRequestParameter}} {{/operation}} } {{/operations}} diff --git a/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache new file mode 100644 index 000000000..c4ff01d7e --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache new file mode 100644 index 000000000..4cca907c6 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationCookieParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache new file mode 100644 index 000000000..70871f0f8 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache index cb8539bd1..9315b9c9d 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache @@ -8,7 +8,7 @@ @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}} {{#withXml}} @@ -77,7 +77,7 @@ return b; } } - {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } {{/jackson}} {{/withXml}} diff --git a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache index 2539064d1..40a295f3f 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache @@ -13,7 +13,7 @@ import java.net.URI; @JsonbTypeSerializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) @@ -65,6 +65,6 @@ import java.net.URI; return b; } } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/enumUnknownDefaultCase}}{{/useNullForUnknownEnumValue}} } } diff --git a/sdks/java-v1/templates/libraries/microprofile/model.mustache b/sdks/java-v1/templates/libraries/microprofile/model.mustache index e10e68d83..8f0e97005 100644 --- a/sdks/java-v1/templates/libraries/microprofile/model.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/model.mustache @@ -1,6 +1,12 @@ {{>licenseInfo}} package {{package}}; +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; {{#imports}}import {{import}}; {{/imports}} {{#serializableModel}} @@ -31,7 +37,11 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; import {{rootJavaEEPackage}}.json.stream.JsonGenerator; import {{rootJavaEEPackage}}.json.stream.JsonParser; import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; -{{#vendorExtensions.x-has-readonly-properties}} +{{#jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo; +{{/jsonbPolymorphism}} import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; {{/vendorExtensions.x-has-readonly-properties}} {{/jsonb}} diff --git a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache index afad09aa3..9fcac409c 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache @@ -22,7 +22,7 @@ * {{{.}}} */ {{/description}} -{{>additionalModelTypeAnnotations}} +{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} {{#vendorExtensions.x-class-extra-annotation}} {{{vendorExtensions.x-class-extra-annotation}}} {{/vendorExtensions.x-class-extra-annotation}} @@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi */ {{/description}} {{^withXml}} - {{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}} + {{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}} {{/withXml}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} @@ -148,28 +148,5 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi {{/isReadOnly}} {{/vars}} - - /** - * Create a string representation of this pojo. - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); - {{/vars}}sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } +{{>pojoOverrides}} } diff --git a/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache new file mode 100644 index 000000000..f0fbb0b20 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache @@ -0,0 +1,64 @@ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}}sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/pom.mustache b/sdks/java-v1/templates/libraries/microprofile/pom.mustache index f814d4c0d..1badc7e60 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom.mustache @@ -196,6 +196,14 @@ ${mutiny.version} {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -210,10 +218,12 @@ 1.8 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.2 {{/useBeanValidation}} @@ -240,7 +250,10 @@ 1.9.1 UTF-8 {{#microprofileMutiny}} - 1.2.0 + 1.10.0 {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache index 7accc4cb2..9462e0d92 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache @@ -189,6 +189,21 @@ ${jakarta.annotation.version} provided +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -203,10 +218,12 @@ 11 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.1 {{/useBeanValidation}} @@ -217,7 +234,7 @@ {{/jackson}} 2.1.0 2.0.0 - 2.0.0 + 3.0.0 2.0.1 3.0.0 3.0.1 @@ -231,6 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/native/ApiClient.mustache b/sdks/java-v1/templates/libraries/native/ApiClient.mustache index a641525af..5c3673f23 100644 --- a/sdks/java-v1/templates/libraries/native/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/native/ApiClient.mustache @@ -183,7 +183,7 @@ public class ApiClient { asyncResponseInterceptor = null; } - protected ObjectMapper createDefaultObjectMapper() { + public static ObjectMapper createDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -196,18 +196,19 @@ public class ApiClient { {{#openApiNullable}} mapper.registerModule(new JsonNullableModule()); {{/openApiNullable}} + mapper.registerModule(new RFC3339JavaTimeModule()); return mapper; } - protected String getDefaultBaseUri() { + private String getDefaultBaseUri() { return "{{{basePath}}}"; } - protected HttpClient.Builder createDefaultHttpClientBuilder() { + public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/sdks/java-v1/templates/libraries/native/JSON.mustache b/sdks/java-v1/templates/libraries/native/JSON.mustache index 813bb7940..496e5a1a8 100644 --- a/sdks/java-v1/templates/libraries/native/JSON.mustache +++ b/sdks/java-v1/templates/libraries/native/JSON.mustache @@ -30,7 +30,12 @@ public class JSON { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + {{#failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/native/anyof_model.mustache b/sdks/java-v1/templates/libraries/native/anyof_model.mustache index dfb6464d5..7cc5081d8 100644 --- a/sdks/java-v1/templates/libraries/native/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/anyof_model.mustache @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -241,7 +242,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -251,7 +252,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -289,7 +290,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -301,7 +302,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -316,7 +317,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -345,7 +346,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/api.mustache b/sdks/java-v1/templates/libraries/native/api.mustache index a80dcbac8..c100f2f81 100644 --- a/sdks/java-v1/templates/libraries/native/api.mustache +++ b/sdks/java-v1/templates/libraries/native/api.mustache @@ -4,6 +4,7 @@ package {{package}}; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; import {{invokerPackage}}.Pair; {{#imports}} @@ -14,8 +15,8 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#hasFormParamsInSpec}} @@ -64,7 +65,7 @@ public class {{classname}} { private final Consumer> memberVarAsyncResponseInterceptor; public {{classname}}() { - this(new ApiClient()); + this(Configuration.getDefaultApiClient()); } public {{classname}}(ApiClient apiClient) { @@ -271,22 +272,46 @@ public class {{classname}} { } {{/vendorExtensions.x-java-text-plain-string}} {{^vendorExtensions.x-java-text-plain-string}} - return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - {{#returnType}} - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream - {{/returnType}} - {{^returnType}} - null - {{/returnType}} + {{#returnType}} + {{! Fix for https://github.com/OpenAPITools/openapi-generator/issues/13968 }} + {{! This part had a bugfix for an empty response in the past, but this part of that PR was reverted because it was not doing anything. }} + {{! Keep this documentation here, because the problem is not obvious. }} + {{! `InputStream.available()` was used, but that only works for inputstreams that are already in memory, it will not give the right result if it is a remote stream. We only work with remote streams here. }} + {{! https://github.com/OpenAPITools/openapi-generator/pull/13993/commits/3e!37411d2acef0311c82e6d941a8e40b3bc0b6da }} + {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} + {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} + {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} + if (localVarResponse.body() == null) { + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); + {{/returnType}} + {{^returnType}} + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null + ); + {{/returnType}} {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} // Drain the InputStream while (localVarResponse.body().read() != -1) { - // Ignore + // Ignore } localVarResponse.body().close(); {{/returnType}} diff --git a/sdks/java-v1/templates/libraries/native/api_test.mustache b/sdks/java-v1/templates/libraries/native/api_test.mustache index 497bd5308..8558cc6f4 100644 --- a/sdks/java-v1/templates/libraries/native/api_test.mustache +++ b/sdks/java-v1/templates/libraries/native/api_test.mustache @@ -19,8 +19,8 @@ import java.util.concurrent.CompletableFuture; {{/asyncNative}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/native/build.gradle.mustache b/sdks/java-v1/templates/libraries/native/build.gradle.mustache index 24ea4fef0..a04a9645e 100644 --- a/sdks/java-v1/templates/libraries/native/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/native/build.gradle.mustache @@ -50,12 +50,12 @@ task execute(type:JavaExec) { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -73,11 +73,21 @@ ext { swagger_annotations_version = "2.2.9" {{/swagger2AnnotationLibrary}} jackson_version = "2.17.1" + {{#useJakartaEe}} + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + {{/useJakartaEe}} junit_version = "5.10.2" {{#hasFormParamsInSpec}} httpmime_version = "4.5.13" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -94,9 +104,15 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version" + {{/useBeanValidation}} {{#hasFormParamsInSpec}} implementation "org.apache.httpcomponents:httpmime:$httpmime_version" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/sdks/java-v1/templates/libraries/native/model.mustache b/sdks/java-v1/templates/libraries/native/model.mustache index cd2a85a22..b3beca8d3 100644 --- a/sdks/java-v1/templates/libraries/native/model.mustache +++ b/sdks/java-v1/templates/libraries/native/model.mustache @@ -47,8 +47,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/native/modelEnum.mustache b/sdks/java-v1/templates/libraries/native/modelEnum.mustache index 5f22f7559..8072766ab 100644 --- a/sdks/java-v1/templates/libraries/native/modelEnum.mustache +++ b/sdks/java-v1/templates/libraries/native/modelEnum.mustache @@ -23,7 +23,7 @@ import java.net.URI; @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/libraries/native/oneof_model.mustache b/sdks/java-v1/templates/libraries/native/oneof_model.mustache index 8aa2ef073..cbb4a6d63 100644 --- a/sdks/java-v1/templates/libraries/native/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/oneof_model.mustache @@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -274,7 +275,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -284,7 +285,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -322,7 +323,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -349,7 +350,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -367,7 +368,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -378,7 +379,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pojo.mustache b/sdks/java-v1/templates/libraries/native/pojo.mustache index 1250a71ec..5413d1cdc 100644 --- a/sdks/java-v1/templates/libraries/native/pojo.mustache +++ b/sdks/java-v1/templates/libraries/native/pojo.mustache @@ -75,6 +75,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -104,7 +105,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens )); {{/vendorExtensions.x-enum-as-string}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -188,17 +189,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -244,7 +235,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -266,7 +257,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#allVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -395,7 +386,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for ({{{items.dataType}}} _item : {{getter}}()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -405,7 +396,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (int i = 0; i < {{getter}}().size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } {{/uniqueItems}} @@ -443,7 +434,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -455,7 +446,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if ({{getter}}().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } } @@ -470,7 +461,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (String _key : {{getter}}().keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - {{getter}}().get(_key), URLEncoder.encode(ApiClient.valueToString({{getter}}().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + {{getter}}().get(_key), ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(_key))))); } } {{/items.isModel}} @@ -488,7 +479,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isMap}} {{#isPrimitiveType}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -499,7 +490,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isModel}} {{^isModel}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pom.mustache b/sdks/java-v1/templates/libraries/native/pom.mustache index 8ed827791..21b990ab3 100644 --- a/sdks/java-v1/templates/libraries/native/pom.mustache +++ b/sdks/java-v1/templates/libraries/native/pom.mustache @@ -271,6 +271,14 @@ ${httpmime-version} {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -295,9 +303,11 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 @@ -305,6 +315,9 @@ {{#hasFormParamsInSpec}} 4.5.14 {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.2 2.27.2 diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache index c5e7ae225..519b37ed2 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache @@ -47,9 +47,11 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -987,7 +989,7 @@ public class ApiClient { } {{/dynamicOperations}} - /** + /** * Formats the specified free-form query parameters to a list of {@code Pair} objects. * * @param value The free-form query parameters. @@ -1001,6 +1003,7 @@ public class ApiClient { return params; } + @SuppressWarnings("unchecked") final Map valuesMap = (Map) value; for (Map.Entry entry : valuesMap.entrySet()) { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache index 6cf7ec789..eee7773c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache @@ -28,9 +28,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache index 8dbdf2451..de3afa6c1 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache @@ -90,7 +90,7 @@ import {{{invokerPackage}}}.ApiClient; import {{{invokerPackage}}}.ApiException; import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} -import {{{invokerPackage}}}.models.*; +import {{{modelPackage}}}.*; import {{{package}}}.{{{classname}}}; public class Example { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache index 18447fc12..c88cddf12 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache @@ -283,7 +283,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -291,10 +291,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{dataType}}} get{{#isArray}}{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} {{/composedSchemas}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache index 96757ed64..ba4fe0d63 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache @@ -26,14 +26,14 @@ import io.swagger.v3.oas.models.parameters.Parameter; import java.io.IOException; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; -import jakarta.validation.executable.ExecutableValidator; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.Validation; +import {{javaxPackage}}.validation.ValidatorFactory; +import {{javaxPackage}}.validation.executable.ExecutableValidator; import java.util.Set; import java.lang.reflect.Method; import java.lang.reflect.Type; @@ -98,7 +98,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -230,6 +231,15 @@ public class {{classname}} { if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } + {{^dynamicOperations}} + {{#headerParams}} + + if ({{paramName}} != null) { + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/headerParams}} + {{/dynamicOperations}} String[] localVarAuthNames = new String[] { {{#withAWSV4Signature}}"AWS4Auth"{{/withAWSV4Signature}}{{#authMethods}}{{#-first}}{{#withAWSV4Signature}}, {{/withAWSV4Signature}}{{/-first}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; return localVarApiClient.buildCall(basePath, localVarPath, {{^dynamicOperations}}"{{httpMethod}}"{{/dynamicOperations}}{{#dynamicOperations}}apiOperation.getMethod(){{/dynamicOperations}}, localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); @@ -287,7 +297,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -327,7 +338,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -395,7 +407,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -455,7 +468,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -479,7 +493,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -511,7 +526,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -543,7 +559,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -569,7 +586,8 @@ public class {{classname}} { * @return API{{operationId}}Request {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache index 29f682678..b56bdf4db 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache @@ -17,8 +17,8 @@ import java.io.InputStream; {{/supportStreaming}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache index eb67fc112..1b527257a 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache @@ -126,7 +126,7 @@ dependencies { {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache index 2045b8474..54bd804c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "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.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.6", diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache index c82b0fbe2..3a1cca8d7 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache @@ -21,8 +21,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache index b955e53f1..f3c0e2d7c 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache @@ -12,7 +12,7 @@ import com.google.gson.stream.JsonWriter; * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache index 06912e9b1..d21f03c3c 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache @@ -6,7 +6,7 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache index 31c63263e..731b36d57 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache @@ -361,7 +361,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -372,10 +372,10 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache index 0a32ef099..3d76d23b0 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache @@ -70,6 +70,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} + {{>nullable_var_annotations}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} @@ -80,6 +81,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/parcelableModel}} {{/parent}} {{#discriminator}} + {{#discriminator.isEnum}} +{{#readWriteVars}}{{#isDiscriminator}}{{#defaultValue}} + this.{{name}} = {{defaultValue}}; +{{/defaultValue}}{{/isDiscriminator}}{{/readWriteVars}} + {{/discriminator.isEnum}} {{^discriminator.isEnum}} this.{{{discriminatorName}}} = this.getClass().getSimpleName(); {{/discriminator.isEnum}} @@ -106,7 +112,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; return this; } @@ -153,17 +159,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -183,7 +179,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} {{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated -{{/deprecated}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/deprecated}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; } {{/isReadOnly}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache index def53f2fc..137ef722c 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache @@ -414,7 +414,7 @@ {{/swagger2AnnotationLibrary}} 4.12.02.10.1 - 3.14.0 + 3.17.0 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} @@ -423,9 +423,11 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#performBeanValidation}} 3.0.3 diff --git a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache index 8919eda30..3d875d66b 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache @@ -27,7 +27,7 @@ public class JacksonObjectMapper extends Jackson2Mapper { ObjectMapper mapper = new ObjectMapper(); mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/rest-assured/api.mustache b/sdks/java-v1/templates/libraries/rest-assured/api.mustache index 5ae6e5057..1eae54272 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api.mustache @@ -33,8 +33,8 @@ import io.swagger.v3.oas.annotations.security.*; {{/swagger2AnnotationLibrary}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.lang.reflect.Type; @@ -146,7 +146,7 @@ public class {{classname}} { public static class {{operationIdCamelCase}}Oper implements Oper { public static final Method REQ_METHOD = {{httpMethod}}; - public static final String REQ_URI = "{{path}}"; + public static final String REQ_URI = "{{{path}}}"; private RequestSpecBuilder reqSpec; private ResponseSpecBuilder respSpec; @@ -155,15 +155,15 @@ public class {{classname}} { this.reqSpec = reqSpec; {{#vendorExtensions}} {{#x-content-type}} - reqSpec.setContentType("{{x-content-type}}"); + reqSpec.setContentType("{{{x-content-type}}}"); {{/x-content-type}} - reqSpec.setAccept("{{#x-accepts}}{{.}}{{^-last}},{{/-last}}{{/x-accepts}}"); + reqSpec.setAccept("{{#x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/x-accepts}}"); {{/vendorExtensions}} this.respSpec = new ResponseSpecBuilder(); } /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @param type * @return type @@ -175,7 +175,7 @@ public class {{classname}} { {{#returnType}} /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @return {{returnType}} */ diff --git a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache index d7d9dae2b..adcbd8085 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache @@ -20,8 +20,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; diff --git a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache index 396dd69c2..7de3d6706 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache @@ -358,9 +358,11 @@ {{/jackson}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 diff --git a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache index 14b1af4af..1c536d89b 100644 --- a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache @@ -13,6 +13,9 @@ import java.util.function.Consumer; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -23,6 +26,9 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert {{#withXml}} import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; {{/withXml}} +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -44,6 +50,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.TimeZone; +import java.util.function.Supplier; import {{javaxPackage}}.annotation.Nullable; @@ -60,6 +67,9 @@ import {{invokerPackage}}.auth.OAuth; {{/hasOAuthMethods}} {{>generatedAnnotation}} +{{#generateClientAsBean}} +@Component("{{invokerPackage}}.ApiClient") +{{/generateClientAsBean}} public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public enum CollectionFormat { CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); @@ -87,31 +97,32 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient() { - this.dateFormat = createDefaultDateFormat(); - this.objectMapper = createDefaultObjectMapper(this.dateFormat); - this.restClient = buildRestClient(this.objectMapper); - this.init(); + this(null); } + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} public ApiClient(RestClient restClient) { - this(Optional.ofNullable(restClient).orElseGet(ApiClient::buildRestClient), createDefaultDateFormat()); + this(restClient, createDefaultDateFormat()); } public ApiClient(ObjectMapper mapper, DateFormat format) { - this(buildRestClient(mapper.copy()), format); + this(null, mapper, format); } public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) { - this(Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(mapper.copy())), format); - } - - private ApiClient(RestClient restClient, DateFormat format) { - this.restClient = restClient; + this.objectMapper = mapper.copy(); + this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); this.dateFormat = format; this.objectMapper = createDefaultObjectMapper(format); this.init(); } + private ApiClient(RestClient restClient, DateFormat format) { + this(restClient, createDefaultObjectMapper(format), format); + } + public static DateFormat createDefaultDateFormat() { DateFormat dateFormat = new RFC3339DateFormat(); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); @@ -125,7 +136,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); @@ -159,9 +170,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{/withXml}} Consumer>> messageConverters = converters -> { - converters.add(new MappingJackson2HttpMessageConverter(mapper)); + converters.add(0, new MappingJackson2HttpMessageConverter(mapper)); {{#withXml}} - converters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper)); {{/withXml}} }; @@ -243,6 +254,21 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { throw new RuntimeException("No Bearer authentication configured!"); } + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. * @param username the username @@ -753,4 +779,4 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return collectionFormat.collectionToString(values); } -} \ No newline at end of file +} diff --git a/sdks/java-v1/templates/libraries/restclient/api.mustache b/sdks/java-v1/templates/libraries/restclient/api.mustache index 1475fc0f4..ef5095514 100644 --- a/sdks/java-v1/templates/libraries/restclient/api.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api.mustache @@ -11,9 +11,13 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; +import org.springframework.core.io.FileSystemResource; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.client.RestClient.ResponseSpec; import org.springframework.web.client.RestClientResponseException; @@ -23,8 +27,18 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestClient.ResponseSpec; +import org.springframework.web.client.RestClientResponseException; {{>generatedAnnotation}} +{{#generateClientAsBean}} +@Component("{{package}}.{{classname}}") +{{/generateClientAsBean}} {{#operations}} public class {{classname}} { private ApiClient apiClient; @@ -47,6 +61,91 @@ public class {{classname}} { } {{#operation}} +{{#singleRequestParameter}} +{{#hasParams}} +{{^hasSingleParam}} + + {{^staticRequest}} + public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){} + {{/staticRequest}} + {{#staticRequest}} + public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + {{/staticRequest}} + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + +{{/hasSingleParam}} +{{/hasParams}} +{{/singleRequestParameter}} /** * {{summary}} * {{notes}} @@ -182,4 +281,4 @@ public class {{classname}} { } {{/operation}} } -{{/operations}} \ No newline at end of file +{{/operations}} diff --git a/sdks/java-v1/templates/libraries/restclient/api_test.mustache b/sdks/java-v1/templates/libraries/restclient/api_test.mustache index dc3408341..e54a4ccc2 100644 --- a/sdks/java-v1/templates/libraries/restclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api_test.mustache @@ -4,8 +4,8 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -13,10 +13,15 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} /** * API tests for {{classname}} */ -@Ignore +@Disabled public class {{classname}}Test { private final {{classname}} api = new {{classname}}(); diff --git a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache index 1e1e6247c..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache @@ -2,25 +2,49 @@ package {{invokerPackage}}.auth; +import java.util.Optional; +import java.util.function.Supplier; import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ {{>generatedAnnotation}} public class OAuth implements Authentication { - private String accessToken; + private Supplier tokenSupplier; + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ public String getAccessToken() { - return accessToken; + return tokenSupplier.get(); } + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ public void setAccessToken(String accessToken) { - this.accessToken = accessToken; + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { - if (accessToken != null) { - headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); - } + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); } } diff --git a/sdks/java-v1/templates/libraries/restclient/pom.mustache b/sdks/java-v1/templates/libraries/restclient/pom.mustache index d3f6ab650..8d3d1fead 100644 --- a/sdks/java-v1/templates/libraries/restclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/restclient/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -362,9 +362,7 @@ {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} diff --git a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache index b57283048..e4097fc85 100644 --- a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache +++ b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache @@ -20,7 +20,7 @@ public class JSON implements ContextResolver { public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * 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 the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/api.mustache b/sdks/java-v1/templates/libraries/resttemplate/api.mustache index aa1a98fd3..6cf513730 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api.mustache @@ -14,8 +14,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; diff --git a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache index 04a19f1f1..e1a213c02 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache @@ -16,8 +16,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache index 1e8204285..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache @@ -26,7 +26,7 @@ public class OAuth implements Authentication { /** * Sets the bearer access token used for Authorization. * - * @param bearerToken The bearer token to send in the Authorization header + * @param accessToken The bearer token to send in the Authorization header */ public void setAccessToken(String accessToken) { setAccessToken(() -> accessToken); diff --git a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache index a900fc806..edd170cd3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache @@ -123,10 +123,12 @@ ext { {{#useJakartaEe}} spring_web_version = "6.1.5" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" {{/useJakartaEe}} {{^useJakartaEe}} - spring_web_version = "5.3.33" + spring_web_version = "6.1.13" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" {{/useJakartaEe}} jodatime_version = "2.9.9" junit_version = "5.10.2" @@ -145,7 +147,12 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{^useJakartaEe}} implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#useJakartaEe}} + implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version" + {{/useJakartaEe}} {{#openApiNullable}} implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/model.mustache b/sdks/java-v1/templates/libraries/resttemplate/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache new file mode 100644 index 000000000..192b7014c --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/resttemplate/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache index 250417d78..efead83e9 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -379,10 +379,14 @@ 0.2.6 {{/openApiNullable}} {{#useJakartaEe}} + 6.1.14 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} + 5.3.33 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#joda}} 2.9.9 diff --git a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache index 077e8d692..c05159d4e 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache @@ -46,7 +46,9 @@ import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.text.DateFormat; +{{#jsr310}} import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.LinkedHashMap; import java.util.Map; import java.util.HashMap; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache index 2ff8b1cb7..2e986485f 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache @@ -30,9 +30,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache index 525fe5d13..697e398e4 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache @@ -32,7 +32,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/retrofit2/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/api.mustache index dd521a5fc..0b0105515 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api.mustache @@ -35,8 +35,8 @@ import java.util.Map; import java.util.Set; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#operations}} diff --git a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache index dab62f328..b84e6b173 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache @@ -15,8 +15,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache index e78bd985a..7f7b9e2b0 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache @@ -18,8 +18,8 @@ import okhttp3.MultipartBody; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; diff --git a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache index b02a5fb2e..b8968d12e 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache @@ -405,9 +405,11 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 diff --git a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache index 6607107ab..1a90c571b 100644 --- a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache @@ -81,7 +81,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { // Build object mapper this.objectMapper = new ObjectMapper(); this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache index 9072a8859..9acaf0dd8 100644 --- a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache @@ -8,6 +8,9 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} +{{#generateClientAsBean}} +import org.springframework.beans.factory.annotation.Autowired; +{{/generateClientAsBean}} import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -22,8 +25,12 @@ import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.ClientHttpResponse; +import org.springframework.http.client.reactive.ClientHttpRequest; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.http.codec.json.Jackson2JsonEncoder; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -76,6 +83,9 @@ import {{invokerPackage}}.auth.OAuth; {{/hasOAuthMethods}} {{>generatedAnnotation}} +{{#generateClientAsBean}} +@Component("{{invokerPackage}}.ApiClient") +{{/generateClientAsBean}} public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public enum CollectionFormat { CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); @@ -111,6 +121,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this.init(); } + {{#generateClientAsBean}} + @Autowired + {{/generateClientAsBean}} public ApiClient(WebClient webClient) { this(Optional.ofNullable(webClient).orElseGet(() -> buildWebClient()), createDefaultDateFormat()); } @@ -143,7 +156,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * 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 the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/webclient/api.mustache b/sdks/java-v1/templates/libraries/webclient/api.mustache index 65600dbfc..79d0249bd 100644 --- a/sdks/java-v1/templates/libraries/webclient/api.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api.mustache @@ -12,13 +12,12 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; +import org.springframework.core.io.FileSystemResource; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; import org.springframework.web.reactive.function.client.WebClientResponseException; @@ -28,10 +27,20 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; +{{#generateClientAsBean}} +import org.springframework.stereotype.Component; +{{/generateClientAsBean}} +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; +import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.core.publisher.Flux; {{>generatedAnnotation}} +{{#generateClientAsBean}} +@Component("{{package}}.{{classname}}") +{{/generateClientAsBean}} {{#operations}} public class {{classname}} { private ApiClient apiClient; @@ -53,7 +62,81 @@ public class {{classname}} { this.apiClient = apiClient; } - {{#operation}} + {{#operation}}{{#singleRequestParameter}}{{#hasParams}}{{^hasSingleParam}} + public {{#staticRequest}}static {{/staticRequest}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + {{/hasSingleParam}}{{/hasParams}}{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v1/templates/libraries/webclient/api_test.mustache b/sdks/java-v1/templates/libraries/webclient/api_test.mustache index c5d568617..e0a960d12 100644 --- a/sdks/java-v1/templates/libraries/webclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api_test.mustache @@ -15,8 +15,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache index 597411638..be194ab23 100644 --- a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache @@ -133,12 +133,14 @@ ext { {{#useJakartaEe}} spring_boot_version = "3.0.12" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" reactor_version = "3.5.12" reactor_netty_version = "1.1.13" {{/useJakartaEe}} {{^useJakartaEe}} spring_boot_version = "2.7.17" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" reactor_version = "3.4.34" reactor_netty_version = "1.0.39" {{/useJakartaEe}} diff --git a/sdks/java-v1/templates/libraries/webclient/model.mustache b/sdks/java-v1/templates/libraries/webclient/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/webclient/pojo.mustache b/sdks/java-v1/templates/libraries/webclient/pojo.mustache new file mode 100644 index 000000000..2b9423b77 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/webclient/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/model.mustache b/sdks/java-v1/templates/model.mustache index b50416793..55e6678d2 100644 --- a/sdks/java-v1/templates/model.mustache +++ b/sdks/java-v1/templates/model.mustache @@ -49,8 +49,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/modelEnum.mustache b/sdks/java-v1/templates/modelEnum.mustache index d1ba359d9..90cd7f8c8 100644 --- a/sdks/java-v1/templates/modelEnum.mustache +++ b/sdks/java-v1/templates/modelEnum.mustache @@ -23,7 +23,7 @@ import java.net.URI; @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/modelInnerEnum.mustache b/sdks/java-v1/templates/modelInnerEnum.mustache index 0096d8407..401002a69 100644 --- a/sdks/java-v1/templates/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/modelInnerEnum.mustache @@ -12,7 +12,7 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}} @@ -23,7 +23,7 @@ {{#withXml}} @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{/withXml}} - {{{name}}}({{{value}}}){{^-last}}, + {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/sdks/java-v1/templates/nullable_var_annotations.mustache b/sdks/java-v1/templates/nullable_var_annotations.mustache new file mode 100644 index 000000000..7dbaf4029 --- /dev/null +++ b/sdks/java-v1/templates/nullable_var_annotations.mustache @@ -0,0 +1 @@ +{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}} \ No newline at end of file diff --git a/sdks/java-v1/templates/pojo.mustache b/sdks/java-v1/templates/pojo.mustache index 05be7e5c5..09482dd66 100644 --- a/sdks/java-v1/templates/pojo.mustache +++ b/sdks/java-v1/templates/pojo.mustache @@ -65,6 +65,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{>nullable_var_annotations}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} @@ -134,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -210,17 +211,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -270,7 +261,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -285,7 +276,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#readWriteVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -404,7 +395,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#uniqueItems}} if ({{getter}}() != null) { int i = 0; - for ({{{items.dataType}}} _item : {{getter}}()) { + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { try { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), diff --git a/sdks/java-v1/templates/pom.mustache b/sdks/java-v1/templates/pom.mustache index b733ab9bb..c46bc598e 100644 --- a/sdks/java-v1/templates/pom.mustache +++ b/sdks/java-v1/templates/pom.mustache @@ -289,12 +289,12 @@ {{/useJakartaEe}} {{#withXml}} - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + {{/withXml}} {{#joda}} @@ -341,6 +341,15 @@ ${jakarta-annotation-version} provided + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -368,13 +377,15 @@ 2.17.1 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} -{{#useBeanValidation}} - 3.0.2 -{{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 1.0.0 5.10.2 1.10.0 diff --git a/sdks/java-v1/templates/typeInfoAnnotation.mustache b/sdks/java-v1/templates/typeInfoAnnotation.mustache index c21efb490..07f77c75c 100644 --- a/sdks/java-v1/templates/typeInfoAnnotation.mustache +++ b/sdks/java-v1/templates/typeInfoAnnotation.mustache @@ -26,3 +26,9 @@ {{/-last}} {{/discriminator.mappedModels}} {{/jackson}} +{{#jsonbPolymorphism}} +@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = { +{{/-first}} + @JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class), +{{#-last}} +}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}} \ No newline at end of file From 74dbb8f848f18a5358d1c356ff813d0195290621 Mon Sep 17 00:00:00 2001 From: Monica Auriemma Date: Fri, 21 Mar 2025 17:36:13 -0400 Subject: [PATCH 2/6] fixed build errors --- sdks/java-v1/pom.xml | 2 + .../main/java/com/dropbox/sign/ApiClient.java | 68 +- .../java/com/dropbox/sign/Configuration.java | 29 +- .../java/com/dropbox/sign/api/AccountApi.java | 24 +- .../java/com/dropbox/sign/api/ApiAppApi.java | 30 +- .../com/dropbox/sign/api/BulkSendJobApi.java | 12 +- .../com/dropbox/sign/api/EmbeddedApi.java | 12 +- .../java/com/dropbox/sign/api/FaxApi.java | 30 +- .../java/com/dropbox/sign/api/FaxLineApi.java | 42 +- .../java/com/dropbox/sign/api/OAuthApi.java | 12 +- .../java/com/dropbox/sign/api/ReportApi.java | 6 +- .../dropbox/sign/api/SignatureRequestApi.java | 120 ++-- .../java/com/dropbox/sign/api/TeamApi.java | 60 +- .../com/dropbox/sign/api/TemplateApi.java | 66 +- .../dropbox/sign/api/UnclaimedDraftApi.java | 24 +- .../sign/model/AccountCreateRequest.java | 24 +- .../sign/model/AccountCreateResponse.java | 20 +- .../sign/model/AccountGetResponse.java | 12 +- .../dropbox/sign/model/AccountResponse.java | 66 +- .../sign/model/AccountResponseQuotas.java | 40 +- .../sign/model/AccountResponseUsage.java | 6 +- .../sign/model/AccountUpdateRequest.java | 18 +- .../sign/model/AccountVerifyRequest.java | 6 +- .../sign/model/AccountVerifyResponse.java | 14 +- .../model/AccountVerifyResponseAccount.java | 7 +- .../sign/model/ApiAppCreateRequest.java | 44 +- .../dropbox/sign/model/ApiAppGetResponse.java | 12 +- .../sign/model/ApiAppListResponse.java | 18 +- .../dropbox/sign/model/ApiAppResponse.java | 63 +- .../sign/model/ApiAppResponseOAuth.java | 24 +- .../sign/model/ApiAppResponseOptions.java | 7 +- .../model/ApiAppResponseOwnerAccount.java | 12 +- .../ApiAppResponseWhiteLabelingOptions.java | 98 +-- .../sign/model/ApiAppUpdateRequest.java | 44 +- .../sign/model/BulkSendJobGetResponse.java | 28 +- ...lkSendJobGetResponseSignatureRequests.java | 174 ++--- .../sign/model/BulkSendJobListResponse.java | 20 +- .../sign/model/BulkSendJobResponse.java | 24 +- .../sign/model/BulkSendJobSendResponse.java | 14 +- .../sign/model/EmbeddedEditUrlRequest.java | 65 +- .../sign/model/EmbeddedEditUrlResponse.java | 14 +- .../EmbeddedEditUrlResponseEmbedded.java | 12 +- .../sign/model/EmbeddedSignUrlResponse.java | 14 +- .../EmbeddedSignUrlResponseEmbedded.java | 12 +- .../com/dropbox/sign/model/ErrorResponse.java | 6 +- .../sign/model/ErrorResponseError.java | 18 +- .../sign/model/EventCallbackRequest.java | 26 +- .../sign/model/EventCallbackRequestEvent.java | 71 +- .../EventCallbackRequestEventMetadata.java | 28 +- .../dropbox/sign/model/FaxGetResponse.java | 12 +- .../sign/model/FaxLineAddUserRequest.java | 18 +- .../model/FaxLineAreaCodeGetResponse.java | 6 +- .../sign/model/FaxLineCreateRequest.java | 30 +- .../sign/model/FaxLineDeleteRequest.java | 6 +- .../sign/model/FaxLineListResponse.java | 19 +- .../sign/model/FaxLineRemoveUserRequest.java | 18 +- .../dropbox/sign/model/FaxLineResponse.java | 12 +- .../sign/model/FaxLineResponseFaxLine.java | 25 +- .../dropbox/sign/model/FaxListResponse.java | 12 +- .../com/dropbox/sign/model/FaxResponse.java | 68 +- .../sign/model/FaxResponseTransmission.java | 34 +- .../dropbox/sign/model/FaxSendRequest.java | 54 +- .../com/dropbox/sign/model/FileResponse.java | 12 +- .../sign/model/FileResponseDataUri.java | 6 +- .../dropbox/sign/model/ListInfoResponse.java | 24 +- .../sign/model/OAuthTokenGenerateRequest.java | 30 +- .../sign/model/OAuthTokenRefreshRequest.java | 24 +- .../sign/model/OAuthTokenResponse.java | 30 +- .../sign/model/ReportCreateRequest.java | 23 +- .../sign/model/ReportCreateResponse.java | 13 +- .../dropbox/sign/model/ReportResponse.java | 28 +- ...BulkCreateEmbeddedWithTemplateRequest.java | 85 +-- ...ureRequestBulkSendWithTemplateRequest.java | 88 +-- ...SignatureRequestCreateEmbeddedRequest.java | 169 +++-- ...uestCreateEmbeddedWithTemplateRequest.java | 102 +-- .../SignatureRequestEditEmbeddedRequest.java | 165 +++-- ...equestEditEmbeddedWithTemplateRequest.java | 103 +-- .../model/SignatureRequestEditRequest.java | 169 ++--- ...gnatureRequestEditWithTemplateRequest.java | 108 +-- .../model/SignatureRequestGetResponse.java | 15 +- .../model/SignatureRequestListResponse.java | 21 +- .../model/SignatureRequestRemindRequest.java | 13 +- .../sign/model/SignatureRequestResponse.java | 161 ++--- .../SignatureRequestResponseAttachment.java | 38 +- ...gnatureRequestResponseCustomFieldBase.java | 32 +- ...ureRequestResponseCustomFieldCheckbox.java | 13 +- ...gnatureRequestResponseCustomFieldText.java | 12 +- .../SignatureRequestResponseDataBase.java | 31 +- ...atureRequestResponseDataValueCheckbox.java | 13 +- ...RequestResponseDataValueCheckboxMerge.java | 14 +- ...ureRequestResponseDataValueDateSigned.java | 14 +- ...atureRequestResponseDataValueDropdown.java | 13 +- ...atureRequestResponseDataValueInitials.java | 20 +- ...ignatureRequestResponseDataValueRadio.java | 12 +- ...tureRequestResponseDataValueSignature.java | 20 +- ...SignatureRequestResponseDataValueText.java | 12 +- ...tureRequestResponseDataValueTextMerge.java | 13 +- .../SignatureRequestResponseSignatures.java | 130 ++-- .../model/SignatureRequestSendRequest.java | 176 ++--- ...gnatureRequestSendWithTemplateRequest.java | 114 ++-- .../model/SignatureRequestUpdateRequest.java | 25 +- .../com/dropbox/sign/model/SubAttachment.java | 24 +- .../dropbox/sign/model/SubBulkSignerList.java | 16 +- .../model/SubBulkSignerListCustomField.java | 12 +- .../java/com/dropbox/sign/model/SubCC.java | 12 +- .../dropbox/sign/model/SubCustomField.java | 24 +- .../dropbox/sign/model/SubEditorOptions.java | 13 +- .../dropbox/sign/model/SubFieldOptions.java | 18 +- .../dropbox/sign/model/SubFormFieldGroup.java | 18 +- .../dropbox/sign/model/SubFormFieldRule.java | 26 +- .../sign/model/SubFormFieldRuleAction.java | 28 +- .../sign/model/SubFormFieldRuleTrigger.java | 34 +- .../model/SubFormFieldsPerDocumentBase.java | 67 +- .../SubFormFieldsPerDocumentCheckbox.java | 18 +- ...SubFormFieldsPerDocumentCheckboxMerge.java | 6 +- .../SubFormFieldsPerDocumentDateSigned.java | 52 +- .../SubFormFieldsPerDocumentDropdown.java | 64 +- .../SubFormFieldsPerDocumentHyperlink.java | 64 +- .../SubFormFieldsPerDocumentInitials.java | 6 +- .../model/SubFormFieldsPerDocumentRadio.java | 18 +- .../SubFormFieldsPerDocumentSignature.java | 6 +- .../model/SubFormFieldsPerDocumentText.java | 123 ++-- .../SubFormFieldsPerDocumentTextMerge.java | 51 +- .../com/dropbox/sign/model/SubMergeField.java | 16 +- .../java/com/dropbox/sign/model/SubOAuth.java | 28 +- .../com/dropbox/sign/model/SubOptions.java | 6 +- .../SubSignatureRequestGroupedSigners.java | 19 +- .../sign/model/SubSignatureRequestSigner.java | 43 +- .../SubSignatureRequestTemplateSigner.java | 43 +- .../dropbox/sign/model/SubSigningOptions.java | 38 +- .../dropbox/sign/model/SubTeamResponse.java | 12 +- .../dropbox/sign/model/SubTemplateRole.java | 12 +- .../sign/model/SubUnclaimedDraftSigner.java | 18 +- .../SubUnclaimedDraftTemplateSigner.java | 19 +- .../sign/model/SubWhiteLabelingOptions.java | 111 ++-- .../sign/model/TeamAddMemberRequest.java | 26 +- .../dropbox/sign/model/TeamCreateRequest.java | 6 +- .../sign/model/TeamGetInfoResponse.java | 12 +- .../dropbox/sign/model/TeamGetResponse.java | 12 +- .../dropbox/sign/model/TeamInfoResponse.java | 30 +- .../sign/model/TeamInviteResponse.java | 36 +- .../sign/model/TeamInvitesResponse.java | 13 +- .../sign/model/TeamMemberResponse.java | 18 +- .../sign/model/TeamMembersResponse.java | 19 +- .../sign/model/TeamParentResponse.java | 12 +- .../sign/model/TeamRemoveMemberRequest.java | 39 +- .../com/dropbox/sign/model/TeamResponse.java | 26 +- .../sign/model/TeamSubTeamsResponse.java | 19 +- .../dropbox/sign/model/TeamUpdateRequest.java | 6 +- .../sign/model/TemplateAddUserRequest.java | 19 +- .../TemplateCreateEmbeddedDraftRequest.java | 171 ++--- .../TemplateCreateEmbeddedDraftResponse.java | 14 +- ...teCreateEmbeddedDraftResponseTemplate.java | 28 +- .../sign/model/TemplateCreateRequest.java | 118 ++-- .../sign/model/TemplateCreateResponse.java | 14 +- .../model/TemplateCreateResponseTemplate.java | 6 +- .../sign/model/TemplateEditResponse.java | 6 +- .../sign/model/TemplateGetResponse.java | 12 +- .../sign/model/TemplateListResponse.java | 20 +- .../sign/model/TemplateRemoveUserRequest.java | 12 +- .../dropbox/sign/model/TemplateResponse.java | 107 +-- .../sign/model/TemplateResponseAccount.java | 37 +- .../model/TemplateResponseAccountQuota.java | 29 +- .../sign/model/TemplateResponseCCRole.java | 6 +- .../sign/model/TemplateResponseDocument.java | 43 +- ...mplateResponseDocumentCustomFieldBase.java | 63 +- ...teResponseDocumentCustomFieldCheckbox.java | 6 +- ...mplateResponseDocumentCustomFieldText.java | 34 +- .../TemplateResponseDocumentFieldGroup.java | 13 +- ...emplateResponseDocumentFieldGroupRule.java | 14 +- ...TemplateResponseDocumentFormFieldBase.java | 55 +- ...lateResponseDocumentFormFieldCheckbox.java | 13 +- ...teResponseDocumentFormFieldDateSigned.java | 13 +- ...lateResponseDocumentFormFieldDropdown.java | 13 +- ...ateResponseDocumentFormFieldHyperlink.java | 41 +- ...lateResponseDocumentFormFieldInitials.java | 13 +- ...emplateResponseDocumentFormFieldRadio.java | 12 +- ...ateResponseDocumentFormFieldSignature.java | 13 +- ...TemplateResponseDocumentFormFieldText.java | 67 +- ...mplateResponseDocumentStaticFieldBase.java | 63 +- ...teResponseDocumentStaticFieldCheckbox.java | 6 +- ...ResponseDocumentStaticFieldDateSigned.java | 7 +- ...teResponseDocumentStaticFieldDropdown.java | 6 +- ...eResponseDocumentStaticFieldHyperlink.java | 7 +- ...teResponseDocumentStaticFieldInitials.java | 6 +- ...plateResponseDocumentStaticFieldRadio.java | 6 +- ...eResponseDocumentStaticFieldSignature.java | 7 +- ...mplateResponseDocumentStaticFieldText.java | 6 +- .../TemplateResponseFieldAvgTextLength.java | 14 +- .../model/TemplateResponseSignerRole.java | 12 +- .../model/TemplateUpdateFilesRequest.java | 36 +- .../model/TemplateUpdateFilesResponse.java | 8 +- .../TemplateUpdateFilesResponseTemplate.java | 14 +- .../UnclaimedDraftCreateEmbeddedRequest.java | 252 +++---- ...raftCreateEmbeddedWithTemplateRequest.java | 199 +++--- .../model/UnclaimedDraftCreateRequest.java | 166 ++--- .../model/UnclaimedDraftCreateResponse.java | 14 +- .../UnclaimedDraftEditAndResendRequest.java | 55 +- .../sign/model/UnclaimedDraftResponse.java | 39 +- .../dropbox/sign/model/WarningResponse.java | 12 +- .../BeanValidationException.mustache | 4 +- sdks/java-v1/templates/Configuration.mustache | 38 +- sdks/java-v1/templates/JSON.mustache | 2 + sdks/java-v1/templates/build.gradle.mustache | 12 +- sdks/java-v1/templates/javaBuilder.mustache | 10 +- .../apache-httpclient/ApiClient.mustache | 9 +- .../libraries/apache-httpclient/api.mustache | 6 +- .../apache-httpclient/api_test.mustache | 4 +- .../libraries/apache-httpclient/pom.mustache | 5 +- .../libraries/feign/ApiClient.mustache | 5 + .../templates/libraries/feign/README.mustache | 2 +- .../templates/libraries/feign/api.mustache | 20 +- .../libraries/feign/api_test.mustache | 4 +- .../libraries/feign/build.gradle.mustache | 8 +- .../libraries/feign/build.sbt.mustache | 5 +- .../templates/libraries/feign/model.mustache | 4 +- .../templates/libraries/feign/pojo.mustache | 25 +- .../templates/libraries/feign/pom.mustache | 16 +- .../google-api-client/ApiClient.mustache | 5 + .../libraries/jersey2/ApiClient.mustache | 54 +- .../templates/libraries/jersey2/JSON.mustache | 10 +- .../libraries/jersey2/anyof_model.mustache | 44 +- .../templates/libraries/jersey2/api.mustache | 18 +- .../libraries/jersey2/api_test.mustache | 4 +- .../libraries/jersey2/build.gradle.mustache | 6 + .../libraries/jersey2/build.sbt.mustache | 3 + .../libraries/jersey2/model.mustache | 4 +- .../libraries/jersey2/oneof_model.mustache | 17 +- .../templates/libraries/jersey2/pojo.mustache | 17 +- .../templates/libraries/jersey2/pom.mustache | 14 + .../libraries/jersey3/ApiClient.mustache | 54 +- .../templates/libraries/jersey3/JSON.mustache | 5 +- .../libraries/jersey3/anyof_model.mustache | 44 +- .../templates/libraries/jersey3/api.mustache | 14 +- .../libraries/jersey3/build.gradle.mustache | 6 + .../libraries/jersey3/build.sbt.mustache | 3 + .../libraries/jersey3/oneof_model.mustache | 17 +- .../templates/libraries/jersey3/pojo.mustache | 19 +- .../templates/libraries/jersey3/pom.mustache | 14 +- .../libraries/microprofile/api.mustache | 15 +- .../beanValidationCookieParams.mustache | 1 + .../microprofile/cookieParams.mustache | 1 + .../microprofile/cookieParamsImpl.mustache | 1 + .../libraries/microprofile/enumClass.mustache | 2 +- .../microprofile/enumOuterClass.mustache | 2 +- .../libraries/microprofile/model.mustache | 13 +- .../libraries/microprofile/pojo.mustache | 29 +- .../microprofile/pojoOverrides.mustache | 64 ++ .../libraries/microprofile/pom.mustache | 18 +- .../libraries/microprofile/pom_3.0.mustache | 28 +- .../libraries/native/ApiClient.mustache | 8 +- .../templates/libraries/native/JSON.mustache | 5 + .../libraries/native/anyof_model.mustache | 15 +- .../templates/libraries/native/api.mustache | 39 +- .../libraries/native/api_test.mustache | 4 +- .../libraries/native/build.gradle.mustache | 20 +- .../templates/libraries/native/model.mustache | 4 +- .../libraries/native/oneof_model.mustache | 15 +- .../templates/libraries/native/pojo.mustache | 33 +- .../templates/libraries/native/pom.mustache | 16 +- .../libraries/okhttp-gson/ApiClient.mustache | 5 +- .../libraries/okhttp-gson/JSON.mustache | 2 + .../libraries/okhttp-gson/README.mustache | 2 +- .../okhttp-gson/anyof_model.mustache | 8 +- .../libraries/okhttp-gson/api.mustache | 54 +- .../libraries/okhttp-gson/api_test.mustache | 4 +- .../okhttp-gson/build.gradle.mustache | 2 +- .../libraries/okhttp-gson/build.sbt.mustache | 2 +- .../libraries/okhttp-gson/model.mustache | 4 +- .../okhttp-gson/oneof_model.mustache | 6 +- .../libraries/okhttp-gson/pojo.mustache | 22 +- .../libraries/okhttp-gson/pom.mustache | 7 +- .../rest-assured/JacksonObjectMapper.mustache | 2 +- .../libraries/rest-assured/api.mustache | 14 +- .../libraries/rest-assured/api_test.mustache | 4 +- .../libraries/rest-assured/pom.mustache | 5 +- .../libraries/restclient/ApiClient.mustache | 43 +- .../libraries/restclient/api.mustache | 90 +++ .../libraries/restclient/api_test.mustache | 11 +- .../libraries/restclient/auth/OAuth.mustache | 36 +- .../libraries/restclient/pom.mustache | 11 +- .../libraries/resteasy/JSON.mustache | 2 +- .../additional_properties.mustache | 45 ++ .../libraries/resttemplate/api.mustache | 4 +- .../libraries/resttemplate/api_test.mustache | 4 +- .../resttemplate/auth/OAuth.mustache | 2 +- .../resttemplate/build.gradle.mustache | 9 +- .../libraries/resttemplate/model.mustache | 78 +++ .../libraries/resttemplate/pojo.mustache | 620 ++++++++++++++++++ .../libraries/resttemplate/pom.mustache | 22 +- .../libraries/retrofit2/ApiClient.mustache | 2 + .../libraries/retrofit2/JSON.mustache | 2 + .../libraries/retrofit2/JSON_jackson.mustache | 2 +- .../libraries/retrofit2/api.mustache | 4 +- .../libraries/retrofit2/api_test.mustache | 4 +- .../libraries/retrofit2/play26/api.mustache | 4 +- .../libraries/retrofit2/pom.mustache | 5 +- .../libraries/vertx/ApiClient.mustache | 2 +- .../libraries/webclient/ApiClient.mustache | 2 +- .../webclient/additional_properties.mustache | 45 ++ .../libraries/webclient/api.mustache | 80 ++- .../libraries/webclient/api_test.mustache | 4 +- .../libraries/webclient/build.gradle.mustache | 2 + .../libraries/webclient/model.mustache | 78 +++ .../libraries/webclient/pojo.mustache | 620 ++++++++++++++++++ sdks/java-v1/templates/model.mustache | 4 +- .../java-v1/templates/modelInnerEnum.mustache | 2 +- .../nullable_var_annotations.mustache | 1 + sdks/java-v1/templates/pojo.mustache | 21 +- sdks/java-v1/templates/pom.mustache | 17 +- .../templates/typeInfoAnnotation.mustache | 6 + 311 files changed, 6474 insertions(+), 3726 deletions(-) create mode 100644 sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache create mode 100644 sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/model.mustache create mode 100644 sdks/java-v1/templates/libraries/resttemplate/pojo.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/additional_properties.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/model.mustache create mode 100644 sdks/java-v1/templates/libraries/webclient/pojo.mustache create mode 100644 sdks/java-v1/templates/nullable_var_annotations.mustache diff --git a/sdks/java-v1/pom.xml b/sdks/java-v1/pom.xml index 1c7bc968e..834b4de4d 100644 --- a/sdks/java-v1/pom.xml +++ b/sdks/java-v1/pom.xml @@ -334,6 +334,7 @@ jersey-apache-connector ${jersey-version} + org.junit.jupiter @@ -355,6 +356,7 @@ 2.17.1 0.2.6 1.3.5 + 2.0.2 5.10.0 2.21.0 3.12.4 diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index 9a82b95d3..c342ae753 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java @@ -751,31 +751,11 @@ public Entity serialize( if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()) - .size(file.length()) - .build(); - - // Attempt to probe the content type for the file so that the form part is more - // correctly - // and precisely identified, but fall back to application/octet-stream if that - // fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable) param.getValue()) + .forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = - FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart( - new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -826,6 +806,40 @@ public Entity serialize( return entity; } + /** + * Adds the object with the provided key to the MultiPart. Based on the object type sets + * Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = + FormDataContentDisposition.name(key) + .fileName(file.getName()) + .size(file.length()) + .build(); + + // Attempt to probe the content type for the file so that the form part is more + // correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given Content-Type (only JSON, HTTP * form is supported for now). @@ -1136,7 +1150,11 @@ private Response sendRequest( } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { - response = invocationBuilder.method("DELETE", entity); + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { + response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java index e2ebcc458..006cc7e54 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java @@ -12,13 +12,18 @@ package com.dropbox.sign; +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.8.0") public class Configuration { public static final String VERSION = "1.8-dev"; - private static ApiClient defaultApiClient = new ApiClient(); + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; /** * Get the default API client, which would be used when creating API instances without providing @@ -27,7 +32,18 @@ public class Configuration { * @return Default API client */ public static ApiClient getDefaultApiClient() { - return defaultApiClient; + 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; } /** @@ -37,6 +53,13 @@ public static ApiClient getDefaultApiClient() { * @param apiClient API client */ public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = 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() {} } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java index f460b4737..c8df3c5c3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -58,7 +58,8 @@ public void setApiClient(ApiClient apiClient) { * @return AccountCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *

Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+ *
+ * * * * @@ -77,7 +78,8 @@ public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateReq * @return ApiResponse<AccountCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -131,7 +133,8 @@ public ApiResponse accountCreateWithHttpInfo( * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -191,7 +194,8 @@ public ApiResponse accountGetWithHttpInfo(String accountId) * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -238,7 +242,8 @@ public ApiResponse accountGetWithHttpInfo( * @return AccountGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -257,7 +262,8 @@ public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateReques * @return ApiResponse<AccountGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -308,7 +314,8 @@ public ApiResponse accountUpdateWithHttpInfo( * @return AccountVerifyResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -326,7 +333,8 @@ public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyReq * @return ApiResponse<AccountVerifyResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java index 2c5ed4492..744623194 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java @@ -55,7 +55,8 @@ public void setApiClient(ApiClient apiClient) { * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -73,7 +74,8 @@ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -123,7 +125,8 @@ public ApiResponse apiAppCreateWithHttpInfo( * @param clientId The client id of the API App to delete. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -140,7 +143,8 @@ public void apiAppDelete(String clientId) throws ApiException { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -189,7 +193,8 @@ public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiExc * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -206,7 +211,8 @@ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -261,7 +267,8 @@ public ApiResponse apiAppGetWithHttpInfo(String clientId) * @return ApiAppListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -321,7 +328,8 @@ public ApiResponse apiAppListWithHttpInfo(Integer page) * @return ApiResponse<ApiAppListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -376,7 +384,8 @@ public ApiResponse apiAppListWithHttpInfo(Integer page, Inte * @return ApiAppGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -397,7 +406,8 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp * @return ApiResponse<ApiAppGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java index 07cbd6af3..e3a9d63a9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java @@ -58,7 +58,8 @@ public void setApiClient(ApiClient apiClient) { * @return BulkSendJobGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -122,7 +123,8 @@ public ApiResponse bulkSendJobGetWithHttpInfo( * @return ApiResponse<BulkSendJobGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -191,7 +193,8 @@ public ApiResponse bulkSendJobGetWithHttpInfo( * @return BulkSendJobListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -251,7 +254,8 @@ public ApiResponse bulkSendJobListWithHttpInfo(Integer * @return ApiResponse<BulkSendJobListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java index fd04f5b2b..c842371ea 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java @@ -55,7 +55,8 @@ public void setApiClient(ApiClient apiClient) { * @return EmbeddedEditUrlResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -76,7 +77,8 @@ public EmbeddedEditUrlResponse embeddedEditUrl( * @return ApiResponse<EmbeddedEditUrlResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -140,7 +142,8 @@ public ApiResponse embeddedEditUrlWithHttpInfo( * @return EmbeddedSignUrlResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -159,7 +162,8 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc * @return ApiResponse<EmbeddedSignUrlResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java index 9e0041637..f6c01884b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -54,7 +54,8 @@ public void setApiClient(ApiClient apiClient) { * @param faxId Fax ID (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -71,7 +72,8 @@ public void faxDelete(String faxId) throws ApiException { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -119,7 +121,8 @@ public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException * @return File * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
204 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -136,7 +139,8 @@ public File faxFiles(String faxId) throws ApiException { * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -186,7 +190,8 @@ public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -203,7 +208,8 @@ public FaxGetResponse faxGet(String faxId) throws ApiException { * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -255,7 +261,8 @@ public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiEx * @return FaxListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -313,7 +320,8 @@ public ApiResponse faxListWithHttpInfo(Integer page) throws Api * @return ApiResponse<FaxListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -364,7 +372,8 @@ public ApiResponse faxListWithHttpInfo(Integer page, Integer pa * @return FaxGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -381,7 +390,8 @@ public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException * @return ApiResponse<FaxGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java index e8736ad65..8c9130c39 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -58,7 +58,8 @@ public void setApiClient(ApiClient apiClient) { * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -76,7 +77,8 @@ public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserReques * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -130,7 +132,8 @@ public ApiResponse faxLineAddUserWithHttpInfo( * @return FaxLineAreaCodeGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -217,7 +220,8 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( * @return ApiResponse<FaxLineAreaCodeGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -272,7 +276,8 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -290,7 +295,8 @@ public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -339,7 +345,8 @@ public ApiResponse faxLineCreateWithHttpInfo( * @param faxLineDeleteRequest (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -356,7 +363,8 @@ public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiE * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -405,7 +413,8 @@ public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineD * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -422,7 +431,8 @@ public FaxLineResponse faxLineGet(String number) throws ApiException { * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -476,7 +486,8 @@ public ApiResponse faxLineGetWithHttpInfo(String number) throws * @return FaxLineListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -588,7 +599,8 @@ public ApiResponse faxLineListWithHttpInfo( * @return ApiResponse<FaxLineListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -644,7 +656,8 @@ public ApiResponse faxLineListWithHttpInfo( * @return FaxLineResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -662,7 +675,8 @@ public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveU * @return ApiResponse<FaxLineResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java index db4fbb10c..bd4ac286b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -52,7 +52,8 @@ public void setApiClient(ApiClient apiClient) { * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -71,7 +72,8 @@ public OAuthTokenResponse oauthTokenGenerate( * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -124,7 +126,8 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( * @return OAuthTokenResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -145,7 +148,8 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR * @return ApiResponse<OAuthTokenResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java index 5fa6c0f95..21d7bd53d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java @@ -53,7 +53,8 @@ public void setApiClient(ApiClient apiClient) { * @return ReportCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -74,7 +75,8 @@ public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest * @return ApiResponse<ReportCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java index 6996e6c02..6ddd0408f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java @@ -73,7 +73,8 @@ public void setApiClient(ApiClient apiClient) { * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -99,7 +100,8 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -157,7 +159,8 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( * @return BulkSendJobSendResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -180,7 +183,8 @@ public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate( * @return ApiResponse<BulkSendJobSendResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -249,7 +253,8 @@ public ApiResponse signatureRequestBulkSendWithTemplate * @param signatureRequestId The id of the incomplete SignatureRequest to cancel. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -283,7 +288,8 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -342,7 +348,8 @@ public ApiResponse signatureRequestCancelWithHttpInfo(String signatureRequ * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -367,7 +374,8 @@ public SignatureRequestGetResponse signatureRequestCreateEmbedded( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -423,7 +431,8 @@ public ApiResponse signatureRequestCreateEmbeddedWi * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -448,7 +457,8 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -508,7 +518,8 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -532,7 +543,8 @@ public SignatureRequestGetResponse signatureRequestEdit( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -604,7 +616,8 @@ public ApiResponse signatureRequestEditWithHttpInfo * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -632,7 +645,8 @@ public SignatureRequestGetResponse signatureRequestEditEmbedded( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -703,7 +717,8 @@ public ApiResponse signatureRequestEditEmbeddedWith * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -730,7 +745,8 @@ public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -803,7 +819,8 @@ public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -828,7 +845,8 @@ public SignatureRequestGetResponse signatureRequestEditWithTemplate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -899,7 +917,8 @@ public ApiResponse signatureRequestEditWithTemplate * @return File * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -940,7 +959,8 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1007,7 +1027,8 @@ public ApiResponse signatureRequestFilesWithHttpInfo( * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1028,7 +1049,8 @@ public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureReques * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1090,7 +1112,8 @@ public ApiResponse signatureRequestFilesAsDataUriWithHttpIn * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1136,7 +1159,8 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1199,7 +1223,8 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1218,7 +1243,8 @@ public SignatureRequestGetResponse signatureRequestGet(String signatureRequestId * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1284,7 +1310,8 @@ public ApiResponse signatureRequestGetWithHttpInfo( * @return SignatureRequestListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1402,7 +1429,8 @@ public ApiResponse signatureRequestListWithHttpInf * @return ApiResponse<SignatureRequestListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1459,7 +1487,8 @@ public ApiResponse signatureRequestListWithHttpInf * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1480,7 +1509,8 @@ public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureR * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1540,7 +1570,8 @@ public ApiResponse signatureRequestReleaseHoldWithH * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1564,7 +1595,8 @@ public SignatureRequestGetResponse signatureRequestRemind( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1633,7 +1665,8 @@ public ApiResponse signatureRequestRemindWithHttpIn * @param signatureRequestId The id of the SignatureRequest to remove. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1655,7 +1688,8 @@ public void signatureRequestRemove(String signatureRequestId) throws ApiExceptio * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1712,7 +1746,8 @@ public ApiResponse signatureRequestRemoveWithHttpInfo(String signatureRequ * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1733,7 +1768,8 @@ public SignatureRequestGetResponse signatureRequestSend( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1786,7 +1822,8 @@ public ApiResponse signatureRequestSendWithHttpInfo * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1807,7 +1844,8 @@ public SignatureRequestGetResponse signatureRequestSendWithTemplate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1865,7 +1903,8 @@ public ApiResponse signatureRequestSendWithTemplate * @return SignatureRequestGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1890,7 +1929,8 @@ public SignatureRequestGetResponse signatureRequestUpdate( * @return ApiResponse<SignatureRequestGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java index cf3167ab9..836ebaaa8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -64,7 +64,8 @@ public void setApiClient(ApiClient apiClient) { * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -106,7 +107,8 @@ public ApiResponse teamAddMemberWithHttpInfo( * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -161,7 +163,8 @@ public ApiResponse teamAddMemberWithHttpInfo( * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -179,7 +182,8 @@ public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws Ap * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -227,7 +231,8 @@ public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest tea * * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -244,7 +249,8 @@ public void teamDelete() throws ApiException { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -282,7 +288,8 @@ public ApiResponse teamDeleteWithHttpInfo() throws ApiException { * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -299,7 +306,8 @@ public TeamGetResponse teamGet() throws ApiException { * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -338,7 +346,8 @@ public ApiResponse teamGetWithHttpInfo() throws ApiException { * @return TeamGetInfoResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -373,7 +382,8 @@ public ApiResponse teamInfoWithHttpInfo() throws ApiExcepti * @return ApiResponse<TeamGetInfoResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -418,7 +428,8 @@ public ApiResponse teamInfoWithHttpInfo(String teamId) * @return TeamInvitesResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -453,7 +464,8 @@ public ApiResponse teamInvitesWithHttpInfo() throws ApiExce * @return ApiResponse<TeamInvitesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -503,7 +515,8 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr * @return TeamMembersResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -566,7 +579,8 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I * @return ApiResponse<TeamMembersResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -634,7 +648,8 @@ public ApiResponse teamMembersWithHttpInfo( * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -657,7 +672,8 @@ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMember * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -711,7 +727,8 @@ public ApiResponse teamRemoveMemberWithHttpInfo( * @return TeamSubTeamsResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
201 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -773,7 +790,8 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, * @return ApiResponse<TeamSubTeamsResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -836,7 +854,8 @@ public ApiResponse teamSubTeamsWithHttpInfo( * @return TeamGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -853,7 +872,8 @@ public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws Ap * @return ApiResponse<TeamGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java index bee010c28..39d38b449 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -66,7 +66,8 @@ public void setApiClient(ApiClient apiClient) { * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -86,7 +87,8 @@ public TemplateGetResponse templateAddUser( * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -148,7 +150,8 @@ public ApiResponse templateAddUserWithHttpInfo( * @return TemplateCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -166,7 +169,8 @@ public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreat * @return ApiResponse<TemplateCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -219,7 +223,8 @@ public ApiResponse templateCreateWithHttpInfo( * @return TemplateCreateEmbeddedDraftResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -240,7 +245,8 @@ public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft( * @return ApiResponse<TemplateCreateEmbeddedDraftResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -292,7 +298,8 @@ public ApiResponse templateCreateEmbeddedDr * @param templateId The id of the Template to delete. (required) * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -309,7 +316,8 @@ public void templateDelete(String templateId) throws ApiException { * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -364,7 +372,8 @@ public ApiResponse templateDeleteWithHttpInfo(String templateId) throws Ap * @return File * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -404,7 +413,8 @@ public ApiResponse templateFilesWithHttpInfo(String templateId) throws Api * @return ApiResponse<File> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -466,7 +476,8 @@ public ApiResponse templateFilesWithHttpInfo(String templateId, String fil * @return FileResponseDataUri * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -487,7 +498,8 @@ public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiE * @return ApiResponse<FileResponseDataUri> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -548,7 +560,8 @@ public ApiResponse templateFilesAsDataUriWithHttpInfo(Strin * @return FileResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -591,7 +604,8 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ * @return ApiResponse<FileResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -652,7 +666,8 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo( * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -669,7 +684,8 @@ public TemplateGetResponse templateGet(String templateId) throws ApiException { * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -730,7 +746,8 @@ public ApiResponse templateGetWithHttpInfo(String templateI * @return TemplateListResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -844,7 +861,8 @@ public ApiResponse templateListWithHttpInfo( * @return ApiResponse<TemplateListResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -900,7 +918,8 @@ public ApiResponse templateListWithHttpInfo( * @return TemplateGetResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -921,7 +940,8 @@ public TemplateGetResponse templateRemoveUser( * @return ApiResponse<TemplateGetResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -998,7 +1018,8 @@ public ApiResponse templateRemoveUserWithHttpInfo( * @return TemplateUpdateFilesResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -1031,7 +1052,8 @@ public TemplateUpdateFilesResponse templateUpdateFiles( * @return ApiResponse<TemplateUpdateFilesResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java index 6219c4a13..f0690a427 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java @@ -56,7 +56,8 @@ public void setApiClient(ApiClient apiClient) { * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -77,7 +78,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreate( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -135,7 +137,8 @@ public ApiResponse unclaimedDraftCreateWithHttpInf * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -161,7 +164,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -220,7 +224,8 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -248,7 +253,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -310,7 +316,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( * @return UnclaimedDraftCreateResponse * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * @@ -338,7 +345,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend( * @return ApiResponse<UnclaimedDraftCreateResponse> * @throws ApiException if fails to make API call * @http.response.details - *
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+ *
+ * * * * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java index fc3c3081d..025c6c173 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nullable private String clientSecret; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public AccountCreateRequest() {} @@ -63,7 +63,7 @@ public static AccountCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountCreateRequest.class); } - public AccountCreateRequest emailAddress(String emailAddress) { + public AccountCreateRequest emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -82,11 +82,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public AccountCreateRequest clientId(String clientId) { + public AccountCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -105,11 +105,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public AccountCreateRequest clientSecret(String clientSecret) { + public AccountCreateRequest clientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -128,11 +128,11 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } - public AccountCreateRequest locale(String locale) { + public AccountCreateRequest locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -152,7 +152,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java index be4f9500b..1b129dcce 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_OAUTH_DATA = "oauth_data"; - private OAuthTokenResponse oauthData; + @javax.annotation.Nullable private OAuthTokenResponse oauthData; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountCreateResponse() {} @@ -62,7 +62,7 @@ public static AccountCreateResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountCreateResponse.class); } - public AccountCreateResponse account(AccountResponse account) { + public AccountCreateResponse account(@javax.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -81,11 +81,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountCreateResponse oauthData(OAuthTokenResponse oauthData) { + public AccountCreateResponse oauthData( + @javax.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; return this; } @@ -103,11 +104,12 @@ public OAuthTokenResponse getOauthData() { @JsonProperty(JSON_PROPERTY_OAUTH_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauthData(OAuthTokenResponse oauthData) { + public void setOauthData(@javax.annotation.Nullable OAuthTokenResponse oauthData) { this.oauthData = oauthData; } - public AccountCreateResponse warnings(List warnings) { + public AccountCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -133,7 +135,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java index 36473bf74..f2125e568 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountGetResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nonnull private AccountResponse account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountGetResponse() {} @@ -57,7 +57,7 @@ public static AccountGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountGetResponse.class); } - public AccountGetResponse account(AccountResponse account) { + public AccountGetResponse account(@javax.annotation.Nonnull AccountResponse account) { this.account = account; return this; } @@ -76,11 +76,11 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nonnull AccountResponse account) { this.account = account; } - public AccountGetResponse warnings(List warnings) { + public AccountGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java index 541c7f61d..2ab7fc80f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -43,37 +43,37 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; + @javax.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; + @javax.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private AccountResponseQuotas quotas; + @javax.annotation.Nullable private AccountResponseQuotas quotas; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_ROLE_CODE = "role_code"; - private String roleCode; + @javax.annotation.Nullable private String roleCode; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public static final String JSON_PROPERTY_USAGE = "usage"; - private AccountResponseUsage usage; + @javax.annotation.Nullable private AccountResponseUsage usage; public AccountResponse() {} @@ -91,7 +91,7 @@ public static AccountResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountResponse.class); } - public AccountResponse accountId(String accountId) { + public AccountResponse accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -109,11 +109,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountResponse emailAddress(String emailAddress) { + public AccountResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -131,11 +131,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public AccountResponse isLocked(Boolean isLocked) { + public AccountResponse isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -153,11 +153,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public AccountResponse isPaidHs(Boolean isPaidHs) { + public AccountResponse isPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -175,11 +175,11 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public AccountResponse isPaidHf(Boolean isPaidHf) { + public AccountResponse isPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -197,11 +197,11 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public AccountResponse quotas(AccountResponseQuotas quotas) { + public AccountResponse quotas(@javax.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; return this; } @@ -219,11 +219,11 @@ public AccountResponseQuotas getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(AccountResponseQuotas quotas) { + public void setQuotas(@javax.annotation.Nullable AccountResponseQuotas quotas) { this.quotas = quotas; } - public AccountResponse callbackUrl(String callbackUrl) { + public AccountResponse callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -241,11 +241,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountResponse roleCode(String roleCode) { + public AccountResponse roleCode(@javax.annotation.Nullable String roleCode) { this.roleCode = roleCode; return this; } @@ -263,11 +263,11 @@ public String getRoleCode() { @JsonProperty(JSON_PROPERTY_ROLE_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRoleCode(String roleCode) { + public void setRoleCode(@javax.annotation.Nullable String roleCode) { this.roleCode = roleCode; } - public AccountResponse teamId(String teamId) { + public AccountResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -285,11 +285,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public AccountResponse locale(String locale) { + public AccountResponse locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -309,11 +309,11 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } - public AccountResponse usage(AccountResponseUsage usage) { + public AccountResponse usage(@javax.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; return this; } @@ -331,7 +331,7 @@ public AccountResponseUsage getUsage() { @JsonProperty(JSON_PROPERTY_USAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsage(AccountResponseUsage usage) { + public void setUsage(@javax.annotation.Nullable AccountResponseUsage usage) { this.usage = usage; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index 584917ff9..74342dba2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -39,22 +39,22 @@ public class AccountResponseQuotas { public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; + @javax.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; + @javax.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_TEMPLATES_TOTAL = "templates_total"; - private Integer templatesTotal; + @javax.annotation.Nullable private Integer templatesTotal; public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; + @javax.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; + @javax.annotation.Nullable private Integer smsVerificationsLeft; public static final String JSON_PROPERTY_NUM_FAX_PAGES_LEFT = "num_fax_pages_left"; - private Integer numFaxPagesLeft; + @javax.annotation.Nullable private Integer numFaxPagesLeft; public AccountResponseQuotas() {} @@ -73,7 +73,8 @@ public static AccountResponseQuotas init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountResponseQuotas.class); } - public AccountResponseQuotas apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public AccountResponseQuotas apiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -91,11 +92,12 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public AccountResponseQuotas documentsLeft(Integer documentsLeft) { + public AccountResponseQuotas documentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -113,11 +115,11 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public AccountResponseQuotas templatesTotal(Integer templatesTotal) { + public AccountResponseQuotas templatesTotal(@javax.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; return this; } @@ -135,11 +137,11 @@ public Integer getTemplatesTotal() { @JsonProperty(JSON_PROPERTY_TEMPLATES_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesTotal(Integer templatesTotal) { + public void setTemplatesTotal(@javax.annotation.Nullable Integer templatesTotal) { this.templatesTotal = templatesTotal; } - public AccountResponseQuotas templatesLeft(Integer templatesLeft) { + public AccountResponseQuotas templatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -157,11 +159,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public AccountResponseQuotas smsVerificationsLeft(Integer smsVerificationsLeft) { + public AccountResponseQuotas smsVerificationsLeft( + @javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -179,11 +182,12 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } - public AccountResponseQuotas numFaxPagesLeft(Integer numFaxPagesLeft) { + public AccountResponseQuotas numFaxPagesLeft( + @javax.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; return this; } @@ -201,7 +205,7 @@ public Integer getNumFaxPagesLeft() { @JsonProperty(JSON_PROPERTY_NUM_FAX_PAGES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumFaxPagesLeft(Integer numFaxPagesLeft) { + public void setNumFaxPagesLeft(@javax.annotation.Nullable Integer numFaxPagesLeft) { this.numFaxPagesLeft = numFaxPagesLeft; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java index daac05931..c7565e0fb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponseUsage { public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; - private Integer faxPagesSent; + @javax.annotation.Nullable private Integer faxPagesSent; public AccountResponseUsage() {} @@ -49,7 +49,7 @@ public static AccountResponseUsage init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountResponseUsage.class); } - public AccountResponseUsage faxPagesSent(Integer faxPagesSent) { + public AccountResponseUsage faxPagesSent(@javax.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; return this; } @@ -67,7 +67,7 @@ public Integer getFaxPagesSent() { @JsonProperty(JSON_PROPERTY_FAX_PAGES_SENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFaxPagesSent(Integer faxPagesSent) { + public void setFaxPagesSent(@javax.annotation.Nullable Integer faxPagesSent) { this.faxPagesSent = faxPagesSent; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java index 24bc0a80d..88c5ffa95 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountUpdateRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_LOCALE = "locale"; - private String locale; + @javax.annotation.Nullable private String locale; public AccountUpdateRequest() {} @@ -59,7 +59,7 @@ public static AccountUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountUpdateRequest.class); } - public AccountUpdateRequest accountId(String accountId) { + public AccountUpdateRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -77,11 +77,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public AccountUpdateRequest callbackUrl(String callbackUrl) { + public AccountUpdateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -99,11 +99,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public AccountUpdateRequest locale(String locale) { + public AccountUpdateRequest locale(@javax.annotation.Nullable String locale) { this.locale = locale; return this; } @@ -123,7 +123,7 @@ public String getLocale() { @JsonProperty(JSON_PROPERTY_LOCALE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLocale(String locale) { + public void setLocale(@javax.annotation.Nullable String locale) { this.locale = locale; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java index ffe2f15e4..9b5bbef29 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public AccountVerifyRequest() {} @@ -49,7 +49,7 @@ public static AccountVerifyRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), AccountVerifyRequest.class); } - public AccountVerifyRequest emailAddress(String emailAddress) { + public AccountVerifyRequest emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -68,7 +68,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java index bce3d5a4a..6661fbcd0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountVerifyResponseAccount account; + @javax.annotation.Nullable private AccountVerifyResponseAccount account; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public AccountVerifyResponse() {} @@ -58,7 +58,8 @@ public static AccountVerifyResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), AccountVerifyResponse.class); } - public AccountVerifyResponse account(AccountVerifyResponseAccount account) { + public AccountVerifyResponse account( + @javax.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; return this; } @@ -76,11 +77,12 @@ public AccountVerifyResponseAccount getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountVerifyResponseAccount account) { + public void setAccount(@javax.annotation.Nullable AccountVerifyResponseAccount account) { this.account = account; } - public AccountVerifyResponse warnings(List warnings) { + public AccountVerifyResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +108,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java index 3a2a2f72f..5857a695d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponseAccount { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public AccountVerifyResponseAccount() {} @@ -51,7 +51,8 @@ public static AccountVerifyResponseAccount init(HashMap data) throws Exception { AccountVerifyResponseAccount.class); } - public AccountVerifyResponseAccount emailAddress(String emailAddress) { + public AccountVerifyResponseAccount emailAddress( + @javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -69,7 +70,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java index ff8e8a71d..b225f3216 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java @@ -42,25 +42,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppCreateRequest { public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = new ArrayList<>(); + @javax.annotation.Nonnull private List domains = new ArrayList<>(); public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; + @javax.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; + @javax.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; + @javax.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppCreateRequest() {} @@ -78,7 +78,7 @@ public static ApiAppCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppCreateRequest.class); } - public ApiAppCreateRequest domains(List domains) { + public ApiAppCreateRequest domains(@javax.annotation.Nonnull List domains) { this.domains = domains; return this; } @@ -105,11 +105,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nonnull List domains) { this.domains = domains; } - public ApiAppCreateRequest name(String name) { + public ApiAppCreateRequest name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -128,11 +128,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public ApiAppCreateRequest callbackUrl(String callbackUrl) { + public ApiAppCreateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -150,11 +150,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppCreateRequest customLogoFile(File customLogoFile) { + public ApiAppCreateRequest customLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -172,11 +172,11 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppCreateRequest oauth(SubOAuth oauth) { + public ApiAppCreateRequest oauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -194,11 +194,11 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppCreateRequest options(SubOptions options) { + public ApiAppCreateRequest options(@javax.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -216,11 +216,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@javax.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppCreateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppCreateRequest whiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -238,7 +239,8 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java index 57bf2b41c..370fb0132 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppGetResponse { public static final String JSON_PROPERTY_API_APP = "api_app"; - private ApiAppResponse apiApp; + @javax.annotation.Nonnull private ApiAppResponse apiApp; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ApiAppGetResponse() {} @@ -57,7 +57,7 @@ public static ApiAppGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppGetResponse.class); } - public ApiAppGetResponse apiApp(ApiAppResponse apiApp) { + public ApiAppGetResponse apiApp(@javax.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; return this; } @@ -76,11 +76,11 @@ public ApiAppResponse getApiApp() { @JsonProperty(JSON_PROPERTY_API_APP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApp(ApiAppResponse apiApp) { + public void setApiApp(@javax.annotation.Nonnull ApiAppResponse apiApp) { this.apiApp = apiApp; } - public ApiAppGetResponse warnings(List warnings) { + public ApiAppGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java index 4963459cd..f5b9cbc24 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppListResponse { public static final String JSON_PROPERTY_API_APPS = "api_apps"; - private List apiApps = new ArrayList<>(); + @javax.annotation.Nonnull private List apiApps = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ApiAppListResponse() {} @@ -61,7 +61,7 @@ public static ApiAppListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppListResponse.class); } - public ApiAppListResponse apiApps(List apiApps) { + public ApiAppListResponse apiApps(@javax.annotation.Nonnull List apiApps) { this.apiApps = apiApps; return this; } @@ -88,11 +88,11 @@ public List getApiApps() { @JsonProperty(JSON_PROPERTY_API_APPS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiApps(List apiApps) { + public void setApiApps(@javax.annotation.Nonnull List apiApps) { this.apiApps = apiApps; } - public ApiAppListResponse listInfo(ListInfoResponse listInfo) { + public ApiAppListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +111,11 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public ApiAppListResponse warnings(List warnings) { + public ApiAppListResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +141,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java index 9e5b0073d..ef568f522 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java @@ -44,34 +44,34 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponse { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; + @javax.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_IS_APPROVED = "is_approved"; - private Boolean isApproved; + @javax.annotation.Nullable private Boolean isApproved; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private ApiAppResponseOAuth oauth; + @javax.annotation.Nullable private ApiAppResponseOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private ApiAppResponseOptions options; + @javax.annotation.Nullable private ApiAppResponseOptions options; public static final String JSON_PROPERTY_OWNER_ACCOUNT = "owner_account"; - private ApiAppResponseOwnerAccount ownerAccount; + @javax.annotation.Nullable private ApiAppResponseOwnerAccount ownerAccount; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private ApiAppResponseWhiteLabelingOptions whiteLabelingOptions; public ApiAppResponse() {} @@ -89,7 +89,7 @@ public static ApiAppResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponse.class); } - public ApiAppResponse callbackUrl(String callbackUrl) { + public ApiAppResponse callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -107,11 +107,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponse clientId(String clientId) { + public ApiAppResponse clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -129,11 +129,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public ApiAppResponse createdAt(Integer createdAt) { + public ApiAppResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -151,11 +151,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public ApiAppResponse domains(List domains) { + public ApiAppResponse domains(@javax.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -181,11 +181,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppResponse name(String name) { + public ApiAppResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -203,11 +203,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ApiAppResponse isApproved(Boolean isApproved) { + public ApiAppResponse isApproved(@javax.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; return this; } @@ -225,11 +225,11 @@ public Boolean getIsApproved() { @JsonProperty(JSON_PROPERTY_IS_APPROVED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsApproved(Boolean isApproved) { + public void setIsApproved(@javax.annotation.Nullable Boolean isApproved) { this.isApproved = isApproved; } - public ApiAppResponse oauth(ApiAppResponseOAuth oauth) { + public ApiAppResponse oauth(@javax.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; return this; } @@ -247,11 +247,11 @@ public ApiAppResponseOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(ApiAppResponseOAuth oauth) { + public void setOauth(@javax.annotation.Nullable ApiAppResponseOAuth oauth) { this.oauth = oauth; } - public ApiAppResponse options(ApiAppResponseOptions options) { + public ApiAppResponse options(@javax.annotation.Nullable ApiAppResponseOptions options) { this.options = options; return this; } @@ -269,11 +269,12 @@ public ApiAppResponseOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(ApiAppResponseOptions options) { + public void setOptions(@javax.annotation.Nullable ApiAppResponseOptions options) { this.options = options; } - public ApiAppResponse ownerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public ApiAppResponse ownerAccount( + @javax.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; return this; } @@ -291,12 +292,13 @@ public ApiAppResponseOwnerAccount getOwnerAccount() { @JsonProperty(JSON_PROPERTY_OWNER_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOwnerAccount(ApiAppResponseOwnerAccount ownerAccount) { + public void setOwnerAccount( + @javax.annotation.Nullable ApiAppResponseOwnerAccount ownerAccount) { this.ownerAccount = ownerAccount; } public ApiAppResponse whiteLabelingOptions( - ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + @javax.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -314,7 +316,8 @@ public ApiAppResponseWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable ApiAppResponseWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java index 74ba41e86..2f9493ee7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java @@ -41,16 +41,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_SECRET = "secret"; - private String secret; + @javax.annotation.Nullable private String secret; public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; + @javax.annotation.Nullable private List scopes = null; public static final String JSON_PROPERTY_CHARGES_USERS = "charges_users"; - private Boolean chargesUsers; + @javax.annotation.Nullable private Boolean chargesUsers; public ApiAppResponseOAuth() {} @@ -68,7 +68,7 @@ public static ApiAppResponseOAuth init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppResponseOAuth.class); } - public ApiAppResponseOAuth callbackUrl(String callbackUrl) { + public ApiAppResponseOAuth callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -86,11 +86,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppResponseOAuth secret(String secret) { + public ApiAppResponseOAuth secret(@javax.annotation.Nullable String secret) { this.secret = secret; return this; } @@ -108,11 +108,11 @@ public String getSecret() { @JsonProperty(JSON_PROPERTY_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecret(String secret) { + public void setSecret(@javax.annotation.Nullable String secret) { this.secret = secret; } - public ApiAppResponseOAuth scopes(List scopes) { + public ApiAppResponseOAuth scopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -138,11 +138,11 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; } - public ApiAppResponseOAuth chargesUsers(Boolean chargesUsers) { + public ApiAppResponseOAuth chargesUsers(@javax.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; return this; } @@ -161,7 +161,7 @@ public Boolean getChargesUsers() { @JsonProperty(JSON_PROPERTY_CHARGES_USERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setChargesUsers(Boolean chargesUsers) { + public void setChargesUsers(@javax.annotation.Nullable Boolean chargesUsers) { this.chargesUsers = chargesUsers; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java index e2d672dda..911b248e2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere; + @javax.annotation.Nullable private Boolean canInsertEverywhere; public ApiAppResponseOptions() {} @@ -50,7 +50,8 @@ public static ApiAppResponseOptions init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), ApiAppResponseOptions.class); } - public ApiAppResponseOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public ApiAppResponseOptions canInsertEverywhere( + @javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -69,7 +70,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java index 7107a4329..85836bfe4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOwnerAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public ApiAppResponseOwnerAccount() {} @@ -57,7 +57,7 @@ public static ApiAppResponseOwnerAccount init(HashMap data) throws Exception { ApiAppResponseOwnerAccount.class); } - public ApiAppResponseOwnerAccount accountId(String accountId) { + public ApiAppResponseOwnerAccount accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -75,11 +75,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public ApiAppResponseOwnerAccount emailAddress(String emailAddress) { + public ApiAppResponseOwnerAccount emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -97,7 +97,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java index 6efd8fc40..3c244d725 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java @@ -46,52 +46,52 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor; + @javax.annotation.Nullable private String headerBackgroundColor; public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private String legalVersion; + @javax.annotation.Nullable private String legalVersion; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor; + @javax.annotation.Nullable private String linkColor; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor; + @javax.annotation.Nullable private String pageBackgroundColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor; + @javax.annotation.Nullable private String primaryButtonColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover; + @javax.annotation.Nullable private String primaryButtonColorHover; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor; + @javax.annotation.Nullable private String primaryButtonTextColor; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover; + @javax.annotation.Nullable private String primaryButtonTextColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor; + @javax.annotation.Nullable private String secondaryButtonColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover; + @javax.annotation.Nullable private String secondaryButtonColorHover; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor; + @javax.annotation.Nullable private String secondaryButtonTextColor; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover; + @javax.annotation.Nullable private String secondaryButtonTextColorHover; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1; + @javax.annotation.Nullable private String textColor1; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2; + @javax.annotation.Nullable private String textColor2; public ApiAppResponseWhiteLabelingOptions() {} @@ -111,7 +111,8 @@ public static ApiAppResponseWhiteLabelingOptions init(HashMap data) throws Excep ApiAppResponseWhiteLabelingOptions.class); } - public ApiAppResponseWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions headerBackgroundColor( + @javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -129,11 +130,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions legalVersion(String legalVersion) { + public ApiAppResponseWhiteLabelingOptions legalVersion( + @javax.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; return this; } @@ -151,11 +153,12 @@ public String getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(String legalVersion) { + public void setLegalVersion(@javax.annotation.Nullable String legalVersion) { this.legalVersion = legalVersion; } - public ApiAppResponseWhiteLabelingOptions linkColor(String linkColor) { + public ApiAppResponseWhiteLabelingOptions linkColor( + @javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -173,11 +176,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public ApiAppResponseWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public ApiAppResponseWhiteLabelingOptions pageBackgroundColor( + @javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -195,11 +199,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public ApiAppResponseWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions primaryButtonColor( + @javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -217,12 +222,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } public ApiAppResponseWhiteLabelingOptions primaryButtonColorHover( - String primaryButtonColorHover) { + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -240,12 +245,13 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } public ApiAppResponseWhiteLabelingOptions primaryButtonTextColor( - String primaryButtonTextColor) { + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -263,12 +269,13 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } public ApiAppResponseWhiteLabelingOptions primaryButtonTextColorHover( - String primaryButtonTextColorHover) { + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -286,11 +293,13 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public ApiAppResponseWhiteLabelingOptions secondaryButtonColor( + @javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -308,12 +317,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } public ApiAppResponseWhiteLabelingOptions secondaryButtonColorHover( - String secondaryButtonColorHover) { + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -331,12 +340,13 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColor( - String secondaryButtonTextColor) { + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -354,12 +364,13 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } public ApiAppResponseWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -377,11 +388,13 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover( + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public ApiAppResponseWhiteLabelingOptions textColor1(String textColor1) { + public ApiAppResponseWhiteLabelingOptions textColor1( + @javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -399,11 +412,12 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public ApiAppResponseWhiteLabelingOptions textColor2(String textColor2) { + public ApiAppResponseWhiteLabelingOptions textColor2( + @javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -421,7 +435,7 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java index 04b23fb36..32a2808af 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java @@ -42,25 +42,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppUpdateRequest { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; public static final String JSON_PROPERTY_CUSTOM_LOGO_FILE = "custom_logo_file"; - private File customLogoFile; + @javax.annotation.Nullable private File customLogoFile; public static final String JSON_PROPERTY_DOMAINS = "domains"; - private List domains = null; + @javax.annotation.Nullable private List domains = null; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_OAUTH = "oauth"; - private SubOAuth oauth; + @javax.annotation.Nullable private SubOAuth oauth; public static final String JSON_PROPERTY_OPTIONS = "options"; - private SubOptions options; + @javax.annotation.Nullable private SubOptions options; public static final String JSON_PROPERTY_WHITE_LABELING_OPTIONS = "white_labeling_options"; - private SubWhiteLabelingOptions whiteLabelingOptions; + @javax.annotation.Nullable private SubWhiteLabelingOptions whiteLabelingOptions; public ApiAppUpdateRequest() {} @@ -78,7 +78,7 @@ public static ApiAppUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ApiAppUpdateRequest.class); } - public ApiAppUpdateRequest callbackUrl(String callbackUrl) { + public ApiAppUpdateRequest callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -96,11 +96,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public ApiAppUpdateRequest customLogoFile(File customLogoFile) { + public ApiAppUpdateRequest customLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; return this; } @@ -118,11 +118,11 @@ public File getCustomLogoFile() { @JsonProperty(JSON_PROPERTY_CUSTOM_LOGO_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomLogoFile(File customLogoFile) { + public void setCustomLogoFile(@javax.annotation.Nullable File customLogoFile) { this.customLogoFile = customLogoFile; } - public ApiAppUpdateRequest domains(List domains) { + public ApiAppUpdateRequest domains(@javax.annotation.Nullable List domains) { this.domains = domains; return this; } @@ -148,11 +148,11 @@ public List getDomains() { @JsonProperty(JSON_PROPERTY_DOMAINS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDomains(List domains) { + public void setDomains(@javax.annotation.Nullable List domains) { this.domains = domains; } - public ApiAppUpdateRequest name(String name) { + public ApiAppUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -170,11 +170,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public ApiAppUpdateRequest oauth(SubOAuth oauth) { + public ApiAppUpdateRequest oauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; return this; } @@ -192,11 +192,11 @@ public SubOAuth getOauth() { @JsonProperty(JSON_PROPERTY_OAUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOauth(SubOAuth oauth) { + public void setOauth(@javax.annotation.Nullable SubOAuth oauth) { this.oauth = oauth; } - public ApiAppUpdateRequest options(SubOptions options) { + public ApiAppUpdateRequest options(@javax.annotation.Nullable SubOptions options) { this.options = options; return this; } @@ -214,11 +214,12 @@ public SubOptions getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOptions(SubOptions options) { + public void setOptions(@javax.annotation.Nullable SubOptions options) { this.options = options; } - public ApiAppUpdateRequest whiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public ApiAppUpdateRequest whiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; return this; } @@ -236,7 +237,8 @@ public SubWhiteLabelingOptions getWhiteLabelingOptions() { @JsonProperty(JSON_PROPERTY_WHITE_LABELING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWhiteLabelingOptions(SubWhiteLabelingOptions whiteLabelingOptions) { + public void setWhiteLabelingOptions( + @javax.annotation.Nullable SubWhiteLabelingOptions whiteLabelingOptions) { this.whiteLabelingOptions = whiteLabelingOptions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java index 27b8be9e6..c9c00b4bc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java @@ -38,16 +38,18 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; + @javax.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + + @javax.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobGetResponse() {} @@ -66,7 +68,8 @@ public static BulkSendJobGetResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobGetResponse.class); } - public BulkSendJobGetResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobGetResponse bulkSendJob( + @javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -85,11 +88,11 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobGetResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobGetResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -108,12 +111,13 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } public BulkSendJobGetResponse signatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull + List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -142,11 +146,13 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setSignatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull + List signatureRequests) { this.signatureRequests = signatureRequests; } - public BulkSendJobGetResponse warnings(List warnings) { + public BulkSendJobGetResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -172,7 +178,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java index d96001b5c..770ac450d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java @@ -59,79 +59,80 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponseSignatureRequests { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; + @javax.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; + @javax.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; + @javax.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; + @javax.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; + @javax.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; + @javax.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; + @javax.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; + @javax.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public BulkSendJobGetResponseSignatureRequests() {} @@ -152,7 +153,8 @@ public static BulkSendJobGetResponseSignatureRequests init(HashMap data) throws BulkSendJobGetResponseSignatureRequests.class); } - public BulkSendJobGetResponseSignatureRequests testMode(Boolean testMode) { + public BulkSendJobGetResponseSignatureRequests testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -171,11 +173,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public BulkSendJobGetResponseSignatureRequests signatureRequestId(String signatureRequestId) { + public BulkSendJobGetResponseSignatureRequests signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -193,12 +196,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } public BulkSendJobGetResponseSignatureRequests requesterEmailAddress( - String requesterEmailAddress) { + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -216,11 +219,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public BulkSendJobGetResponseSignatureRequests title(String title) { + public BulkSendJobGetResponseSignatureRequests title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -238,11 +241,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public BulkSendJobGetResponseSignatureRequests originalTitle(String originalTitle) { + public BulkSendJobGetResponseSignatureRequests originalTitle( + @javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -260,11 +264,12 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public BulkSendJobGetResponseSignatureRequests subject(String subject) { + public BulkSendJobGetResponseSignatureRequests subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -282,11 +287,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public BulkSendJobGetResponseSignatureRequests message(String message) { + public BulkSendJobGetResponseSignatureRequests message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -304,11 +310,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public BulkSendJobGetResponseSignatureRequests metadata(Map metadata) { + public BulkSendJobGetResponseSignatureRequests metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -335,11 +342,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public BulkSendJobGetResponseSignatureRequests createdAt(Integer createdAt) { + public BulkSendJobGetResponseSignatureRequests createdAt( + @javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -357,11 +365,12 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public BulkSendJobGetResponseSignatureRequests expiresAt(Integer expiresAt) { + public BulkSendJobGetResponseSignatureRequests expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -381,11 +390,12 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public BulkSendJobGetResponseSignatureRequests isComplete(Boolean isComplete) { + public BulkSendJobGetResponseSignatureRequests isComplete( + @javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -403,11 +413,12 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public BulkSendJobGetResponseSignatureRequests isDeclined(Boolean isDeclined) { + public BulkSendJobGetResponseSignatureRequests isDeclined( + @javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -425,11 +436,12 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public BulkSendJobGetResponseSignatureRequests hasError(Boolean hasError) { + public BulkSendJobGetResponseSignatureRequests hasError( + @javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -448,11 +460,12 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public BulkSendJobGetResponseSignatureRequests filesUrl(String filesUrl) { + public BulkSendJobGetResponseSignatureRequests filesUrl( + @javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -470,11 +483,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public BulkSendJobGetResponseSignatureRequests signingUrl(String signingUrl) { + public BulkSendJobGetResponseSignatureRequests signingUrl( + @javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -494,11 +508,12 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public BulkSendJobGetResponseSignatureRequests detailsUrl(String detailsUrl) { + public BulkSendJobGetResponseSignatureRequests detailsUrl( + @javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -517,11 +532,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public BulkSendJobGetResponseSignatureRequests ccEmailAddresses(List ccEmailAddresses) { + public BulkSendJobGetResponseSignatureRequests ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -549,11 +565,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public BulkSendJobGetResponseSignatureRequests signingRedirectUrl(String signingRedirectUrl) { + public BulkSendJobGetResponseSignatureRequests signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -571,11 +588,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public BulkSendJobGetResponseSignatureRequests finalCopyUri(String finalCopyUri) { + public BulkSendJobGetResponseSignatureRequests finalCopyUri( + @javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -593,11 +611,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public BulkSendJobGetResponseSignatureRequests templateIds(List templateIds) { + public BulkSendJobGetResponseSignatureRequests templateIds( + @javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -623,12 +642,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; } public BulkSendJobGetResponseSignatureRequests customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -657,12 +676,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public BulkSendJobGetResponseSignatureRequests attachments( - List attachments) { + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -689,12 +709,13 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } public BulkSendJobGetResponseSignatureRequests responseData( - List responseData) { + @javax.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -722,12 +743,13 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData( + @javax.annotation.Nullable List responseData) { this.responseData = responseData; } public BulkSendJobGetResponseSignatureRequests signatures( - List signatures) { + @javax.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -754,11 +776,13 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures( + @javax.annotation.Nullable List signatures) { this.signatures = signatures; } - public BulkSendJobGetResponseSignatureRequests bulkSendJobId(String bulkSendJobId) { + public BulkSendJobGetResponseSignatureRequests bulkSendJobId( + @javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -776,7 +800,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java index 3f4c641a5..d30b8eed5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobListResponse { public static final String JSON_PROPERTY_BULK_SEND_JOBS = "bulk_send_jobs"; - private List bulkSendJobs = new ArrayList<>(); + @javax.annotation.Nonnull private List bulkSendJobs = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobListResponse() {} @@ -62,7 +62,8 @@ public static BulkSendJobListResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobListResponse.class); } - public BulkSendJobListResponse bulkSendJobs(List bulkSendJobs) { + public BulkSendJobListResponse bulkSendJobs( + @javax.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; return this; } @@ -89,11 +90,11 @@ public List getBulkSendJobs() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOBS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJobs(List bulkSendJobs) { + public void setBulkSendJobs(@javax.annotation.Nonnull List bulkSendJobs) { this.bulkSendJobs = bulkSendJobs; } - public BulkSendJobListResponse listInfo(ListInfoResponse listInfo) { + public BulkSendJobListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -112,11 +113,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public BulkSendJobListResponse warnings(List warnings) { + public BulkSendJobListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -142,7 +144,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java index bc366fdce..1e27b3600 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java @@ -39,16 +39,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public static final String JSON_PROPERTY_TOTAL = "total"; - private Integer total; + @javax.annotation.Nullable private Integer total; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; + @javax.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public BulkSendJobResponse() {} @@ -66,7 +66,7 @@ public static BulkSendJobResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), BulkSendJobResponse.class); } - public BulkSendJobResponse bulkSendJobId(String bulkSendJobId) { + public BulkSendJobResponse bulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -84,11 +84,11 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } - public BulkSendJobResponse total(Integer total) { + public BulkSendJobResponse total(@javax.annotation.Nullable Integer total) { this.total = total; return this; } @@ -106,11 +106,11 @@ public Integer getTotal() { @JsonProperty(JSON_PROPERTY_TOTAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTotal(Integer total) { + public void setTotal(@javax.annotation.Nullable Integer total) { this.total = total; } - public BulkSendJobResponse isCreator(Boolean isCreator) { + public BulkSendJobResponse isCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -129,11 +129,11 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public BulkSendJobResponse createdAt(Integer createdAt) { + public BulkSendJobResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -151,7 +151,7 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java index 38e273f63..fe37ac6d1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobSendResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; - private BulkSendJobResponse bulkSendJob; + @javax.annotation.Nonnull private BulkSendJobResponse bulkSendJob; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public BulkSendJobSendResponse() {} @@ -58,7 +58,8 @@ public static BulkSendJobSendResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), BulkSendJobSendResponse.class); } - public BulkSendJobSendResponse bulkSendJob(BulkSendJobResponse bulkSendJob) { + public BulkSendJobSendResponse bulkSendJob( + @javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; return this; } @@ -77,11 +78,12 @@ public BulkSendJobResponse getBulkSendJob() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBulkSendJob(BulkSendJobResponse bulkSendJob) { + public void setBulkSendJob(@javax.annotation.Nonnull BulkSendJobResponse bulkSendJob) { this.bulkSendJob = bulkSendJob; } - public BulkSendJobSendResponse warnings(List warnings) { + public BulkSendJobSendResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java index 1494bf469..74b68937b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java @@ -44,34 +44,34 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlRequest { public static final String JSON_PROPERTY_ALLOW_EDIT_CCS = "allow_edit_ccs"; - private Boolean allowEditCcs = false; + @javax.annotation.Nullable private Boolean allowEditCcs = false; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; + @javax.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public EmbeddedEditUrlRequest() {} @@ -90,7 +90,7 @@ public static EmbeddedEditUrlRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlRequest.class); } - public EmbeddedEditUrlRequest allowEditCcs(Boolean allowEditCcs) { + public EmbeddedEditUrlRequest allowEditCcs(@javax.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; return this; } @@ -109,11 +109,11 @@ public Boolean getAllowEditCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditCcs(Boolean allowEditCcs) { + public void setAllowEditCcs(@javax.annotation.Nullable Boolean allowEditCcs) { this.allowEditCcs = allowEditCcs; } - public EmbeddedEditUrlRequest ccRoles(List ccRoles) { + public EmbeddedEditUrlRequest ccRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -140,11 +140,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public EmbeddedEditUrlRequest editorOptions(SubEditorOptions editorOptions) { + public EmbeddedEditUrlRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -162,11 +163,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public EmbeddedEditUrlRequest forceSignerRoles(Boolean forceSignerRoles) { + public EmbeddedEditUrlRequest forceSignerRoles( + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -184,11 +186,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public EmbeddedEditUrlRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public EmbeddedEditUrlRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -206,11 +209,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public EmbeddedEditUrlRequest mergeFields(List mergeFields) { + public EmbeddedEditUrlRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -238,11 +242,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public EmbeddedEditUrlRequest previewOnly(Boolean previewOnly) { + public EmbeddedEditUrlRequest previewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -262,11 +266,11 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } - public EmbeddedEditUrlRequest showPreview(Boolean showPreview) { + public EmbeddedEditUrlRequest showPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -284,11 +288,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public EmbeddedEditUrlRequest showProgressStepper(Boolean showProgressStepper) { + public EmbeddedEditUrlRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -307,11 +312,11 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public EmbeddedEditUrlRequest testMode(Boolean testMode) { + public EmbeddedEditUrlRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -330,7 +335,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java index a16cac937..acb587506 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedEditUrlResponseEmbedded embedded; + @javax.annotation.Nonnull private EmbeddedEditUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public EmbeddedEditUrlResponse() {} @@ -58,7 +58,8 @@ public static EmbeddedEditUrlResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedEditUrlResponse.class); } - public EmbeddedEditUrlResponse embedded(EmbeddedEditUrlResponseEmbedded embedded) { + public EmbeddedEditUrlResponse embedded( + @javax.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -77,11 +78,12 @@ public EmbeddedEditUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedEditUrlResponseEmbedded embedded) { + public void setEmbedded(@javax.annotation.Nonnull EmbeddedEditUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedEditUrlResponse warnings(List warnings) { + public EmbeddedEditUrlResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java index 7ce01e5f1..440ff0b90 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponseEmbedded { public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; + @javax.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public EmbeddedEditUrlResponseEmbedded() {} @@ -57,7 +57,7 @@ public static EmbeddedEditUrlResponseEmbedded init(HashMap data) throws Exceptio EmbeddedEditUrlResponseEmbedded.class); } - public EmbeddedEditUrlResponseEmbedded editUrl(String editUrl) { + public EmbeddedEditUrlResponseEmbedded editUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -75,11 +75,11 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public EmbeddedEditUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedEditUrlResponseEmbedded expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -97,7 +97,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java index 7e34d2d2d..9b0e926ec 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; - private EmbeddedSignUrlResponseEmbedded embedded; + @javax.annotation.Nonnull private EmbeddedSignUrlResponseEmbedded embedded; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public EmbeddedSignUrlResponse() {} @@ -58,7 +58,8 @@ public static EmbeddedSignUrlResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), EmbeddedSignUrlResponse.class); } - public EmbeddedSignUrlResponse embedded(EmbeddedSignUrlResponseEmbedded embedded) { + public EmbeddedSignUrlResponse embedded( + @javax.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; return this; } @@ -77,11 +78,12 @@ public EmbeddedSignUrlResponseEmbedded getEmbedded() { @JsonProperty(JSON_PROPERTY_EMBEDDED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmbedded(EmbeddedSignUrlResponseEmbedded embedded) { + public void setEmbedded(@javax.annotation.Nonnull EmbeddedSignUrlResponseEmbedded embedded) { this.embedded = embedded; } - public EmbeddedSignUrlResponse warnings(List warnings) { + public EmbeddedSignUrlResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java index 716bd324d..0a9da321d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponseEmbedded { public static final String JSON_PROPERTY_SIGN_URL = "sign_url"; - private String signUrl; + @javax.annotation.Nullable private String signUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public EmbeddedSignUrlResponseEmbedded() {} @@ -57,7 +57,7 @@ public static EmbeddedSignUrlResponseEmbedded init(HashMap data) throws Exceptio EmbeddedSignUrlResponseEmbedded.class); } - public EmbeddedSignUrlResponseEmbedded signUrl(String signUrl) { + public EmbeddedSignUrlResponseEmbedded signUrl(@javax.annotation.Nullable String signUrl) { this.signUrl = signUrl; return this; } @@ -75,11 +75,11 @@ public String getSignUrl() { @JsonProperty(JSON_PROPERTY_SIGN_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignUrl(String signUrl) { + public void setSignUrl(@javax.annotation.Nullable String signUrl) { this.signUrl = signUrl; } - public EmbeddedSignUrlResponseEmbedded expiresAt(Integer expiresAt) { + public EmbeddedSignUrlResponseEmbedded expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -97,7 +97,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java index 0536233e0..97f61b196 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponse { public static final String JSON_PROPERTY_ERROR = "error"; - private ErrorResponseError error; + @javax.annotation.Nonnull private ErrorResponseError error; public ErrorResponse() {} @@ -49,7 +49,7 @@ public static ErrorResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponse.class); } - public ErrorResponse error(ErrorResponseError error) { + public ErrorResponse error(@javax.annotation.Nonnull ErrorResponseError error) { this.error = error; return this; } @@ -68,7 +68,7 @@ public ErrorResponseError getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setError(ErrorResponseError error) { + public void setError(@javax.annotation.Nonnull ErrorResponseError error) { this.error = error; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index 613016529..a7d4159f8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponseError { public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; - private String errorMsg; + @javax.annotation.Nonnull private String errorMsg; public static final String JSON_PROPERTY_ERROR_NAME = "error_name"; - private String errorName; + @javax.annotation.Nonnull private String errorName; public static final String JSON_PROPERTY_ERROR_PATH = "error_path"; - private String errorPath; + @javax.annotation.Nullable private String errorPath; public ErrorResponseError() {} @@ -59,7 +59,7 @@ public static ErrorResponseError init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ErrorResponseError.class); } - public ErrorResponseError errorMsg(String errorMsg) { + public ErrorResponseError errorMsg(@javax.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; return this; } @@ -78,11 +78,11 @@ public String getErrorMsg() { @JsonProperty(JSON_PROPERTY_ERROR_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorMsg(String errorMsg) { + public void setErrorMsg(@javax.annotation.Nonnull String errorMsg) { this.errorMsg = errorMsg; } - public ErrorResponseError errorName(String errorName) { + public ErrorResponseError errorName(@javax.annotation.Nonnull String errorName) { this.errorName = errorName; return this; } @@ -101,11 +101,11 @@ public String getErrorName() { @JsonProperty(JSON_PROPERTY_ERROR_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setErrorName(String errorName) { + public void setErrorName(@javax.annotation.Nonnull String errorName) { this.errorName = errorName; } - public ErrorResponseError errorPath(String errorPath) { + public ErrorResponseError errorPath(@javax.annotation.Nullable String errorPath) { this.errorPath = errorPath; return this; } @@ -123,7 +123,7 @@ public String getErrorPath() { @JsonProperty(JSON_PROPERTY_ERROR_PATH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setErrorPath(String errorPath) { + public void setErrorPath(@javax.annotation.Nullable String errorPath) { this.errorPath = errorPath; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java index 54c98461f..f54dcee41 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequest { public static final String JSON_PROPERTY_EVENT = "event"; - private EventCallbackRequestEvent event; + @javax.annotation.Nonnull private EventCallbackRequestEvent event; public static final String JSON_PROPERTY_ACCOUNT = "account"; - private AccountResponse account; + @javax.annotation.Nullable private AccountResponse account; public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; + @javax.annotation.Nullable private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; + @javax.annotation.Nullable private TemplateResponse template; public EventCallbackRequest() {} @@ -63,7 +63,7 @@ public static EventCallbackRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), EventCallbackRequest.class); } - public EventCallbackRequest event(EventCallbackRequestEvent event) { + public EventCallbackRequest event(@javax.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; return this; } @@ -82,11 +82,11 @@ public EventCallbackRequestEvent getEvent() { @JsonProperty(JSON_PROPERTY_EVENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEvent(EventCallbackRequestEvent event) { + public void setEvent(@javax.annotation.Nonnull EventCallbackRequestEvent event) { this.event = event; } - public EventCallbackRequest account(AccountResponse account) { + public EventCallbackRequest account(@javax.annotation.Nullable AccountResponse account) { this.account = account; return this; } @@ -104,11 +104,12 @@ public AccountResponse getAccount() { @JsonProperty(JSON_PROPERTY_ACCOUNT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccount(AccountResponse account) { + public void setAccount(@javax.annotation.Nullable AccountResponse account) { this.account = account; } - public EventCallbackRequest signatureRequest(SignatureRequestResponse signatureRequest) { + public EventCallbackRequest signatureRequest( + @javax.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -126,11 +127,12 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest( + @javax.annotation.Nullable SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public EventCallbackRequest template(TemplateResponse template) { + public EventCallbackRequest template(@javax.annotation.Nullable TemplateResponse template) { this.template = template; return this; } @@ -148,7 +150,7 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@javax.annotation.Nullable TemplateResponse template) { this.template = template; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java index a7462562f..45ac7f7e9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java @@ -38,55 +38,55 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEvent { public static final String JSON_PROPERTY_EVENT_TIME = "event_time"; - private String eventTime; + @javax.annotation.Nonnull private String eventTime; /** Type of callback event that was triggered. */ public enum EventTypeEnum { - ACCOUNT_CONFIRMED("account_confirmed"), + ACCOUNT_CONFIRMED(String.valueOf("account_confirmed")), - UNKNOWN_ERROR("unknown_error"), + UNKNOWN_ERROR(String.valueOf("unknown_error")), - FILE_ERROR("file_error"), + FILE_ERROR(String.valueOf("file_error")), - SIGN_URL_INVALID("sign_url_invalid"), + SIGN_URL_INVALID(String.valueOf("sign_url_invalid")), - SIGNATURE_REQUEST_VIEWED("signature_request_viewed"), + SIGNATURE_REQUEST_VIEWED(String.valueOf("signature_request_viewed")), - SIGNATURE_REQUEST_SIGNED("signature_request_signed"), + SIGNATURE_REQUEST_SIGNED(String.valueOf("signature_request_signed")), - SIGNATURE_REQUEST_SENT("signature_request_sent"), + SIGNATURE_REQUEST_SENT(String.valueOf("signature_request_sent")), - SIGNATURE_REQUEST_ALL_SIGNED("signature_request_all_signed"), + SIGNATURE_REQUEST_ALL_SIGNED(String.valueOf("signature_request_all_signed")), - SIGNATURE_REQUEST_EMAIL_BOUNCE("signature_request_email_bounce"), + SIGNATURE_REQUEST_EMAIL_BOUNCE(String.valueOf("signature_request_email_bounce")), - SIGNATURE_REQUEST_REMIND("signature_request_remind"), + SIGNATURE_REQUEST_REMIND(String.valueOf("signature_request_remind")), - SIGNATURE_REQUEST_INCOMPLETE_QES("signature_request_incomplete_qes"), + SIGNATURE_REQUEST_INCOMPLETE_QES(String.valueOf("signature_request_incomplete_qes")), - SIGNATURE_REQUEST_DESTROYED("signature_request_destroyed"), + SIGNATURE_REQUEST_DESTROYED(String.valueOf("signature_request_destroyed")), - SIGNATURE_REQUEST_CANCELED("signature_request_canceled"), + SIGNATURE_REQUEST_CANCELED(String.valueOf("signature_request_canceled")), - SIGNATURE_REQUEST_DOWNLOADABLE("signature_request_downloadable"), + SIGNATURE_REQUEST_DOWNLOADABLE(String.valueOf("signature_request_downloadable")), - SIGNATURE_REQUEST_DECLINED("signature_request_declined"), + SIGNATURE_REQUEST_DECLINED(String.valueOf("signature_request_declined")), - SIGNATURE_REQUEST_REASSIGNED("signature_request_reassigned"), + SIGNATURE_REQUEST_REASSIGNED(String.valueOf("signature_request_reassigned")), - SIGNATURE_REQUEST_INVALID("signature_request_invalid"), + SIGNATURE_REQUEST_INVALID(String.valueOf("signature_request_invalid")), - SIGNATURE_REQUEST_PREPARED("signature_request_prepared"), + SIGNATURE_REQUEST_PREPARED(String.valueOf("signature_request_prepared")), - SIGNATURE_REQUEST_EXPIRED("signature_request_expired"), + SIGNATURE_REQUEST_EXPIRED(String.valueOf("signature_request_expired")), - TEMPLATE_CREATED("template_created"), + TEMPLATE_CREATED(String.valueOf("template_created")), - TEMPLATE_ERROR("template_error"), + TEMPLATE_ERROR(String.valueOf("template_error")), - CALLBACK_TEST("callback_test"), + CALLBACK_TEST(String.valueOf("callback_test")), - SIGNATURE_REQUEST_SIGNER_REMOVED("signature_request_signer_removed"); + SIGNATURE_REQUEST_SIGNER_REMOVED(String.valueOf("signature_request_signer_removed")); private String value; @@ -116,13 +116,13 @@ public static EventTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; - private EventTypeEnum eventType; + @javax.annotation.Nonnull private EventTypeEnum eventType; public static final String JSON_PROPERTY_EVENT_HASH = "event_hash"; - private String eventHash; + @javax.annotation.Nonnull private String eventHash; public static final String JSON_PROPERTY_EVENT_METADATA = "event_metadata"; - private EventCallbackRequestEventMetadata eventMetadata; + @javax.annotation.Nullable private EventCallbackRequestEventMetadata eventMetadata; public EventCallbackRequestEvent() {} @@ -142,7 +142,7 @@ public static EventCallbackRequestEvent init(HashMap data) throws Exception { EventCallbackRequestEvent.class); } - public EventCallbackRequestEvent eventTime(String eventTime) { + public EventCallbackRequestEvent eventTime(@javax.annotation.Nonnull String eventTime) { this.eventTime = eventTime; return this; } @@ -161,11 +161,11 @@ public String getEventTime() { @JsonProperty(JSON_PROPERTY_EVENT_TIME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventTime(String eventTime) { + public void setEventTime(@javax.annotation.Nonnull String eventTime) { this.eventTime = eventTime; } - public EventCallbackRequestEvent eventType(EventTypeEnum eventType) { + public EventCallbackRequestEvent eventType(@javax.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; return this; } @@ -184,11 +184,11 @@ public EventTypeEnum getEventType() { @JsonProperty(JSON_PROPERTY_EVENT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventType(EventTypeEnum eventType) { + public void setEventType(@javax.annotation.Nonnull EventTypeEnum eventType) { this.eventType = eventType; } - public EventCallbackRequestEvent eventHash(String eventHash) { + public EventCallbackRequestEvent eventHash(@javax.annotation.Nonnull String eventHash) { this.eventHash = eventHash; return this; } @@ -207,12 +207,12 @@ public String getEventHash() { @JsonProperty(JSON_PROPERTY_EVENT_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEventHash(String eventHash) { + public void setEventHash(@javax.annotation.Nonnull String eventHash) { this.eventHash = eventHash; } public EventCallbackRequestEvent eventMetadata( - EventCallbackRequestEventMetadata eventMetadata) { + @javax.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; return this; } @@ -230,7 +230,8 @@ public EventCallbackRequestEventMetadata getEventMetadata() { @JsonProperty(JSON_PROPERTY_EVENT_METADATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMetadata(EventCallbackRequestEventMetadata eventMetadata) { + public void setEventMetadata( + @javax.annotation.Nullable EventCallbackRequestEventMetadata eventMetadata) { this.eventMetadata = eventMetadata; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java index e92975e77..4cd66b3b7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEventMetadata { public static final String JSON_PROPERTY_RELATED_SIGNATURE_ID = "related_signature_id"; - private String relatedSignatureId; + @javax.annotation.Nullable private String relatedSignatureId; public static final String JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID = "reported_for_account_id"; - private String reportedForAccountId; + @javax.annotation.Nullable private String reportedForAccountId; public static final String JSON_PROPERTY_REPORTED_FOR_APP_ID = "reported_for_app_id"; - private String reportedForAppId; + @javax.annotation.Nullable private String reportedForAppId; public static final String JSON_PROPERTY_EVENT_MESSAGE = "event_message"; - private String eventMessage; + @javax.annotation.Nullable private String eventMessage; public EventCallbackRequestEventMetadata() {} @@ -65,7 +65,8 @@ public static EventCallbackRequestEventMetadata init(HashMap data) throws Except EventCallbackRequestEventMetadata.class); } - public EventCallbackRequestEventMetadata relatedSignatureId(String relatedSignatureId) { + public EventCallbackRequestEventMetadata relatedSignatureId( + @javax.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; return this; } @@ -84,11 +85,12 @@ public String getRelatedSignatureId() { @JsonProperty(JSON_PROPERTY_RELATED_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRelatedSignatureId(String relatedSignatureId) { + public void setRelatedSignatureId(@javax.annotation.Nullable String relatedSignatureId) { this.relatedSignatureId = relatedSignatureId; } - public EventCallbackRequestEventMetadata reportedForAccountId(String reportedForAccountId) { + public EventCallbackRequestEventMetadata reportedForAccountId( + @javax.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; return this; } @@ -106,11 +108,12 @@ public String getReportedForAccountId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAccountId(String reportedForAccountId) { + public void setReportedForAccountId(@javax.annotation.Nullable String reportedForAccountId) { this.reportedForAccountId = reportedForAccountId; } - public EventCallbackRequestEventMetadata reportedForAppId(String reportedForAppId) { + public EventCallbackRequestEventMetadata reportedForAppId( + @javax.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; return this; } @@ -128,11 +131,12 @@ public String getReportedForAppId() { @JsonProperty(JSON_PROPERTY_REPORTED_FOR_APP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportedForAppId(String reportedForAppId) { + public void setReportedForAppId(@javax.annotation.Nullable String reportedForAppId) { this.reportedForAppId = reportedForAppId; } - public EventCallbackRequestEventMetadata eventMessage(String eventMessage) { + public EventCallbackRequestEventMetadata eventMessage( + @javax.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; return this; } @@ -150,7 +154,7 @@ public String getEventMessage() { @JsonProperty(JSON_PROPERTY_EVENT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEventMessage(String eventMessage) { + public void setEventMessage(@javax.annotation.Nullable String eventMessage) { this.eventMessage = eventMessage; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java index c4f86dd50..16faa1949 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -33,10 +33,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxGetResponse { public static final String JSON_PROPERTY_FAX = "fax"; - private FaxResponse fax; + @javax.annotation.Nonnull private FaxResponse fax; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public FaxGetResponse() {} @@ -54,7 +54,7 @@ public static FaxGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxGetResponse.class); } - public FaxGetResponse fax(FaxResponse fax) { + public FaxGetResponse fax(@javax.annotation.Nonnull FaxResponse fax) { this.fax = fax; return this; } @@ -73,11 +73,11 @@ public FaxResponse getFax() { @JsonProperty(JSON_PROPERTY_FAX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFax(FaxResponse fax) { + public void setFax(@javax.annotation.Nonnull FaxResponse fax) { this.fax = fax; } - public FaxGetResponse warnings(List warnings) { + public FaxGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -103,7 +103,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java index d86167c2e..2bc7393da 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAddUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public FaxLineAddUserRequest() {} @@ -60,7 +60,7 @@ public static FaxLineAddUserRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxLineAddUserRequest.class); } - public FaxLineAddUserRequest number(String number) { + public FaxLineAddUserRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } @@ -79,11 +79,11 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } - public FaxLineAddUserRequest accountId(String accountId) { + public FaxLineAddUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -101,11 +101,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineAddUserRequest emailAddress(String emailAddress) { + public FaxLineAddUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -123,7 +123,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java index 54674a76b..138d78b20 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -33,7 +33,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAreaCodeGetResponse { public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; - private List areaCodes = new ArrayList<>(); + @javax.annotation.Nonnull private List areaCodes = new ArrayList<>(); public FaxLineAreaCodeGetResponse() {} @@ -53,7 +53,7 @@ public static FaxLineAreaCodeGetResponse init(HashMap data) throws Exception { FaxLineAreaCodeGetResponse.class); } - public FaxLineAreaCodeGetResponse areaCodes(List areaCodes) { + public FaxLineAreaCodeGetResponse areaCodes(@javax.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; return this; } @@ -80,7 +80,7 @@ public List getAreaCodes() { @JsonProperty(JSON_PROPERTY_AREA_CODES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCodes(List areaCodes) { + public void setAreaCodes(@javax.annotation.Nonnull List areaCodes) { this.areaCodes = areaCodes; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java index e75ea0d36..f2eb940ce 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -38,15 +38,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineCreateRequest { public static final String JSON_PROPERTY_AREA_CODE = "area_code"; - private Integer areaCode; + @javax.annotation.Nonnull private Integer areaCode; /** Country of the area code */ public enum CountryEnum { - CA("CA"), + CA(String.valueOf("CA")), - US("US"), + US(String.valueOf("US")), - UK("UK"); + UK(String.valueOf("UK")); private String value; @@ -76,13 +76,13 @@ public static CountryEnum fromValue(String value) { } public static final String JSON_PROPERTY_COUNTRY = "country"; - private CountryEnum country; + @javax.annotation.Nonnull private CountryEnum country; public static final String JSON_PROPERTY_CITY = "city"; - private String city; + @javax.annotation.Nullable private String city; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public FaxLineCreateRequest() {} @@ -100,7 +100,7 @@ public static FaxLineCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineCreateRequest.class); } - public FaxLineCreateRequest areaCode(Integer areaCode) { + public FaxLineCreateRequest areaCode(@javax.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; return this; } @@ -119,11 +119,11 @@ public Integer getAreaCode() { @JsonProperty(JSON_PROPERTY_AREA_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAreaCode(Integer areaCode) { + public void setAreaCode(@javax.annotation.Nonnull Integer areaCode) { this.areaCode = areaCode; } - public FaxLineCreateRequest country(CountryEnum country) { + public FaxLineCreateRequest country(@javax.annotation.Nonnull CountryEnum country) { this.country = country; return this; } @@ -142,11 +142,11 @@ public CountryEnum getCountry() { @JsonProperty(JSON_PROPERTY_COUNTRY) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCountry(CountryEnum country) { + public void setCountry(@javax.annotation.Nonnull CountryEnum country) { this.country = country; } - public FaxLineCreateRequest city(String city) { + public FaxLineCreateRequest city(@javax.annotation.Nullable String city) { this.city = city; return this; } @@ -164,11 +164,11 @@ public String getCity() { @JsonProperty(JSON_PROPERTY_CITY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCity(String city) { + public void setCity(@javax.annotation.Nullable String city) { this.city = city; } - public FaxLineCreateRequest accountId(String accountId) { + public FaxLineCreateRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -186,7 +186,7 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java index efd21bff3..c47676161 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineDeleteRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public FaxLineDeleteRequest() {} @@ -49,7 +49,7 @@ public static FaxLineDeleteRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineDeleteRequest.class); } - public FaxLineDeleteRequest number(String number) { + public FaxLineDeleteRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } @@ -68,7 +68,7 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java index 9ad984747..02501b6ff 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineListResponse { public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_FAX_LINES = "fax_lines"; - private List faxLines = new ArrayList<>(); + @javax.annotation.Nonnull private List faxLines = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; + @javax.annotation.Nullable private WarningResponse warnings; public FaxLineListResponse() {} @@ -61,7 +61,7 @@ public static FaxLineListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineListResponse.class); } - public FaxLineListResponse listInfo(ListInfoResponse listInfo) { + public FaxLineListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -80,11 +80,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public FaxLineListResponse faxLines(List faxLines) { + public FaxLineListResponse faxLines( + @javax.annotation.Nonnull List faxLines) { this.faxLines = faxLines; return this; } @@ -111,11 +112,11 @@ public List getFaxLines() { @JsonProperty(JSON_PROPERTY_FAX_LINES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLines(List faxLines) { + public void setFaxLines(@javax.annotation.Nonnull List faxLines) { this.faxLines = faxLines; } - public FaxLineListResponse warnings(WarningResponse warnings) { + public FaxLineListResponse warnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -133,7 +134,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java index 14d15e0bd..cbdb91d20 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineRemoveUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nonnull private String number; public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public FaxLineRemoveUserRequest() {} @@ -61,7 +61,7 @@ public static FaxLineRemoveUserRequest init(HashMap data) throws Exception { FaxLineRemoveUserRequest.class); } - public FaxLineRemoveUserRequest number(String number) { + public FaxLineRemoveUserRequest number(@javax.annotation.Nonnull String number) { this.number = number; return this; } @@ -80,11 +80,11 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nonnull String number) { this.number = number; } - public FaxLineRemoveUserRequest accountId(String accountId) { + public FaxLineRemoveUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -102,11 +102,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public FaxLineRemoveUserRequest emailAddress(String emailAddress) { + public FaxLineRemoveUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -124,7 +124,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java index 24837c26f..aca241687 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -31,10 +31,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponse { public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; - private FaxLineResponseFaxLine faxLine; + @javax.annotation.Nonnull private FaxLineResponseFaxLine faxLine; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private WarningResponse warnings; + @javax.annotation.Nullable private WarningResponse warnings; public FaxLineResponse() {} @@ -52,7 +52,7 @@ public static FaxLineResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxLineResponse.class); } - public FaxLineResponse faxLine(FaxLineResponseFaxLine faxLine) { + public FaxLineResponse faxLine(@javax.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; return this; } @@ -71,11 +71,11 @@ public FaxLineResponseFaxLine getFaxLine() { @JsonProperty(JSON_PROPERTY_FAX_LINE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxLine(FaxLineResponseFaxLine faxLine) { + public void setFaxLine(@javax.annotation.Nonnull FaxLineResponseFaxLine faxLine) { this.faxLine = faxLine; } - public FaxLineResponse warnings(WarningResponse warnings) { + public FaxLineResponse warnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; return this; } @@ -93,7 +93,7 @@ public WarningResponse getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(WarningResponse warnings) { + public void setWarnings(@javax.annotation.Nullable WarningResponse warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java index 63ef50b37..82402835e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -38,16 +38,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponseFaxLine { public static final String JSON_PROPERTY_NUMBER = "number"; - private String number; + @javax.annotation.Nullable private String number; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; + @javax.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public FaxLineResponseFaxLine() {} @@ -66,7 +66,7 @@ public static FaxLineResponseFaxLine init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxLineResponseFaxLine.class); } - public FaxLineResponseFaxLine number(String number) { + public FaxLineResponseFaxLine number(@javax.annotation.Nullable String number) { this.number = number; return this; } @@ -84,11 +84,11 @@ public String getNumber() { @JsonProperty(JSON_PROPERTY_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumber(String number) { + public void setNumber(@javax.annotation.Nullable String number) { this.number = number; } - public FaxLineResponseFaxLine createdAt(Integer createdAt) { + public FaxLineResponseFaxLine createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -106,11 +106,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public FaxLineResponseFaxLine updatedAt(Integer updatedAt) { + public FaxLineResponseFaxLine updatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -128,11 +128,12 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public FaxLineResponseFaxLine accounts(List accounts) { + public FaxLineResponseFaxLine accounts( + @javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -158,7 +159,7 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java index 7da2189b9..59a749c52 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -33,10 +33,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxListResponse { public static final String JSON_PROPERTY_FAXES = "faxes"; - private List faxes = new ArrayList<>(); + @javax.annotation.Nonnull private List faxes = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public FaxListResponse() {} @@ -54,7 +54,7 @@ public static FaxListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxListResponse.class); } - public FaxListResponse faxes(List faxes) { + public FaxListResponse faxes(@javax.annotation.Nonnull List faxes) { this.faxes = faxes; return this; } @@ -81,11 +81,11 @@ public List getFaxes() { @JsonProperty(JSON_PROPERTY_FAXES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxes(List faxes) { + public void setFaxes(@javax.annotation.Nonnull List faxes) { this.faxes = faxes; } - public FaxListResponse listInfo(ListInfoResponse listInfo) { + public FaxListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -104,7 +104,7 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java index ebe69e4dc..c53ed6b74 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -45,37 +45,39 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponse { public static final String JSON_PROPERTY_FAX_ID = "fax_id"; - private String faxId; + @javax.annotation.Nonnull private String faxId; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nonnull private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nonnull private String originalTitle; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = new HashMap<>(); + @javax.annotation.Nonnull private Map metadata = new HashMap<>(); public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nonnull private Integer createdAt; public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; + @javax.annotation.Nonnull private String sender; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nonnull private String filesUrl; public static final String JSON_PROPERTY_TRANSMISSIONS = "transmissions"; + + @javax.annotation.Nonnull private List transmissions = new ArrayList<>(); public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public FaxResponse() {} @@ -93,7 +95,7 @@ public static FaxResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxResponse.class); } - public FaxResponse faxId(String faxId) { + public FaxResponse faxId(@javax.annotation.Nonnull String faxId) { this.faxId = faxId; return this; } @@ -112,11 +114,11 @@ public String getFaxId() { @JsonProperty(JSON_PROPERTY_FAX_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFaxId(String faxId) { + public void setFaxId(@javax.annotation.Nonnull String faxId) { this.faxId = faxId; } - public FaxResponse title(String title) { + public FaxResponse title(@javax.annotation.Nonnull String title) { this.title = title; return this; } @@ -135,11 +137,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nonnull String title) { this.title = title; } - public FaxResponse originalTitle(String originalTitle) { + public FaxResponse originalTitle(@javax.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -158,11 +160,11 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nonnull String originalTitle) { this.originalTitle = originalTitle; } - public FaxResponse metadata(Map metadata) { + public FaxResponse metadata(@javax.annotation.Nonnull Map metadata) { this.metadata = metadata; return this; } @@ -189,11 +191,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.ALWAYS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nonnull Map metadata) { this.metadata = metadata; } - public FaxResponse createdAt(Integer createdAt) { + public FaxResponse createdAt(@javax.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; return this; } @@ -212,11 +214,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nonnull Integer createdAt) { this.createdAt = createdAt; } - public FaxResponse sender(String sender) { + public FaxResponse sender(@javax.annotation.Nonnull String sender) { this.sender = sender; return this; } @@ -235,11 +237,11 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSender(String sender) { + public void setSender(@javax.annotation.Nonnull String sender) { this.sender = sender; } - public FaxResponse filesUrl(String filesUrl) { + public FaxResponse filesUrl(@javax.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -258,11 +260,12 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nonnull String filesUrl) { this.filesUrl = filesUrl; } - public FaxResponse transmissions(List transmissions) { + public FaxResponse transmissions( + @javax.annotation.Nonnull List transmissions) { this.transmissions = transmissions; return this; } @@ -289,11 +292,12 @@ public List getTransmissions() { @JsonProperty(JSON_PROPERTY_TRANSMISSIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTransmissions(List transmissions) { + public void setTransmissions( + @javax.annotation.Nonnull List transmissions) { this.transmissions = transmissions; } - public FaxResponse subject(String subject) { + public FaxResponse subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -311,11 +315,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public FaxResponse message(String message) { + public FaxResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -333,11 +337,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public FaxResponse finalCopyUri(String finalCopyUri) { + public FaxResponse finalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -355,7 +359,7 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java index 684e2ba86..6fa41a8ad 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -37,25 +37,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponseTransmission { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; + @javax.annotation.Nonnull private String recipient; /** Fax Transmission Status Code */ public enum StatusCodeEnum { - SUCCESS("success"), + SUCCESS(String.valueOf("success")), - TRANSMITTING("transmitting"), + TRANSMITTING(String.valueOf("transmitting")), - ERROR_COULD_NOT_FAX("error_could_not_fax"), + ERROR_COULD_NOT_FAX(String.valueOf("error_could_not_fax")), - ERROR_UNKNOWN("error_unknown"), + ERROR_UNKNOWN(String.valueOf("error_unknown")), - ERROR_BUSY("error_busy"), + ERROR_BUSY(String.valueOf("error_busy")), - ERROR_NO_ANSWER("error_no_answer"), + ERROR_NO_ANSWER(String.valueOf("error_no_answer")), - ERROR_DISCONNECTED("error_disconnected"), + ERROR_DISCONNECTED(String.valueOf("error_disconnected")), - ERROR_BAD_DESTINATION("error_bad_destination"); + ERROR_BAD_DESTINATION(String.valueOf("error_bad_destination")); private String value; @@ -85,10 +85,10 @@ public static StatusCodeEnum fromValue(String value) { } public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private StatusCodeEnum statusCode; + @javax.annotation.Nonnull private StatusCodeEnum statusCode; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; + @javax.annotation.Nullable private Integer sentAt; public FaxResponseTransmission() {} @@ -107,7 +107,7 @@ public static FaxResponseTransmission init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), FaxResponseTransmission.class); } - public FaxResponseTransmission recipient(String recipient) { + public FaxResponseTransmission recipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } @@ -126,11 +126,11 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxResponseTransmission statusCode(StatusCodeEnum statusCode) { + public FaxResponseTransmission statusCode(@javax.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; return this; } @@ -149,11 +149,11 @@ public StatusCodeEnum getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatusCode(StatusCodeEnum statusCode) { + public void setStatusCode(@javax.annotation.Nonnull StatusCodeEnum statusCode) { this.statusCode = statusCode; } - public FaxResponseTransmission sentAt(Integer sentAt) { + public FaxResponseTransmission sentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -171,7 +171,7 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java index b668e9ff7..2fe670e32 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -44,31 +44,31 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FaxSendRequest { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; - private String recipient; + @javax.annotation.Nonnull private String recipient; public static final String JSON_PROPERTY_SENDER = "sender"; - private String sender; + @javax.annotation.Nullable private String sender; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_COVER_PAGE_TO = "cover_page_to"; - private String coverPageTo; + @javax.annotation.Nullable private String coverPageTo; public static final String JSON_PROPERTY_COVER_PAGE_FROM = "cover_page_from"; - private String coverPageFrom; + @javax.annotation.Nullable private String coverPageFrom; public static final String JSON_PROPERTY_COVER_PAGE_MESSAGE = "cover_page_message"; - private String coverPageMessage; + @javax.annotation.Nullable private String coverPageMessage; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public FaxSendRequest() {} @@ -86,7 +86,7 @@ public static FaxSendRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FaxSendRequest.class); } - public FaxSendRequest recipient(String recipient) { + public FaxSendRequest recipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; return this; } @@ -105,11 +105,11 @@ public String getRecipient() { @JsonProperty(JSON_PROPERTY_RECIPIENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRecipient(String recipient) { + public void setRecipient(@javax.annotation.Nonnull String recipient) { this.recipient = recipient; } - public FaxSendRequest sender(String sender) { + public FaxSendRequest sender(@javax.annotation.Nullable String sender) { this.sender = sender; return this; } @@ -127,11 +127,11 @@ public String getSender() { @JsonProperty(JSON_PROPERTY_SENDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSender(String sender) { + public void setSender(@javax.annotation.Nullable String sender) { this.sender = sender; } - public FaxSendRequest files(List files) { + public FaxSendRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -158,11 +158,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public FaxSendRequest fileUrls(List fileUrls) { + public FaxSendRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -189,11 +189,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public FaxSendRequest testMode(Boolean testMode) { + public FaxSendRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -211,11 +211,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public FaxSendRequest coverPageTo(String coverPageTo) { + public FaxSendRequest coverPageTo(@javax.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; return this; } @@ -233,11 +233,11 @@ public String getCoverPageTo() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_TO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageTo(String coverPageTo) { + public void setCoverPageTo(@javax.annotation.Nullable String coverPageTo) { this.coverPageTo = coverPageTo; } - public FaxSendRequest coverPageFrom(String coverPageFrom) { + public FaxSendRequest coverPageFrom(@javax.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; return this; } @@ -255,11 +255,11 @@ public String getCoverPageFrom() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageFrom(String coverPageFrom) { + public void setCoverPageFrom(@javax.annotation.Nullable String coverPageFrom) { this.coverPageFrom = coverPageFrom; } - public FaxSendRequest coverPageMessage(String coverPageMessage) { + public FaxSendRequest coverPageMessage(@javax.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; return this; } @@ -277,11 +277,11 @@ public String getCoverPageMessage() { @JsonProperty(JSON_PROPERTY_COVER_PAGE_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCoverPageMessage(String coverPageMessage) { + public void setCoverPageMessage(@javax.annotation.Nullable String coverPageMessage) { this.coverPageMessage = coverPageMessage; } - public FaxSendRequest title(String title) { + public FaxSendRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -299,7 +299,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java index 15282d488..2f0a9ea7f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java @@ -31,10 +31,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponse { public static final String JSON_PROPERTY_FILE_URL = "file_url"; - private String fileUrl; + @javax.annotation.Nonnull private String fileUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nonnull private Integer expiresAt; public FileResponse() {} @@ -52,7 +52,7 @@ public static FileResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FileResponse.class); } - public FileResponse fileUrl(String fileUrl) { + public FileResponse fileUrl(@javax.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; return this; } @@ -71,11 +71,11 @@ public String getFileUrl() { @JsonProperty(JSON_PROPERTY_FILE_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFileUrl(String fileUrl) { + public void setFileUrl(@javax.annotation.Nonnull String fileUrl) { this.fileUrl = fileUrl; } - public FileResponse expiresAt(Integer expiresAt) { + public FileResponse expiresAt(@javax.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -94,7 +94,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nonnull Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java index 995fca5c7..79e1b746e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponseDataUri { public static final String JSON_PROPERTY_DATA_URI = "data_uri"; - private String dataUri; + @javax.annotation.Nonnull private String dataUri; public FileResponseDataUri() {} @@ -49,7 +49,7 @@ public static FileResponseDataUri init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), FileResponseDataUri.class); } - public FileResponseDataUri dataUri(String dataUri) { + public FileResponseDataUri dataUri(@javax.annotation.Nonnull String dataUri) { this.dataUri = dataUri; return this; } @@ -68,7 +68,7 @@ public String getDataUri() { @JsonProperty(JSON_PROPERTY_DATA_URI) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDataUri(String dataUri) { + public void setDataUri(@javax.annotation.Nonnull String dataUri) { this.dataUri = dataUri; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java index f8647d314..7abef2125 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ListInfoResponse { public static final String JSON_PROPERTY_NUM_PAGES = "num_pages"; - private Integer numPages; + @javax.annotation.Nullable private Integer numPages; public static final String JSON_PROPERTY_NUM_RESULTS = "num_results"; - private Integer numResults; + @javax.annotation.Nullable private Integer numResults; public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; + @javax.annotation.Nullable private Integer page; public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; - private Integer pageSize; + @javax.annotation.Nullable private Integer pageSize; public ListInfoResponse() {} @@ -63,7 +63,7 @@ public static ListInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ListInfoResponse.class); } - public ListInfoResponse numPages(Integer numPages) { + public ListInfoResponse numPages(@javax.annotation.Nullable Integer numPages) { this.numPages = numPages; return this; } @@ -81,11 +81,11 @@ public Integer getNumPages() { @JsonProperty(JSON_PROPERTY_NUM_PAGES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumPages(Integer numPages) { + public void setNumPages(@javax.annotation.Nullable Integer numPages) { this.numPages = numPages; } - public ListInfoResponse numResults(Integer numResults) { + public ListInfoResponse numResults(@javax.annotation.Nullable Integer numResults) { this.numResults = numResults; return this; } @@ -103,11 +103,11 @@ public Integer getNumResults() { @JsonProperty(JSON_PROPERTY_NUM_RESULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumResults(Integer numResults) { + public void setNumResults(@javax.annotation.Nullable Integer numResults) { this.numResults = numResults; } - public ListInfoResponse page(Integer page) { + public ListInfoResponse page(@javax.annotation.Nullable Integer page) { this.page = page; return this; } @@ -125,11 +125,11 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@javax.annotation.Nullable Integer page) { this.page = page; } - public ListInfoResponse pageSize(Integer pageSize) { + public ListInfoResponse pageSize(@javax.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; return this; } @@ -147,7 +147,7 @@ public Integer getPageSize() { @JsonProperty(JSON_PROPERTY_PAGE_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageSize(Integer pageSize) { + public void setPageSize(@javax.annotation.Nullable Integer pageSize) { this.pageSize = pageSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java index b3dd4a140..202678823 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java @@ -37,19 +37,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenGenerateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nonnull private String clientSecret; public static final String JSON_PROPERTY_CODE = "code"; - private String code; + @javax.annotation.Nonnull private String code; public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "authorization_code"; + @javax.annotation.Nonnull private String grantType = "authorization_code"; public static final String JSON_PROPERTY_STATE = "state"; - private String state; + @javax.annotation.Nonnull private String state; public OAuthTokenGenerateRequest() {} @@ -69,7 +69,7 @@ public static OAuthTokenGenerateRequest init(HashMap data) throws Exception { OAuthTokenGenerateRequest.class); } - public OAuthTokenGenerateRequest clientId(String clientId) { + public OAuthTokenGenerateRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -88,11 +88,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public OAuthTokenGenerateRequest clientSecret(String clientSecret) { + public OAuthTokenGenerateRequest clientSecret(@javax.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -111,11 +111,11 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nonnull String clientSecret) { this.clientSecret = clientSecret; } - public OAuthTokenGenerateRequest code(String code) { + public OAuthTokenGenerateRequest code(@javax.annotation.Nonnull String code) { this.code = code; return this; } @@ -134,11 +134,11 @@ public String getCode() { @JsonProperty(JSON_PROPERTY_CODE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(String code) { + public void setCode(@javax.annotation.Nonnull String code) { this.code = code; } - public OAuthTokenGenerateRequest grantType(String grantType) { + public OAuthTokenGenerateRequest grantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -157,11 +157,11 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenGenerateRequest state(String state) { + public OAuthTokenGenerateRequest state(@javax.annotation.Nonnull String state) { this.state = state; return this; } @@ -180,7 +180,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setState(String state) { + public void setState(@javax.annotation.Nonnull String state) { this.state = state; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java index 75979827e..2937a0ed5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; - private String grantType = "refresh_token"; + @javax.annotation.Nonnull private String grantType = "refresh_token"; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; + @javax.annotation.Nonnull private String refreshToken; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CLIENT_SECRET = "client_secret"; - private String clientSecret; + @javax.annotation.Nullable private String clientSecret; public OAuthTokenRefreshRequest() {} @@ -65,7 +65,7 @@ public static OAuthTokenRefreshRequest init(HashMap data) throws Exception { OAuthTokenRefreshRequest.class); } - public OAuthTokenRefreshRequest grantType(String grantType) { + public OAuthTokenRefreshRequest grantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; return this; } @@ -84,11 +84,11 @@ public String getGrantType() { @JsonProperty(JSON_PROPERTY_GRANT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGrantType(String grantType) { + public void setGrantType(@javax.annotation.Nonnull String grantType) { this.grantType = grantType; } - public OAuthTokenRefreshRequest refreshToken(String refreshToken) { + public OAuthTokenRefreshRequest refreshToken(@javax.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -107,11 +107,11 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@javax.annotation.Nonnull String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenRefreshRequest clientId(String clientId) { + public OAuthTokenRefreshRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -131,11 +131,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public OAuthTokenRefreshRequest clientSecret(String clientSecret) { + public OAuthTokenRefreshRequest clientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; return this; } @@ -155,7 +155,7 @@ public String getClientSecret() { @JsonProperty(JSON_PROPERTY_CLIENT_SECRET) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientSecret(String clientSecret) { + public void setClientSecret(@javax.annotation.Nullable String clientSecret) { this.clientSecret = clientSecret; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java index f7392f322..fd8b913e7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java @@ -37,19 +37,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenResponse { public static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token"; - private String accessToken; + @javax.annotation.Nullable private String accessToken; public static final String JSON_PROPERTY_TOKEN_TYPE = "token_type"; - private String tokenType; + @javax.annotation.Nullable private String tokenType; public static final String JSON_PROPERTY_REFRESH_TOKEN = "refresh_token"; - private String refreshToken; + @javax.annotation.Nullable private String refreshToken; public static final String JSON_PROPERTY_EXPIRES_IN = "expires_in"; - private Integer expiresIn; + @javax.annotation.Nullable private Integer expiresIn; public static final String JSON_PROPERTY_STATE = "state"; - private String state; + @javax.annotation.Nullable private String state; public OAuthTokenResponse() {} @@ -67,7 +67,7 @@ public static OAuthTokenResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), OAuthTokenResponse.class); } - public OAuthTokenResponse accessToken(String accessToken) { + public OAuthTokenResponse accessToken(@javax.annotation.Nullable String accessToken) { this.accessToken = accessToken; return this; } @@ -85,11 +85,11 @@ public String getAccessToken() { @JsonProperty(JSON_PROPERTY_ACCESS_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccessToken(String accessToken) { + public void setAccessToken(@javax.annotation.Nullable String accessToken) { this.accessToken = accessToken; } - public OAuthTokenResponse tokenType(String tokenType) { + public OAuthTokenResponse tokenType(@javax.annotation.Nullable String tokenType) { this.tokenType = tokenType; return this; } @@ -107,11 +107,11 @@ public String getTokenType() { @JsonProperty(JSON_PROPERTY_TOKEN_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTokenType(String tokenType) { + public void setTokenType(@javax.annotation.Nullable String tokenType) { this.tokenType = tokenType; } - public OAuthTokenResponse refreshToken(String refreshToken) { + public OAuthTokenResponse refreshToken(@javax.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; return this; } @@ -129,11 +129,11 @@ public String getRefreshToken() { @JsonProperty(JSON_PROPERTY_REFRESH_TOKEN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRefreshToken(String refreshToken) { + public void setRefreshToken(@javax.annotation.Nullable String refreshToken) { this.refreshToken = refreshToken; } - public OAuthTokenResponse expiresIn(Integer expiresIn) { + public OAuthTokenResponse expiresIn(@javax.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; return this; } @@ -151,11 +151,11 @@ public Integer getExpiresIn() { @JsonProperty(JSON_PROPERTY_EXPIRES_IN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresIn(Integer expiresIn) { + public void setExpiresIn(@javax.annotation.Nullable Integer expiresIn) { this.expiresIn = expiresIn; } - public OAuthTokenResponse state(String state) { + public OAuthTokenResponse state(@javax.annotation.Nullable String state) { this.state = state; return this; } @@ -173,7 +173,7 @@ public String getState() { @JsonProperty(JSON_PROPERTY_STATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setState(String state) { + public void setState(@javax.annotation.Nullable String state) { this.state = state; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java index 293fd1568..b90622925 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java @@ -39,13 +39,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateRequest { public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; + @javax.annotation.Nonnull private String endDate; /** Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -75,10 +75,10 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = new ArrayList<>(); + @javax.annotation.Nonnull private List reportType = new ArrayList<>(); public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; + @javax.annotation.Nonnull private String startDate; public ReportCreateRequest() {} @@ -96,7 +96,7 @@ public static ReportCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateRequest.class); } - public ReportCreateRequest endDate(String endDate) { + public ReportCreateRequest endDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; return this; } @@ -115,11 +115,12 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEndDate(String endDate) { + public void setEndDate(@javax.annotation.Nonnull String endDate) { this.endDate = endDate; } - public ReportCreateRequest reportType(List reportType) { + public ReportCreateRequest reportType( + @javax.annotation.Nonnull List reportType) { this.reportType = reportType; return this; } @@ -149,11 +150,11 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReportType(List reportType) { + public void setReportType(@javax.annotation.Nonnull List reportType) { this.reportType = reportType; } - public ReportCreateRequest startDate(String startDate) { + public ReportCreateRequest startDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; return this; } @@ -172,7 +173,7 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStartDate(String startDate) { + public void setStartDate(@javax.annotation.Nonnull String startDate) { this.startDate = startDate; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java index 526daf04a..1fa1b6eb0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateResponse { public static final String JSON_PROPERTY_REPORT = "report"; - private ReportResponse report; + @javax.annotation.Nonnull private ReportResponse report; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public ReportCreateResponse() {} @@ -57,7 +57,7 @@ public static ReportCreateResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportCreateResponse.class); } - public ReportCreateResponse report(ReportResponse report) { + public ReportCreateResponse report(@javax.annotation.Nonnull ReportResponse report) { this.report = report; return this; } @@ -76,11 +76,12 @@ public ReportResponse getReport() { @JsonProperty(JSON_PROPERTY_REPORT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setReport(ReportResponse report) { + public void setReport(@javax.annotation.Nonnull ReportResponse report) { this.report = report; } - public ReportCreateResponse warnings(List warnings) { + public ReportCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +107,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java index aec19023a..2dbe1a4ae 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java @@ -40,19 +40,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ReportResponse { public static final String JSON_PROPERTY_SUCCESS = "success"; - private String success; + @javax.annotation.Nullable private String success; public static final String JSON_PROPERTY_START_DATE = "start_date"; - private String startDate; + @javax.annotation.Nullable private String startDate; public static final String JSON_PROPERTY_END_DATE = "end_date"; - private String endDate; + @javax.annotation.Nullable private String endDate; /** Gets or Sets reportType */ public enum ReportTypeEnum { - USER_ACTIVITY("user_activity"), + USER_ACTIVITY(String.valueOf("user_activity")), - DOCUMENT_STATUS("document_status"); + DOCUMENT_STATUS(String.valueOf("document_status")); private String value; @@ -82,7 +82,7 @@ public static ReportTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_REPORT_TYPE = "report_type"; - private List reportType = null; + @javax.annotation.Nullable private List reportType = null; public ReportResponse() {} @@ -100,7 +100,7 @@ public static ReportResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), ReportResponse.class); } - public ReportResponse success(String success) { + public ReportResponse success(@javax.annotation.Nullable String success) { this.success = success; return this; } @@ -118,11 +118,11 @@ public String getSuccess() { @JsonProperty(JSON_PROPERTY_SUCCESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSuccess(String success) { + public void setSuccess(@javax.annotation.Nullable String success) { this.success = success; } - public ReportResponse startDate(String startDate) { + public ReportResponse startDate(@javax.annotation.Nullable String startDate) { this.startDate = startDate; return this; } @@ -140,11 +140,11 @@ public String getStartDate() { @JsonProperty(JSON_PROPERTY_START_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStartDate(String startDate) { + public void setStartDate(@javax.annotation.Nullable String startDate) { this.startDate = startDate; } - public ReportResponse endDate(String endDate) { + public ReportResponse endDate(@javax.annotation.Nullable String endDate) { this.endDate = endDate; return this; } @@ -162,11 +162,11 @@ public String getEndDate() { @JsonProperty(JSON_PROPERTY_END_DATE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEndDate(String endDate) { + public void setEndDate(@javax.annotation.Nullable String endDate) { this.endDate = endDate; } - public ReportResponse reportType(List reportType) { + public ReportResponse reportType(@javax.annotation.Nullable List reportType) { this.reportType = reportType; return this; } @@ -195,7 +195,7 @@ public List getReportType() { @JsonProperty(JSON_PROPERTY_REPORT_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReportType(List reportType) { + public void setReportType(@javax.annotation.Nullable List reportType) { this.reportType = reportType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index d1d74538d..bb206691a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -48,43 +48,43 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; + @javax.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; + @javax.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestBulkCreateEmbeddedWithTemplateRequest() {} @@ -108,7 +108,7 @@ public static SignatureRequestBulkCreateEmbeddedWithTemplateRequest init(HashMap } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest templateIds( - List templateIds) { + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -137,11 +137,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -161,11 +162,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerFile( + @javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -200,12 +202,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signerList( - List signerList) { + @javax.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -233,12 +235,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@javax.annotation.Nullable List signerList) { this.signerList = signerList; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest allowDecline( - Boolean allowDecline) { + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -257,11 +259,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -287,12 +290,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -329,11 +332,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -351,12 +355,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -387,12 +391,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestBulkCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -410,11 +414,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -432,11 +437,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -455,11 +461,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestBulkCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -477,7 +484,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index 0d61875e3..ac1835d80 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -48,43 +48,43 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_FILE = "signer_file"; - private File signerFile; + @javax.annotation.Nullable private File signerFile; public static final String JSON_PROPERTY_SIGNER_LIST = "signer_list"; - private List signerList = null; + @javax.annotation.Nullable private List signerList = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestBulkSendWithTemplateRequest() {} @@ -106,7 +106,8 @@ public static SignatureRequestBulkSendWithTemplateRequest init(HashMap data) thr SignatureRequestBulkSendWithTemplateRequest.class); } - public SignatureRequestBulkSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestBulkSendWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -134,11 +135,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestBulkSendWithTemplateRequest signerFile(File signerFile) { + public SignatureRequestBulkSendWithTemplateRequest signerFile( + @javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; return this; } @@ -173,12 +175,12 @@ public File getSignerFile() { @JsonProperty(JSON_PROPERTY_SIGNER_FILE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerFile(File signerFile) { + public void setSignerFile(@javax.annotation.Nullable File signerFile) { this.signerFile = signerFile; } public SignatureRequestBulkSendWithTemplateRequest signerList( - List signerList) { + @javax.annotation.Nullable List signerList) { this.signerList = signerList; return this; } @@ -206,11 +208,12 @@ public List getSignerList() { @JsonProperty(JSON_PROPERTY_SIGNER_LIST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerList(List signerList) { + public void setSignerList(@javax.annotation.Nullable List signerList) { this.signerList = signerList; } - public SignatureRequestBulkSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestBulkSendWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -229,11 +232,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestBulkSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestBulkSendWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -259,11 +263,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestBulkSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestBulkSendWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -282,12 +287,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } public SignatureRequestBulkSendWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -324,11 +329,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestBulkSendWithTemplateRequest message(String message) { + public SignatureRequestBulkSendWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -346,11 +352,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestBulkSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestBulkSendWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -381,12 +388,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestBulkSendWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -404,11 +411,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestBulkSendWithTemplateRequest subject(String subject) { + public SignatureRequestBulkSendWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -426,11 +434,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestBulkSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestBulkSendWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -449,11 +458,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestBulkSendWithTemplateRequest title(String title) { + public SignatureRequestBulkSendWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -471,7 +481,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java index 6652702fb..e398cbc71 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java @@ -59,77 +59,79 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestCreateEmbeddedRequest() {} @@ -149,7 +151,8 @@ public static SignatureRequestCreateEmbeddedRequest init(HashMap data) throws Ex SignatureRequestCreateEmbeddedRequest.class); } - public SignatureRequestCreateEmbeddedRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,11 +172,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestCreateEmbeddedRequest files(List files) { + public SignatureRequestCreateEmbeddedRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -200,11 +204,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -231,11 +236,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedRequest signers(List signers) { + public SignatureRequestCreateEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -263,12 +269,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestCreateEmbeddedRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -296,11 +302,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -319,11 +327,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public SignatureRequestCreateEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -342,11 +351,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestCreateEmbeddedRequest attachments(List attachments) { + public SignatureRequestCreateEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -372,11 +382,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestCreateEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -403,11 +414,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestCreateEmbeddedRequest customFields(List customFields) { + public SignatureRequestCreateEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -444,11 +456,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestCreateEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -466,12 +479,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } public SignatureRequestCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -501,12 +514,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public SignatureRequestCreateEmbeddedRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -533,12 +547,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -580,11 +595,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestCreateEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -606,11 +623,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public SignatureRequestCreateEmbeddedRequest message(String message) { + public SignatureRequestCreateEmbeddedRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -628,11 +646,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestCreateEmbeddedRequest metadata(Map metadata) { + public SignatureRequestCreateEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -662,11 +681,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestCreateEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -684,11 +704,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedRequest subject(String subject) { + public SignatureRequestCreateEmbeddedRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -706,11 +727,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -729,11 +751,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedRequest title(String title) { + public SignatureRequestCreateEmbeddedRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -751,11 +773,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public SignatureRequestCreateEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -775,12 +798,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } public SignatureRequestCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -802,11 +825,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public SignatureRequestCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public SignatureRequestCreateEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -826,7 +851,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java index 7769adeab..8987a4fa4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java @@ -50,50 +50,52 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public SignatureRequestCreateEmbeddedWithTemplateRequest() {} @@ -116,7 +118,8 @@ public static SignatureRequestCreateEmbeddedWithTemplateRequest init(HashMap dat SignatureRequestCreateEmbeddedWithTemplateRequest.class); } - public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestCreateEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -145,11 +148,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,12 +173,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } public SignatureRequestCreateEmbeddedWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -202,11 +206,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestCreateEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -225,11 +231,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -255,12 +262,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public SignatureRequestCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -288,11 +295,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestCreateEmbeddedWithTemplateRequest files(List files) { + public SignatureRequestCreateEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -319,11 +327,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestCreateEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -350,11 +359,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestCreateEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -372,12 +382,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } public SignatureRequestCreateEmbeddedWithTemplateRequest metadata( - Map metadata) { + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -408,12 +418,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -431,11 +441,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestCreateEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -453,11 +464,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -476,11 +488,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestCreateEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -498,12 +511,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } public SignatureRequestCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -525,7 +538,8 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java index 6da72cb0f..dd8558709 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java @@ -59,77 +59,79 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestEditEmbeddedRequest() {} @@ -149,7 +151,7 @@ public static SignatureRequestEditEmbeddedRequest init(HashMap data) throws Exce SignatureRequestEditEmbeddedRequest.class); } - public SignatureRequestEditEmbeddedRequest clientId(String clientId) { + public SignatureRequestEditEmbeddedRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,11 +171,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public SignatureRequestEditEmbeddedRequest files(List files) { + public SignatureRequestEditEmbeddedRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -200,11 +202,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestEditEmbeddedRequest fileUrls(List fileUrls) { + public SignatureRequestEditEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -231,11 +234,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestEditEmbeddedRequest signers(List signers) { + public SignatureRequestEditEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -263,12 +267,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestEditEmbeddedRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -296,11 +300,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestEditEmbeddedRequest allowDecline(Boolean allowDecline) { + public SignatureRequestEditEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -319,11 +325,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestEditEmbeddedRequest allowReassign(Boolean allowReassign) { + public SignatureRequestEditEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -342,11 +349,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestEditEmbeddedRequest attachments(List attachments) { + public SignatureRequestEditEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -372,11 +380,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestEditEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestEditEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -403,11 +412,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestEditEmbeddedRequest customFields(List customFields) { + public SignatureRequestEditEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -444,11 +454,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestEditEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestEditEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -466,12 +477,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } public SignatureRequestEditEmbeddedRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -501,12 +512,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public SignatureRequestEditEmbeddedRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -533,12 +545,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestEditEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -580,11 +593,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestEditEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestEditEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -606,11 +621,11 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public SignatureRequestEditEmbeddedRequest message(String message) { + public SignatureRequestEditEmbeddedRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -628,11 +643,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestEditEmbeddedRequest metadata(Map metadata) { + public SignatureRequestEditEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -662,11 +678,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestEditEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestEditEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -684,11 +701,11 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestEditEmbeddedRequest subject(String subject) { + public SignatureRequestEditEmbeddedRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -706,11 +723,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestEditEmbeddedRequest testMode(Boolean testMode) { + public SignatureRequestEditEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -729,11 +747,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestEditEmbeddedRequest title(String title) { + public SignatureRequestEditEmbeddedRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -751,11 +769,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestEditEmbeddedRequest useTextTags(Boolean useTextTags) { + public SignatureRequestEditEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -775,12 +794,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } public SignatureRequestEditEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -802,11 +821,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public SignatureRequestEditEmbeddedRequest expiresAt(Integer expiresAt) { + public SignatureRequestEditEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -826,7 +847,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java index 03e4cccf7..1b6451f95 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java @@ -50,50 +50,52 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public SignatureRequestEditEmbeddedWithTemplateRequest() {} @@ -116,7 +118,8 @@ public static SignatureRequestEditEmbeddedWithTemplateRequest init(HashMap data) SignatureRequestEditEmbeddedWithTemplateRequest.class); } - public SignatureRequestEditEmbeddedWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestEditEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -145,11 +148,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public SignatureRequestEditEmbeddedWithTemplateRequest clientId(String clientId) { + public SignatureRequestEditEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -169,12 +173,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } public SignatureRequestEditEmbeddedWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -202,11 +206,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestEditEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestEditEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -225,11 +231,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestEditEmbeddedWithTemplateRequest ccs(List ccs) { + public SignatureRequestEditEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -255,12 +262,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public SignatureRequestEditEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -288,11 +295,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestEditEmbeddedWithTemplateRequest files(List files) { + public SignatureRequestEditEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -319,11 +327,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestEditEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestEditEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -350,11 +359,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestEditEmbeddedWithTemplateRequest message(String message) { + public SignatureRequestEditEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -372,11 +382,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestEditEmbeddedWithTemplateRequest metadata(Map metadata) { + public SignatureRequestEditEmbeddedWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -407,12 +418,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestEditEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -430,11 +441,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestEditEmbeddedWithTemplateRequest subject(String subject) { + public SignatureRequestEditEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -452,11 +464,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestEditEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestEditEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -475,11 +488,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestEditEmbeddedWithTemplateRequest title(String title) { + public SignatureRequestEditEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -497,12 +511,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } public SignatureRequestEditEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -524,7 +538,8 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java index 92427a9db..de69319d1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java @@ -60,79 +60,81 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditRequest { public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestEditRequest() {} @@ -152,7 +154,7 @@ public static SignatureRequestEditRequest init(HashMap data) throws Exception { SignatureRequestEditRequest.class); } - public SignatureRequestEditRequest files(List files) { + public SignatureRequestEditRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -179,11 +181,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestEditRequest fileUrls(List fileUrls) { + public SignatureRequestEditRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -210,11 +212,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestEditRequest signers(List signers) { + public SignatureRequestEditRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -241,12 +244,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestEditRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -274,11 +277,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestEditRequest allowDecline(Boolean allowDecline) { + public SignatureRequestEditRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -297,11 +302,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestEditRequest allowReassign(Boolean allowReassign) { + public SignatureRequestEditRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -321,11 +327,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestEditRequest attachments(List attachments) { + public SignatureRequestEditRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -351,11 +358,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestEditRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestEditRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -381,11 +389,11 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestEditRequest clientId(String clientId) { + public SignatureRequestEditRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -404,11 +412,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestEditRequest customFields(List customFields) { + public SignatureRequestEditRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -444,11 +453,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestEditRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestEditRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -466,11 +476,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public SignatureRequestEditRequest formFieldGroups(List formFieldGroups) { + public SignatureRequestEditRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -500,11 +511,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public SignatureRequestEditRequest formFieldRules(List formFieldRules) { + public SignatureRequestEditRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -530,12 +543,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestEditRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -577,11 +591,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestEditRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestEditRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -603,11 +619,11 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public SignatureRequestEditRequest isEid(Boolean isEid) { + public SignatureRequestEditRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -629,11 +645,11 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestEditRequest message(String message) { + public SignatureRequestEditRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -651,11 +667,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestEditRequest metadata(Map metadata) { + public SignatureRequestEditRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -685,11 +702,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestEditRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestEditRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -707,11 +725,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestEditRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestEditRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -729,11 +748,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestEditRequest subject(String subject) { + public SignatureRequestEditRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -751,11 +770,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestEditRequest testMode(Boolean testMode) { + public SignatureRequestEditRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -774,11 +793,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestEditRequest title(String title) { + public SignatureRequestEditRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -796,11 +815,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestEditRequest useTextTags(Boolean useTextTags) { + public SignatureRequestEditRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -820,11 +839,11 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public SignatureRequestEditRequest expiresAt(Integer expiresAt) { + public SignatureRequestEditRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -844,7 +863,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java index 3621d0d2f..e040fc5ac 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java @@ -51,52 +51,54 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestEditWithTemplateRequest() {} @@ -117,7 +119,8 @@ public static SignatureRequestEditWithTemplateRequest init(HashMap data) throws SignatureRequestEditWithTemplateRequest.class); } - public SignatureRequestEditWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestEditWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -145,12 +148,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } public SignatureRequestEditWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -178,11 +181,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestEditWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestEditWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -201,11 +206,11 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestEditWithTemplateRequest ccs(List ccs) { + public SignatureRequestEditWithTemplateRequest ccs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -231,11 +236,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestEditWithTemplateRequest clientId(String clientId) { + public SignatureRequestEditWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -254,11 +260,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestEditWithTemplateRequest customFields(List customFields) { + public SignatureRequestEditWithTemplateRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -286,11 +293,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestEditWithTemplateRequest files(List files) { + public SignatureRequestEditWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -317,11 +325,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestEditWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestEditWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -348,11 +357,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestEditWithTemplateRequest isEid(Boolean isEid) { + public SignatureRequestEditWithTemplateRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -374,11 +383,12 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestEditWithTemplateRequest message(String message) { + public SignatureRequestEditWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -396,11 +406,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestEditWithTemplateRequest metadata(Map metadata) { + public SignatureRequestEditWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -431,12 +442,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestEditWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -454,11 +465,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestEditWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestEditWithTemplateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -476,11 +488,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestEditWithTemplateRequest subject(String subject) { + public SignatureRequestEditWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -498,11 +511,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestEditWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestEditWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -521,11 +535,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestEditWithTemplateRequest title(String title) { + public SignatureRequestEditWithTemplateRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -543,7 +557,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java index 3e7064c63..23372e5a7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestGetResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; - private SignatureRequestResponse signatureRequest; + @javax.annotation.Nonnull private SignatureRequestResponse signatureRequest; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public SignatureRequestGetResponse() {} @@ -59,7 +59,8 @@ public static SignatureRequestGetResponse init(HashMap data) throws Exception { SignatureRequestGetResponse.class); } - public SignatureRequestGetResponse signatureRequest(SignatureRequestResponse signatureRequest) { + public SignatureRequestGetResponse signatureRequest( + @javax.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; return this; } @@ -78,11 +79,13 @@ public SignatureRequestResponse getSignatureRequest() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequest(SignatureRequestResponse signatureRequest) { + public void setSignatureRequest( + @javax.annotation.Nonnull SignatureRequestResponse signatureRequest) { this.signatureRequest = signatureRequest; } - public SignatureRequestGetResponse warnings(List warnings) { + public SignatureRequestGetResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -108,7 +111,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java index 4ae97121d..40bb45487 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java @@ -37,13 +37,15 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestListResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; + + @javax.annotation.Nonnull private List signatureRequests = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public SignatureRequestListResponse() {} @@ -64,7 +66,7 @@ public static SignatureRequestListResponse init(HashMap data) throws Exception { } public SignatureRequestListResponse signatureRequests( - List signatureRequests) { + @javax.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; return this; } @@ -92,11 +94,13 @@ public List getSignatureRequests() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUESTS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureRequests(List signatureRequests) { + public void setSignatureRequests( + @javax.annotation.Nonnull List signatureRequests) { this.signatureRequests = signatureRequests; } - public SignatureRequestListResponse listInfo(ListInfoResponse listInfo) { + public SignatureRequestListResponse listInfo( + @javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -115,11 +119,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public SignatureRequestListResponse warnings(List warnings) { + public SignatureRequestListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -145,7 +150,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java index b4343b7b3..d901ff369 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestRemindRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public SignatureRequestRemindRequest() {} @@ -57,7 +57,8 @@ public static SignatureRequestRemindRequest init(HashMap data) throws Exception SignatureRequestRemindRequest.class); } - public SignatureRequestRemindRequest emailAddress(String emailAddress) { + public SignatureRequestRemindRequest emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -76,11 +77,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestRemindRequest name(String name) { + public SignatureRequestRemindRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -99,7 +100,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java index ed78327dc..5052cce35 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java @@ -59,79 +59,80 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponse { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_ORIGINAL_TITLE = "original_title"; - private String originalTitle; + @javax.annotation.Nullable private String originalTitle; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private Integer createdAt; + @javax.annotation.Nullable private Integer createdAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_IS_COMPLETE = "is_complete"; - private Boolean isComplete; + @javax.annotation.Nullable private Boolean isComplete; public static final String JSON_PROPERTY_IS_DECLINED = "is_declined"; - private Boolean isDeclined; + @javax.annotation.Nullable private Boolean isDeclined; public static final String JSON_PROPERTY_HAS_ERROR = "has_error"; - private Boolean hasError; + @javax.annotation.Nullable private Boolean hasError; public static final String JSON_PROPERTY_FILES_URL = "files_url"; - private String filesUrl; + @javax.annotation.Nullable private String filesUrl; public static final String JSON_PROPERTY_SIGNING_URL = "signing_url"; - private String signingUrl; + @javax.annotation.Nullable private String signingUrl; public static final String JSON_PROPERTY_DETAILS_URL = "details_url"; - private String detailsUrl; + @javax.annotation.Nullable private String detailsUrl; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_FINAL_COPY_URI = "final_copy_uri"; - private String finalCopyUri; + @javax.annotation.Nullable private String finalCopyUri; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = null; + @javax.annotation.Nullable private List templateIds = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_RESPONSE_DATA = "response_data"; - private List responseData = null; + @javax.annotation.Nullable private List responseData = null; public static final String JSON_PROPERTY_SIGNATURES = "signatures"; - private List signatures = null; + @javax.annotation.Nullable private List signatures = null; public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; - private String bulkSendJobId; + @javax.annotation.Nullable private String bulkSendJobId; public SignatureRequestResponse() {} @@ -151,7 +152,7 @@ public static SignatureRequestResponse init(HashMap data) throws Exception { SignatureRequestResponse.class); } - public SignatureRequestResponse testMode(Boolean testMode) { + public SignatureRequestResponse testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -170,11 +171,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestResponse signatureRequestId(String signatureRequestId) { + public SignatureRequestResponse signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -192,11 +194,12 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public SignatureRequestResponse requesterEmailAddress(String requesterEmailAddress) { + public SignatureRequestResponse requesterEmailAddress( + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -214,11 +217,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public SignatureRequestResponse title(String title) { + public SignatureRequestResponse title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -236,11 +239,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestResponse originalTitle(String originalTitle) { + public SignatureRequestResponse originalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; return this; } @@ -258,11 +261,11 @@ public String getOriginalTitle() { @JsonProperty(JSON_PROPERTY_ORIGINAL_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalTitle(String originalTitle) { + public void setOriginalTitle(@javax.annotation.Nullable String originalTitle) { this.originalTitle = originalTitle; } - public SignatureRequestResponse subject(String subject) { + public SignatureRequestResponse subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -280,11 +283,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestResponse message(String message) { + public SignatureRequestResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -302,11 +305,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestResponse metadata(Map metadata) { + public SignatureRequestResponse metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -332,11 +336,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestResponse createdAt(Integer createdAt) { + public SignatureRequestResponse createdAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; return this; } @@ -354,11 +358,11 @@ public Integer getCreatedAt() { @JsonProperty(JSON_PROPERTY_CREATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(@javax.annotation.Nullable Integer createdAt) { this.createdAt = createdAt; } - public SignatureRequestResponse expiresAt(Integer expiresAt) { + public SignatureRequestResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -378,11 +382,11 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public SignatureRequestResponse isComplete(Boolean isComplete) { + public SignatureRequestResponse isComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; return this; } @@ -400,11 +404,11 @@ public Boolean getIsComplete() { @JsonProperty(JSON_PROPERTY_IS_COMPLETE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsComplete(Boolean isComplete) { + public void setIsComplete(@javax.annotation.Nullable Boolean isComplete) { this.isComplete = isComplete; } - public SignatureRequestResponse isDeclined(Boolean isDeclined) { + public SignatureRequestResponse isDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; return this; } @@ -422,11 +426,11 @@ public Boolean getIsDeclined() { @JsonProperty(JSON_PROPERTY_IS_DECLINED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsDeclined(Boolean isDeclined) { + public void setIsDeclined(@javax.annotation.Nullable Boolean isDeclined) { this.isDeclined = isDeclined; } - public SignatureRequestResponse hasError(Boolean hasError) { + public SignatureRequestResponse hasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; return this; } @@ -445,11 +449,11 @@ public Boolean getHasError() { @JsonProperty(JSON_PROPERTY_HAS_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasError(Boolean hasError) { + public void setHasError(@javax.annotation.Nullable Boolean hasError) { this.hasError = hasError; } - public SignatureRequestResponse filesUrl(String filesUrl) { + public SignatureRequestResponse filesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; return this; } @@ -467,11 +471,11 @@ public String getFilesUrl() { @JsonProperty(JSON_PROPERTY_FILES_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFilesUrl(String filesUrl) { + public void setFilesUrl(@javax.annotation.Nullable String filesUrl) { this.filesUrl = filesUrl; } - public SignatureRequestResponse signingUrl(String signingUrl) { + public SignatureRequestResponse signingUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; return this; } @@ -491,11 +495,11 @@ public String getSigningUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningUrl(String signingUrl) { + public void setSigningUrl(@javax.annotation.Nullable String signingUrl) { this.signingUrl = signingUrl; } - public SignatureRequestResponse detailsUrl(String detailsUrl) { + public SignatureRequestResponse detailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; return this; } @@ -514,11 +518,12 @@ public String getDetailsUrl() { @JsonProperty(JSON_PROPERTY_DETAILS_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDetailsUrl(String detailsUrl) { + public void setDetailsUrl(@javax.annotation.Nullable String detailsUrl) { this.detailsUrl = detailsUrl; } - public SignatureRequestResponse ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestResponse ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -545,11 +550,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestResponse signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestResponse signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -567,11 +573,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestResponse finalCopyUri(String finalCopyUri) { + public SignatureRequestResponse finalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; return this; } @@ -589,11 +595,12 @@ public String getFinalCopyUri() { @JsonProperty(JSON_PROPERTY_FINAL_COPY_URI) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFinalCopyUri(String finalCopyUri) { + public void setFinalCopyUri(@javax.annotation.Nullable String finalCopyUri) { this.finalCopyUri = finalCopyUri; } - public SignatureRequestResponse templateIds(List templateIds) { + public SignatureRequestResponse templateIds( + @javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; return this; } @@ -619,12 +626,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nullable List templateIds) { this.templateIds = templateIds; } public SignatureRequestResponse customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -653,12 +660,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public SignatureRequestResponse attachments( - List attachments) { + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -685,12 +693,13 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } public SignatureRequestResponse responseData( - List responseData) { + @javax.annotation.Nullable List responseData) { this.responseData = responseData; return this; } @@ -718,12 +727,13 @@ public List getResponseData() { @JsonProperty(JSON_PROPERTY_RESPONSE_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResponseData(List responseData) { + public void setResponseData( + @javax.annotation.Nullable List responseData) { this.responseData = responseData; } public SignatureRequestResponse signatures( - List signatures) { + @javax.annotation.Nullable List signatures) { this.signatures = signatures; return this; } @@ -750,11 +760,12 @@ public List getSignatures() { @JsonProperty(JSON_PROPERTY_SIGNATURES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatures(List signatures) { + public void setSignatures( + @javax.annotation.Nullable List signatures) { this.signatures = signatures; } - public SignatureRequestResponse bulkSendJobId(String bulkSendJobId) { + public SignatureRequestResponse bulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; return this; } @@ -772,7 +783,7 @@ public String getBulkSendJobId() { @JsonProperty(JSON_PROPERTY_BULK_SEND_JOB_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBulkSendJobId(String bulkSendJobId) { + public void setBulkSendJobId(@javax.annotation.Nullable String bulkSendJobId) { this.bulkSendJobId = bulkSendJobId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java index 8d4e942e3..c058d5a49 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java @@ -38,22 +38,22 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseAttachment { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; + @javax.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_UPLOADED_AT = "uploaded_at"; - private Integer uploadedAt; + @javax.annotation.Nullable private Integer uploadedAt; public SignatureRequestResponseAttachment() {} @@ -73,7 +73,7 @@ public static SignatureRequestResponseAttachment init(HashMap data) throws Excep SignatureRequestResponseAttachment.class); } - public SignatureRequestResponseAttachment id(String id) { + public SignatureRequestResponseAttachment id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -92,11 +92,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SignatureRequestResponseAttachment signer(String signer) { + public SignatureRequestResponseAttachment signer(@javax.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -120,7 +120,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nonnull String signer) { this.signer = signer; } @@ -128,7 +128,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public SignatureRequestResponseAttachment name(String name) { + public SignatureRequestResponseAttachment name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -147,11 +147,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseAttachment required(Boolean required) { + public SignatureRequestResponseAttachment required(@javax.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -170,11 +170,12 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nonnull Boolean required) { this.required = required; } - public SignatureRequestResponseAttachment instructions(String instructions) { + public SignatureRequestResponseAttachment instructions( + @javax.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -192,11 +193,12 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; } - public SignatureRequestResponseAttachment uploadedAt(Integer uploadedAt) { + public SignatureRequestResponseAttachment uploadedAt( + @javax.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; return this; } @@ -214,7 +216,7 @@ public Integer getUploadedAt() { @JsonProperty(JSON_PROPERTY_UPLOADED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUploadedAt(Integer uploadedAt) { + public void setUploadedAt(@javax.annotation.Nullable Integer uploadedAt) { this.uploadedAt = uploadedAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java index eff161450..4f0189830 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java @@ -56,19 +56,19 @@ }) public class SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; + @javax.annotation.Nullable private String editor; public SignatureRequestResponseCustomFieldBase() {} @@ -89,7 +89,7 @@ public static SignatureRequestResponseCustomFieldBase init(HashMap data) throws SignatureRequestResponseCustomFieldBase.class); } - public SignatureRequestResponseCustomFieldBase type(String type) { + public SignatureRequestResponseCustomFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -109,11 +109,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldBase name(String name) { + public SignatureRequestResponseCustomFieldBase name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -132,11 +132,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SignatureRequestResponseCustomFieldBase required(Boolean required) { + public SignatureRequestResponseCustomFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -154,11 +155,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseCustomFieldBase apiId(String apiId) { + public SignatureRequestResponseCustomFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -176,11 +177,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseCustomFieldBase editor(String editor) { + public SignatureRequestResponseCustomFieldBase editor( + @javax.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -198,7 +200,7 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@javax.annotation.Nullable String editor) { this.editor = editor; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java index f2f207ebf..1d8ae63fc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java @@ -43,10 +43,10 @@ public class SignatureRequestResponseCustomFieldCheckbox extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseCustomFieldCheckbox() {} @@ -68,7 +68,7 @@ public static SignatureRequestResponseCustomFieldCheckbox init(HashMap data) thr SignatureRequestResponseCustomFieldCheckbox.class); } - public SignatureRequestResponseCustomFieldCheckbox type(String type) { + public SignatureRequestResponseCustomFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldCheckbox value(Boolean value) { + public SignatureRequestResponseCustomFieldCheckbox value( + @javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -110,7 +111,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java index 31c911d42..05e0a0558 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java @@ -43,10 +43,10 @@ public class SignatureRequestResponseCustomFieldText extends SignatureRequestResponseCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseCustomFieldText() {} @@ -67,7 +67,7 @@ public static SignatureRequestResponseCustomFieldText init(HashMap data) throws SignatureRequestResponseCustomFieldText.class); } - public SignatureRequestResponseCustomFieldText type(String type) { + public SignatureRequestResponseCustomFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -87,11 +87,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SignatureRequestResponseCustomFieldText value(String value) { + public SignatureRequestResponseCustomFieldText value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -109,7 +109,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java index 1b5606c45..9b3706e89 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java @@ -68,19 +68,19 @@ }) public class SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nullable private String type; public SignatureRequestResponseDataBase() {} @@ -100,7 +100,7 @@ public static SignatureRequestResponseDataBase init(HashMap data) throws Excepti SignatureRequestResponseDataBase.class); } - public SignatureRequestResponseDataBase apiId(String apiId) { + public SignatureRequestResponseDataBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -118,11 +118,12 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public SignatureRequestResponseDataBase signatureId(String signatureId) { + public SignatureRequestResponseDataBase signatureId( + @javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -140,11 +141,11 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseDataBase name(String name) { + public SignatureRequestResponseDataBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -162,11 +163,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SignatureRequestResponseDataBase required(Boolean required) { + public SignatureRequestResponseDataBase required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -184,11 +185,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SignatureRequestResponseDataBase type(String type) { + public SignatureRequestResponseDataBase type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -206,7 +207,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java index 656b82718..bccb89037 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueCheckbox extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nullable private String type = "checkbox"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueCheckbox() {} @@ -66,7 +66,7 @@ public static SignatureRequestResponseDataValueCheckbox init(HashMap data) throw SignatureRequestResponseDataValueCheckbox.class); } - public SignatureRequestResponseDataValueCheckbox type(String type) { + public SignatureRequestResponseDataValueCheckbox type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -84,11 +84,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckbox value(Boolean value) { + public SignatureRequestResponseDataValueCheckbox value( + @javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -106,7 +107,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java index 9127f681c..5e0cafff8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java @@ -43,10 +43,10 @@ public class SignatureRequestResponseDataValueCheckboxMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; + @javax.annotation.Nullable private String type = "checkbox-merge"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueCheckboxMerge() {} @@ -69,7 +69,8 @@ public static SignatureRequestResponseDataValueCheckboxMerge init(HashMap data) SignatureRequestResponseDataValueCheckboxMerge.class); } - public SignatureRequestResponseDataValueCheckboxMerge type(String type) { + public SignatureRequestResponseDataValueCheckboxMerge type( + @javax.annotation.Nullable String type) { this.type = type; return this; } @@ -87,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueCheckboxMerge value(String value) { + public SignatureRequestResponseDataValueCheckboxMerge value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -109,7 +111,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java index b93a26238..b0d08ded3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueDateSigned extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nullable private String type = "date_signed"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueDateSigned() {} @@ -67,7 +67,8 @@ public static SignatureRequestResponseDataValueDateSigned init(HashMap data) thr SignatureRequestResponseDataValueDateSigned.class); } - public SignatureRequestResponseDataValueDateSigned type(String type) { + public SignatureRequestResponseDataValueDateSigned type( + @javax.annotation.Nullable String type) { this.type = type; return this; } @@ -85,11 +86,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDateSigned value(String value) { + public SignatureRequestResponseDataValueDateSigned value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -107,7 +109,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java index b52dee36f..8ed6df0da 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueDropdown extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nullable private String type = "dropdown"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueDropdown() {} @@ -66,7 +66,7 @@ public static SignatureRequestResponseDataValueDropdown init(HashMap data) throw SignatureRequestResponseDataValueDropdown.class); } - public SignatureRequestResponseDataValueDropdown type(String type) { + public SignatureRequestResponseDataValueDropdown type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -84,11 +84,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueDropdown value(String value) { + public SignatureRequestResponseDataValueDropdown value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -106,7 +107,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java index 28262ccf4..70f32ab10 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java @@ -43,13 +43,13 @@ visible = true) public class SignatureRequestResponseDataValueInitials extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nullable private String type = "initials"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; + @javax.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueInitials() {} @@ -70,7 +70,7 @@ public static SignatureRequestResponseDataValueInitials init(HashMap data) throw SignatureRequestResponseDataValueInitials.class); } - public SignatureRequestResponseDataValueInitials type(String type) { + public SignatureRequestResponseDataValueInitials type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -88,11 +88,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueInitials value(String value) { + public SignatureRequestResponseDataValueInitials value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -110,11 +111,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueInitials isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueInitials isSigned( + @javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -132,7 +134,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java index a5d63ae2c..66577d120 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueRadio extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nullable private String type = "radio"; public static final String JSON_PROPERTY_VALUE = "value"; - private Boolean value; + @javax.annotation.Nullable private Boolean value; public SignatureRequestResponseDataValueRadio() {} @@ -65,7 +65,7 @@ public static SignatureRequestResponseDataValueRadio init(HashMap data) throws E SignatureRequestResponseDataValueRadio.class); } - public SignatureRequestResponseDataValueRadio type(String type) { + public SignatureRequestResponseDataValueRadio type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -83,11 +83,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueRadio value(Boolean value) { + public SignatureRequestResponseDataValueRadio value(@javax.annotation.Nullable Boolean value) { this.value = value; return this; } @@ -105,7 +105,7 @@ public Boolean getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(Boolean value) { + public void setValue(@javax.annotation.Nullable Boolean value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java index 657bc4864..cc690b8db 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java @@ -43,13 +43,13 @@ visible = true) public class SignatureRequestResponseDataValueSignature extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nullable private String type = "signature"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_IS_SIGNED = "is_signed"; - private Boolean isSigned; + @javax.annotation.Nullable private Boolean isSigned; public SignatureRequestResponseDataValueSignature() {} @@ -71,7 +71,7 @@ public static SignatureRequestResponseDataValueSignature init(HashMap data) thro SignatureRequestResponseDataValueSignature.class); } - public SignatureRequestResponseDataValueSignature type(String type) { + public SignatureRequestResponseDataValueSignature type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -89,11 +89,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueSignature value(String value) { + public SignatureRequestResponseDataValueSignature value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -111,11 +112,12 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SignatureRequestResponseDataValueSignature isSigned(Boolean isSigned) { + public SignatureRequestResponseDataValueSignature isSigned( + @javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; return this; } @@ -133,7 +135,7 @@ public Boolean getIsSigned() { @JsonProperty(JSON_PROPERTY_IS_SIGNED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsSigned(Boolean isSigned) { + public void setIsSigned(@javax.annotation.Nullable Boolean isSigned) { this.isSigned = isSigned; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java index d9c7af057..06d24c3ac 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueText extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nullable private String type = "text"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueText() {} @@ -65,7 +65,7 @@ public static SignatureRequestResponseDataValueText init(HashMap data) throws Ex SignatureRequestResponseDataValueText.class); } - public SignatureRequestResponseDataValueText type(String type) { + public SignatureRequestResponseDataValueText type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -83,11 +83,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueText value(String value) { + public SignatureRequestResponseDataValueText value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -105,7 +105,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java index 1b796dbd6..0fcf5bb37 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java @@ -42,10 +42,10 @@ visible = true) public class SignatureRequestResponseDataValueTextMerge extends SignatureRequestResponseDataBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; + @javax.annotation.Nullable private String type = "text-merge"; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SignatureRequestResponseDataValueTextMerge() {} @@ -67,7 +67,7 @@ public static SignatureRequestResponseDataValueTextMerge init(HashMap data) thro SignatureRequestResponseDataValueTextMerge.class); } - public SignatureRequestResponseDataValueTextMerge type(String type) { + public SignatureRequestResponseDataValueTextMerge type(@javax.annotation.Nullable String type) { this.type = type; return this; } @@ -85,11 +85,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { + public void setType(@javax.annotation.Nullable String type) { this.type = type; } - public SignatureRequestResponseDataValueTextMerge value(String value) { + public SignatureRequestResponseDataValueTextMerge value( + @javax.annotation.Nullable String value) { this.value = value; return this; } @@ -107,7 +108,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java index 6dbe1116f..0817b0f07 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java @@ -51,61 +51,61 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseSignatures { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nullable private String signatureId; public static final String JSON_PROPERTY_SIGNER_GROUP_GUID = "signer_group_guid"; - private String signerGroupGuid; + @javax.annotation.Nullable private String signerGroupGuid; public static final String JSON_PROPERTY_SIGNER_EMAIL_ADDRESS = "signer_email_address"; - private String signerEmailAddress; + @javax.annotation.Nullable private String signerEmailAddress; public static final String JSON_PROPERTY_SIGNER_NAME = "signer_name"; - private String signerName; + @javax.annotation.Nullable private String signerName; public static final String JSON_PROPERTY_SIGNER_ROLE = "signer_role"; - private String signerRole; + @javax.annotation.Nullable private String signerRole; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_STATUS_CODE = "status_code"; - private String statusCode; + @javax.annotation.Nullable private String statusCode; public static final String JSON_PROPERTY_DECLINE_REASON = "decline_reason"; - private String declineReason; + @javax.annotation.Nullable private String declineReason; public static final String JSON_PROPERTY_SIGNED_AT = "signed_at"; - private Integer signedAt; + @javax.annotation.Nullable private Integer signedAt; public static final String JSON_PROPERTY_LAST_VIEWED_AT = "last_viewed_at"; - private Integer lastViewedAt; + @javax.annotation.Nullable private Integer lastViewedAt; public static final String JSON_PROPERTY_LAST_REMINDED_AT = "last_reminded_at"; - private Integer lastRemindedAt; + @javax.annotation.Nullable private Integer lastRemindedAt; public static final String JSON_PROPERTY_HAS_PIN = "has_pin"; - private Boolean hasPin; + @javax.annotation.Nullable private Boolean hasPin; public static final String JSON_PROPERTY_HAS_SMS_AUTH = "has_sms_auth"; - private Boolean hasSmsAuth; + @javax.annotation.Nullable private Boolean hasSmsAuth; public static final String JSON_PROPERTY_HAS_SMS_DELIVERY = "has_sms_delivery"; - private Boolean hasSmsDelivery; + @javax.annotation.Nullable private Boolean hasSmsDelivery; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; public static final String JSON_PROPERTY_REASSIGNED_BY = "reassigned_by"; - private String reassignedBy; + @javax.annotation.Nullable private String reassignedBy; public static final String JSON_PROPERTY_REASSIGNMENT_REASON = "reassignment_reason"; - private String reassignmentReason; + @javax.annotation.Nullable private String reassignmentReason; public static final String JSON_PROPERTY_REASSIGNED_FROM = "reassigned_from"; - private String reassignedFrom; + @javax.annotation.Nullable private String reassignedFrom; public static final String JSON_PROPERTY_ERROR = "error"; - private String error; + @javax.annotation.Nullable private String error; public SignatureRequestResponseSignatures() {} @@ -125,7 +125,8 @@ public static SignatureRequestResponseSignatures init(HashMap data) throws Excep SignatureRequestResponseSignatures.class); } - public SignatureRequestResponseSignatures signatureId(String signatureId) { + public SignatureRequestResponseSignatures signatureId( + @javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; return this; } @@ -143,11 +144,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nullable String signatureId) { this.signatureId = signatureId; } - public SignatureRequestResponseSignatures signerGroupGuid(String signerGroupGuid) { + public SignatureRequestResponseSignatures signerGroupGuid( + @javax.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; return this; } @@ -165,11 +167,12 @@ public String getSignerGroupGuid() { @JsonProperty(JSON_PROPERTY_SIGNER_GROUP_GUID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerGroupGuid(String signerGroupGuid) { + public void setSignerGroupGuid(@javax.annotation.Nullable String signerGroupGuid) { this.signerGroupGuid = signerGroupGuid; } - public SignatureRequestResponseSignatures signerEmailAddress(String signerEmailAddress) { + public SignatureRequestResponseSignatures signerEmailAddress( + @javax.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; return this; } @@ -187,11 +190,12 @@ public String getSignerEmailAddress() { @JsonProperty(JSON_PROPERTY_SIGNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerEmailAddress(String signerEmailAddress) { + public void setSignerEmailAddress(@javax.annotation.Nullable String signerEmailAddress) { this.signerEmailAddress = signerEmailAddress; } - public SignatureRequestResponseSignatures signerName(String signerName) { + public SignatureRequestResponseSignatures signerName( + @javax.annotation.Nullable String signerName) { this.signerName = signerName; return this; } @@ -209,11 +213,12 @@ public String getSignerName() { @JsonProperty(JSON_PROPERTY_SIGNER_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerName(String signerName) { + public void setSignerName(@javax.annotation.Nullable String signerName) { this.signerName = signerName; } - public SignatureRequestResponseSignatures signerRole(String signerRole) { + public SignatureRequestResponseSignatures signerRole( + @javax.annotation.Nullable String signerRole) { this.signerRole = signerRole; return this; } @@ -231,11 +236,11 @@ public String getSignerRole() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRole(String signerRole) { + public void setSignerRole(@javax.annotation.Nullable String signerRole) { this.signerRole = signerRole; } - public SignatureRequestResponseSignatures order(Integer order) { + public SignatureRequestResponseSignatures order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -253,11 +258,12 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public SignatureRequestResponseSignatures statusCode(String statusCode) { + public SignatureRequestResponseSignatures statusCode( + @javax.annotation.Nullable String statusCode) { this.statusCode = statusCode; return this; } @@ -275,11 +281,12 @@ public String getStatusCode() { @JsonProperty(JSON_PROPERTY_STATUS_CODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatusCode(String statusCode) { + public void setStatusCode(@javax.annotation.Nullable String statusCode) { this.statusCode = statusCode; } - public SignatureRequestResponseSignatures declineReason(String declineReason) { + public SignatureRequestResponseSignatures declineReason( + @javax.annotation.Nullable String declineReason) { this.declineReason = declineReason; return this; } @@ -297,11 +304,12 @@ public String getDeclineReason() { @JsonProperty(JSON_PROPERTY_DECLINE_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclineReason(String declineReason) { + public void setDeclineReason(@javax.annotation.Nullable String declineReason) { this.declineReason = declineReason; } - public SignatureRequestResponseSignatures signedAt(Integer signedAt) { + public SignatureRequestResponseSignatures signedAt( + @javax.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; return this; } @@ -319,11 +327,12 @@ public Integer getSignedAt() { @JsonProperty(JSON_PROPERTY_SIGNED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignedAt(Integer signedAt) { + public void setSignedAt(@javax.annotation.Nullable Integer signedAt) { this.signedAt = signedAt; } - public SignatureRequestResponseSignatures lastViewedAt(Integer lastViewedAt) { + public SignatureRequestResponseSignatures lastViewedAt( + @javax.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; return this; } @@ -341,11 +350,12 @@ public Integer getLastViewedAt() { @JsonProperty(JSON_PROPERTY_LAST_VIEWED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastViewedAt(Integer lastViewedAt) { + public void setLastViewedAt(@javax.annotation.Nullable Integer lastViewedAt) { this.lastViewedAt = lastViewedAt; } - public SignatureRequestResponseSignatures lastRemindedAt(Integer lastRemindedAt) { + public SignatureRequestResponseSignatures lastRemindedAt( + @javax.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; return this; } @@ -363,11 +373,11 @@ public Integer getLastRemindedAt() { @JsonProperty(JSON_PROPERTY_LAST_REMINDED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastRemindedAt(Integer lastRemindedAt) { + public void setLastRemindedAt(@javax.annotation.Nullable Integer lastRemindedAt) { this.lastRemindedAt = lastRemindedAt; } - public SignatureRequestResponseSignatures hasPin(Boolean hasPin) { + public SignatureRequestResponseSignatures hasPin(@javax.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; return this; } @@ -385,11 +395,12 @@ public Boolean getHasPin() { @JsonProperty(JSON_PROPERTY_HAS_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasPin(Boolean hasPin) { + public void setHasPin(@javax.annotation.Nullable Boolean hasPin) { this.hasPin = hasPin; } - public SignatureRequestResponseSignatures hasSmsAuth(Boolean hasSmsAuth) { + public SignatureRequestResponseSignatures hasSmsAuth( + @javax.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; return this; } @@ -407,11 +418,12 @@ public Boolean getHasSmsAuth() { @JsonProperty(JSON_PROPERTY_HAS_SMS_AUTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsAuth(Boolean hasSmsAuth) { + public void setHasSmsAuth(@javax.annotation.Nullable Boolean hasSmsAuth) { this.hasSmsAuth = hasSmsAuth; } - public SignatureRequestResponseSignatures hasSmsDelivery(Boolean hasSmsDelivery) { + public SignatureRequestResponseSignatures hasSmsDelivery( + @javax.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; return this; } @@ -429,11 +441,12 @@ public Boolean getHasSmsDelivery() { @JsonProperty(JSON_PROPERTY_HAS_SMS_DELIVERY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHasSmsDelivery(Boolean hasSmsDelivery) { + public void setHasSmsDelivery(@javax.annotation.Nullable Boolean hasSmsDelivery) { this.hasSmsDelivery = hasSmsDelivery; } - public SignatureRequestResponseSignatures smsPhoneNumber(String smsPhoneNumber) { + public SignatureRequestResponseSignatures smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -451,11 +464,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SignatureRequestResponseSignatures reassignedBy(String reassignedBy) { + public SignatureRequestResponseSignatures reassignedBy( + @javax.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; return this; } @@ -473,11 +487,12 @@ public String getReassignedBy() { @JsonProperty(JSON_PROPERTY_REASSIGNED_BY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedBy(String reassignedBy) { + public void setReassignedBy(@javax.annotation.Nullable String reassignedBy) { this.reassignedBy = reassignedBy; } - public SignatureRequestResponseSignatures reassignmentReason(String reassignmentReason) { + public SignatureRequestResponseSignatures reassignmentReason( + @javax.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; return this; } @@ -495,11 +510,12 @@ public String getReassignmentReason() { @JsonProperty(JSON_PROPERTY_REASSIGNMENT_REASON) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignmentReason(String reassignmentReason) { + public void setReassignmentReason(@javax.annotation.Nullable String reassignmentReason) { this.reassignmentReason = reassignmentReason; } - public SignatureRequestResponseSignatures reassignedFrom(String reassignedFrom) { + public SignatureRequestResponseSignatures reassignedFrom( + @javax.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; return this; } @@ -517,11 +533,11 @@ public String getReassignedFrom() { @JsonProperty(JSON_PROPERTY_REASSIGNED_FROM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReassignedFrom(String reassignedFrom) { + public void setReassignedFrom(@javax.annotation.Nullable String reassignedFrom) { this.reassignedFrom = reassignedFrom; } - public SignatureRequestResponseSignatures error(String error) { + public SignatureRequestResponseSignatures error(@javax.annotation.Nullable String error) { this.error = error; return this; } @@ -539,7 +555,7 @@ public String getError() { @JsonProperty(JSON_PROPERTY_ERROR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(String error) { + public void setError(@javax.annotation.Nullable String error) { this.error = error; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java index 06f7431dc..593bd0e84 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java @@ -61,82 +61,84 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendRequest { public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_GROUPED_SIGNERS = "grouped_signers"; - private List groupedSigners = null; + + @javax.annotation.Nullable private List groupedSigners = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; + @Deprecated @javax.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestSendRequest() {} @@ -156,7 +158,7 @@ public static SignatureRequestSendRequest init(HashMap data) throws Exception { SignatureRequestSendRequest.class); } - public SignatureRequestSendRequest files(List files) { + public SignatureRequestSendRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -183,11 +185,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendRequest fileUrls(List fileUrls) { + public SignatureRequestSendRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -214,11 +216,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public SignatureRequestSendRequest signers(List signers) { + public SignatureRequestSendRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -245,12 +248,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } public SignatureRequestSendRequest groupedSigners( - List groupedSigners) { + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; return this; } @@ -278,11 +281,13 @@ public List getGroupedSigners() { @JsonProperty(JSON_PROPERTY_GROUPED_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupedSigners(List groupedSigners) { + public void setGroupedSigners( + @javax.annotation.Nullable List groupedSigners) { this.groupedSigners = groupedSigners; } - public SignatureRequestSendRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -301,11 +306,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendRequest allowReassign(Boolean allowReassign) { + public SignatureRequestSendRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -325,11 +331,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public SignatureRequestSendRequest attachments(List attachments) { + public SignatureRequestSendRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -355,11 +362,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public SignatureRequestSendRequest ccEmailAddresses(List ccEmailAddresses) { + public SignatureRequestSendRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -385,11 +393,11 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public SignatureRequestSendRequest clientId(String clientId) { + public SignatureRequestSendRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -408,11 +416,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendRequest customFields(List customFields) { + public SignatureRequestSendRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -448,11 +457,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendRequest fieldOptions(SubFieldOptions fieldOptions) { + public SignatureRequestSendRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -470,11 +480,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public SignatureRequestSendRequest formFieldGroups(List formFieldGroups) { + public SignatureRequestSendRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -504,11 +515,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public SignatureRequestSendRequest formFieldRules(List formFieldRules) { + public SignatureRequestSendRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -534,12 +547,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public SignatureRequestSendRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -581,11 +595,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public SignatureRequestSendRequest hideTextTags(Boolean hideTextTags) { + public SignatureRequestSendRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -607,12 +623,13 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } @Deprecated - public SignatureRequestSendRequest isQualifiedSignature(Boolean isQualifiedSignature) { + public SignatureRequestSendRequest isQualifiedSignature( + @javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -637,11 +654,11 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendRequest isEid(Boolean isEid) { + public SignatureRequestSendRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -663,11 +680,11 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendRequest message(String message) { + public SignatureRequestSendRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -685,11 +702,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendRequest metadata(Map metadata) { + public SignatureRequestSendRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -719,11 +737,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public SignatureRequestSendRequest signingOptions(SubSigningOptions signingOptions) { + public SignatureRequestSendRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -741,11 +760,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -763,11 +783,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendRequest subject(String subject) { + public SignatureRequestSendRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -785,11 +805,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendRequest testMode(Boolean testMode) { + public SignatureRequestSendRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -808,11 +828,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendRequest title(String title) { + public SignatureRequestSendRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -830,11 +850,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public SignatureRequestSendRequest useTextTags(Boolean useTextTags) { + public SignatureRequestSendRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -854,11 +874,11 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public SignatureRequestSendRequest expiresAt(Integer expiresAt) { + public SignatureRequestSendRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -878,7 +898,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java index f8ae12ab6..d3031cab5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java @@ -52,55 +52,57 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNERS = "signers"; + + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_IS_QUALIFIED_SIGNATURE = "is_qualified_signature"; - @Deprecated private Boolean isQualifiedSignature = false; + @Deprecated @javax.annotation.Nullable private Boolean isQualifiedSignature = false; public static final String JSON_PROPERTY_IS_EID = "is_eid"; - private Boolean isEid = false; + @javax.annotation.Nullable private Boolean isEid = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public SignatureRequestSendWithTemplateRequest() {} @@ -121,7 +123,8 @@ public static SignatureRequestSendWithTemplateRequest init(HashMap data) throws SignatureRequestSendWithTemplateRequest.class); } - public SignatureRequestSendWithTemplateRequest templateIds(List templateIds) { + public SignatureRequestSendWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -149,12 +152,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } public SignatureRequestSendWithTemplateRequest signers( - List signers) { + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -182,11 +185,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nonnull List signers) { this.signers = signers; } - public SignatureRequestSendWithTemplateRequest allowDecline(Boolean allowDecline) { + public SignatureRequestSendWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -205,11 +210,11 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public SignatureRequestSendWithTemplateRequest ccs(List ccs) { + public SignatureRequestSendWithTemplateRequest ccs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -235,11 +240,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } - public SignatureRequestSendWithTemplateRequest clientId(String clientId) { + public SignatureRequestSendWithTemplateRequest clientId( + @javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -258,11 +264,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public SignatureRequestSendWithTemplateRequest customFields(List customFields) { + public SignatureRequestSendWithTemplateRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -290,11 +297,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SignatureRequestSendWithTemplateRequest files(List files) { + public SignatureRequestSendWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -321,11 +329,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public SignatureRequestSendWithTemplateRequest fileUrls(List fileUrls) { + public SignatureRequestSendWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -352,13 +361,13 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } @Deprecated public SignatureRequestSendWithTemplateRequest isQualifiedSignature( - Boolean isQualifiedSignature) { + @javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; return this; } @@ -383,11 +392,11 @@ public Boolean getIsQualifiedSignature() { @Deprecated @JsonProperty(JSON_PROPERTY_IS_QUALIFIED_SIGNATURE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsQualifiedSignature(Boolean isQualifiedSignature) { + public void setIsQualifiedSignature(@javax.annotation.Nullable Boolean isQualifiedSignature) { this.isQualifiedSignature = isQualifiedSignature; } - public SignatureRequestSendWithTemplateRequest isEid(Boolean isEid) { + public SignatureRequestSendWithTemplateRequest isEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; return this; } @@ -409,11 +418,12 @@ public Boolean getIsEid() { @JsonProperty(JSON_PROPERTY_IS_EID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEid(Boolean isEid) { + public void setIsEid(@javax.annotation.Nullable Boolean isEid) { this.isEid = isEid; } - public SignatureRequestSendWithTemplateRequest message(String message) { + public SignatureRequestSendWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -431,11 +441,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public SignatureRequestSendWithTemplateRequest metadata(Map metadata) { + public SignatureRequestSendWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -466,12 +477,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } public SignatureRequestSendWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -489,11 +500,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public SignatureRequestSendWithTemplateRequest signingRedirectUrl(String signingRedirectUrl) { + public SignatureRequestSendWithTemplateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -511,11 +523,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public SignatureRequestSendWithTemplateRequest subject(String subject) { + public SignatureRequestSendWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -533,11 +546,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public SignatureRequestSendWithTemplateRequest testMode(Boolean testMode) { + public SignatureRequestSendWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -556,11 +570,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public SignatureRequestSendWithTemplateRequest title(String title) { + public SignatureRequestSendWithTemplateRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -578,7 +592,7 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java index 348174d71..7aba8c6ca 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestUpdateRequest { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; - private String signatureId; + @javax.annotation.Nonnull private String signatureId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public SignatureRequestUpdateRequest() {} @@ -65,7 +65,7 @@ public static SignatureRequestUpdateRequest init(HashMap data) throws Exception SignatureRequestUpdateRequest.class); } - public SignatureRequestUpdateRequest signatureId(String signatureId) { + public SignatureRequestUpdateRequest signatureId(@javax.annotation.Nonnull String signatureId) { this.signatureId = signatureId; return this; } @@ -84,11 +84,12 @@ public String getSignatureId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignatureId(String signatureId) { + public void setSignatureId(@javax.annotation.Nonnull String signatureId) { this.signatureId = signatureId; } - public SignatureRequestUpdateRequest emailAddress(String emailAddress) { + public SignatureRequestUpdateRequest emailAddress( + @javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -107,11 +108,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public SignatureRequestUpdateRequest name(String name) { + public SignatureRequestUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -129,11 +130,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SignatureRequestUpdateRequest expiresAt(Integer expiresAt) { + public SignatureRequestUpdateRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -153,7 +154,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java index 80a59c963..2f6d42bed 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java @@ -36,16 +36,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubAttachment { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_SIGNER_INDEX = "signer_index"; - private Integer signerIndex; + @javax.annotation.Nonnull private Integer signerIndex; public static final String JSON_PROPERTY_INSTRUCTIONS = "instructions"; - private String instructions; + @javax.annotation.Nullable private String instructions; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; + @javax.annotation.Nullable private Boolean required = false; public SubAttachment() {} @@ -63,7 +63,7 @@ public static SubAttachment init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubAttachment.class); } - public SubAttachment name(String name) { + public SubAttachment name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -82,11 +82,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubAttachment signerIndex(Integer signerIndex) { + public SubAttachment signerIndex(@javax.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; return this; } @@ -106,11 +106,11 @@ public Integer getSignerIndex() { @JsonProperty(JSON_PROPERTY_SIGNER_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerIndex(Integer signerIndex) { + public void setSignerIndex(@javax.annotation.Nonnull Integer signerIndex) { this.signerIndex = signerIndex; } - public SubAttachment instructions(String instructions) { + public SubAttachment instructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; return this; } @@ -128,11 +128,11 @@ public String getInstructions() { @JsonProperty(JSON_PROPERTY_INSTRUCTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInstructions(String instructions) { + public void setInstructions(@javax.annotation.Nullable String instructions) { this.instructions = instructions; } - public SubAttachment required(Boolean required) { + public SubAttachment required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -150,7 +150,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index e857c2e64..f82e75ec7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerList { public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public SubBulkSignerList() {} @@ -57,7 +57,8 @@ public static SubBulkSignerList init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubBulkSignerList.class); } - public SubBulkSignerList customFields(List customFields) { + public SubBulkSignerList customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -83,11 +84,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public SubBulkSignerList signers(List signers) { + public SubBulkSignerList signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -115,7 +118,8 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nullable List signers) { this.signers = signers; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java index eb2ca9c7c..e05fe039e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerListCustomField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nonnull private String value; public SubBulkSignerListCustomField() {} @@ -57,7 +57,7 @@ public static SubBulkSignerListCustomField init(HashMap data) throws Exception { SubBulkSignerListCustomField.class); } - public SubBulkSignerListCustomField name(String name) { + public SubBulkSignerListCustomField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -76,11 +76,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubBulkSignerListCustomField value(String value) { + public SubBulkSignerListCustomField value(@javax.annotation.Nonnull String value) { this.value = value; return this; } @@ -99,7 +99,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nonnull String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java index e84808261..b34200891 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java @@ -31,10 +31,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubCC { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public SubCC() {} @@ -52,7 +52,7 @@ public static SubCC init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubCC.class); } - public SubCC role(String role) { + public SubCC role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -72,11 +72,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubCC emailAddress(String emailAddress) { + public SubCC emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -95,7 +95,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java index a9a7d92f1..ea29f97bc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java @@ -45,16 +45,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubCustomField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EDITOR = "editor"; - private String editor; + @javax.annotation.Nullable private String editor; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required = false; + @javax.annotation.Nullable private Boolean required = false; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public SubCustomField() {} @@ -72,7 +72,7 @@ public static SubCustomField init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubCustomField.class); } - public SubCustomField name(String name) { + public SubCustomField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -93,11 +93,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubCustomField editor(String editor) { + public SubCustomField editor(@javax.annotation.Nullable String editor) { this.editor = editor; return this; } @@ -121,11 +121,11 @@ public String getEditor() { @JsonProperty(JSON_PROPERTY_EDITOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditor(String editor) { + public void setEditor(@javax.annotation.Nullable String editor) { this.editor = editor; } - public SubCustomField required(Boolean required) { + public SubCustomField required(@javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -144,11 +144,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public SubCustomField value(String value) { + public SubCustomField value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -167,7 +167,7 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java index 6005ad4bd..1f7b46bfa 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubEditorOptions { public static final String JSON_PROPERTY_ALLOW_EDIT_SIGNERS = "allow_edit_signers"; - private Boolean allowEditSigners = false; + @javax.annotation.Nullable private Boolean allowEditSigners = false; public static final String JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS = "allow_edit_documents"; - private Boolean allowEditDocuments = false; + @javax.annotation.Nullable private Boolean allowEditDocuments = false; public SubEditorOptions() {} @@ -55,7 +55,7 @@ public static SubEditorOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubEditorOptions.class); } - public SubEditorOptions allowEditSigners(Boolean allowEditSigners) { + public SubEditorOptions allowEditSigners(@javax.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; return this; } @@ -73,11 +73,12 @@ public Boolean getAllowEditSigners() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditSigners(Boolean allowEditSigners) { + public void setAllowEditSigners(@javax.annotation.Nullable Boolean allowEditSigners) { this.allowEditSigners = allowEditSigners; } - public SubEditorOptions allowEditDocuments(Boolean allowEditDocuments) { + public SubEditorOptions allowEditDocuments( + @javax.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; return this; } @@ -95,7 +96,7 @@ public Boolean getAllowEditDocuments() { @JsonProperty(JSON_PROPERTY_ALLOW_EDIT_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowEditDocuments(Boolean allowEditDocuments) { + public void setAllowEditDocuments(@javax.annotation.Nullable Boolean allowEditDocuments) { this.allowEditDocuments = allowEditDocuments; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java index 80dabcc7e..fc13b344f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java @@ -38,17 +38,17 @@ public class SubFieldOptions { * higher. */ public enum DateFormatEnum { - MMDDYYYY("MM / DD / YYYY"), + MMDDYYYY(String.valueOf("MM / DD / YYYY")), - MM_DD_YYYY("MM - DD - YYYY"), + MM_DD_YYYY(String.valueOf("MM - DD - YYYY")), - DDMMYYYY("DD / MM / YYYY"), + DDMMYYYY(String.valueOf("DD / MM / YYYY")), - DD_MM_YYYY("DD - MM - YYYY"), + DD_MM_YYYY(String.valueOf("DD - MM - YYYY")), - YYYYMMDD("YYYY / MM / DD"), + YYYYMMDD(String.valueOf("YYYY / MM / DD")), - YYYY_MM_DD("YYYY - MM - DD"); + YYYY_MM_DD(String.valueOf("YYYY - MM - DD")); private String value; @@ -78,7 +78,7 @@ public static DateFormatEnum fromValue(String value) { } public static final String JSON_PROPERTY_DATE_FORMAT = "date_format"; - private DateFormatEnum dateFormat; + @javax.annotation.Nonnull private DateFormatEnum dateFormat; public SubFieldOptions() {} @@ -96,7 +96,7 @@ public static SubFieldOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFieldOptions.class); } - public SubFieldOptions dateFormat(DateFormatEnum dateFormat) { + public SubFieldOptions dateFormat(@javax.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; return this; } @@ -117,7 +117,7 @@ public DateFormatEnum getDateFormat() { @JsonProperty(JSON_PROPERTY_DATE_FORMAT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDateFormat(DateFormatEnum dateFormat) { + public void setDateFormat(@javax.annotation.Nonnull DateFormatEnum dateFormat) { this.dateFormat = dateFormat; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java index c4772c304..a43f8bbf0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldGroup { public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; + @javax.annotation.Nonnull private String groupId; public static final String JSON_PROPERTY_GROUP_LABEL = "group_label"; - private String groupLabel; + @javax.annotation.Nonnull private String groupLabel; public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; + @javax.annotation.Nonnull private String requirement; public SubFormFieldGroup() {} @@ -59,7 +59,7 @@ public static SubFormFieldGroup init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldGroup.class); } - public SubFormFieldGroup groupId(String groupId) { + public SubFormFieldGroup groupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; return this; } @@ -79,11 +79,11 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nonnull String groupId) { this.groupId = groupId; } - public SubFormFieldGroup groupLabel(String groupLabel) { + public SubFormFieldGroup groupLabel(@javax.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -102,11 +102,11 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@javax.annotation.Nonnull String groupLabel) { this.groupLabel = groupLabel; } - public SubFormFieldGroup requirement(String requirement) { + public SubFormFieldGroup requirement(@javax.annotation.Nonnull String requirement) { this.requirement = requirement; return this; } @@ -130,7 +130,7 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequirement(String requirement) { + public void setRequirement(@javax.annotation.Nonnull String requirement) { this.requirement = requirement; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java index 95a816532..c2c72d71a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java @@ -38,16 +38,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRule { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; public static final String JSON_PROPERTY_TRIGGER_OPERATOR = "trigger_operator"; - private String triggerOperator = "AND"; + @javax.annotation.Nonnull private String triggerOperator = "AND"; public static final String JSON_PROPERTY_TRIGGERS = "triggers"; - private List triggers = new ArrayList<>(); + @javax.annotation.Nonnull private List triggers = new ArrayList<>(); public static final String JSON_PROPERTY_ACTIONS = "actions"; - private List actions = new ArrayList<>(); + @javax.annotation.Nonnull private List actions = new ArrayList<>(); public SubFormFieldRule() {} @@ -65,7 +65,7 @@ public static SubFormFieldRule init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubFormFieldRule.class); } - public SubFormFieldRule id(String id) { + public SubFormFieldRule id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -84,11 +84,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRule triggerOperator(String triggerOperator) { + public SubFormFieldRule triggerOperator(@javax.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; return this; } @@ -107,11 +107,12 @@ public String getTriggerOperator() { @JsonProperty(JSON_PROPERTY_TRIGGER_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggerOperator(String triggerOperator) { + public void setTriggerOperator(@javax.annotation.Nonnull String triggerOperator) { this.triggerOperator = triggerOperator; } - public SubFormFieldRule triggers(List triggers) { + public SubFormFieldRule triggers( + @javax.annotation.Nonnull List triggers) { this.triggers = triggers; return this; } @@ -139,11 +140,12 @@ public List getTriggers() { @JsonProperty(JSON_PROPERTY_TRIGGERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTriggers(List triggers) { + public void setTriggers(@javax.annotation.Nonnull List triggers) { this.triggers = triggers; } - public SubFormFieldRule actions(List actions) { + public SubFormFieldRule actions( + @javax.annotation.Nonnull List actions) { this.actions = actions; return this; } @@ -171,7 +173,7 @@ public List getActions() { @JsonProperty(JSON_PROPERTY_ACTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setActions(List actions) { + public void setActions(@javax.annotation.Nonnull List actions) { this.actions = actions; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java index 2481678d9..a5186ec16 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java @@ -38,13 +38,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleAction { public static final String JSON_PROPERTY_HIDDEN = "hidden"; - private Boolean hidden; + @javax.annotation.Nonnull private Boolean hidden; /** Gets or Sets type */ public enum TypeEnum { - FIELD_VISIBILITY("change-field-visibility"), + FIELD_VISIBILITY(String.valueOf("change-field-visibility")), - GROUP_VISIBILITY("change-group-visibility"); + GROUP_VISIBILITY(String.valueOf("change-group-visibility")); private String value; @@ -74,13 +74,13 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FIELD_ID = "field_id"; - private String fieldId; + @javax.annotation.Nullable private String fieldId; public static final String JSON_PROPERTY_GROUP_ID = "group_id"; - private String groupId; + @javax.annotation.Nullable private String groupId; public SubFormFieldRuleAction() {} @@ -99,7 +99,7 @@ public static SubFormFieldRuleAction init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubFormFieldRuleAction.class); } - public SubFormFieldRuleAction hidden(Boolean hidden) { + public SubFormFieldRuleAction hidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; return this; } @@ -119,11 +119,11 @@ public Boolean getHidden() { @JsonProperty(JSON_PROPERTY_HIDDEN) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHidden(Boolean hidden) { + public void setHidden(@javax.annotation.Nonnull Boolean hidden) { this.hidden = hidden; } - public SubFormFieldRuleAction type(TypeEnum type) { + public SubFormFieldRuleAction type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -142,11 +142,11 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } - public SubFormFieldRuleAction fieldId(String fieldId) { + public SubFormFieldRuleAction fieldId(@javax.annotation.Nullable String fieldId) { this.fieldId = fieldId; return this; } @@ -166,11 +166,11 @@ public String getFieldId() { @JsonProperty(JSON_PROPERTY_FIELD_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldId(String fieldId) { + public void setFieldId(@javax.annotation.Nullable String fieldId) { this.fieldId = fieldId; } - public SubFormFieldRuleAction groupId(String groupId) { + public SubFormFieldRuleAction groupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; return this; } @@ -190,7 +190,7 @@ public String getGroupId() { @JsonProperty(JSON_PROPERTY_GROUP_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupId(String groupId) { + public void setGroupId(@javax.annotation.Nullable String groupId) { this.groupId = groupId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java index d56297a4d..114e7d810 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java @@ -40,7 +40,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleTrigger { public static final String JSON_PROPERTY_ID = "id"; - private String id; + @javax.annotation.Nonnull private String id; /** * Different field types allow different `operator` values: - Field type of **text**: @@ -53,15 +53,15 @@ public class SubFormFieldRuleTrigger { * match, single value */ public enum OperatorEnum { - ANY("any"), + ANY(String.valueOf("any")), - IS("is"), + IS(String.valueOf("is")), - MATCH("match"), + MATCH(String.valueOf("match")), - NONE("none"), + NONE(String.valueOf("none")), - NOT("not"); + NOT(String.valueOf("not")); private String value; @@ -91,13 +91,13 @@ public static OperatorEnum fromValue(String value) { } public static final String JSON_PROPERTY_OPERATOR = "operator"; - private OperatorEnum operator; + @javax.annotation.Nonnull private OperatorEnum operator; public static final String JSON_PROPERTY_VALUE = "value"; - private String value; + @javax.annotation.Nullable private String value; public static final String JSON_PROPERTY_VALUES = "values"; - private List values = null; + @javax.annotation.Nullable private List values = null; public SubFormFieldRuleTrigger() {} @@ -116,7 +116,7 @@ public static SubFormFieldRuleTrigger init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubFormFieldRuleTrigger.class); } - public SubFormFieldRuleTrigger id(String id) { + public SubFormFieldRuleTrigger id(@javax.annotation.Nonnull String id) { this.id = id; return this; } @@ -137,11 +137,11 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(String id) { + public void setId(@javax.annotation.Nonnull String id) { this.id = id; } - public SubFormFieldRuleTrigger operator(OperatorEnum operator) { + public SubFormFieldRuleTrigger operator(@javax.annotation.Nonnull OperatorEnum operator) { this.operator = operator; return this; } @@ -167,11 +167,11 @@ public OperatorEnum getOperator() { @JsonProperty(JSON_PROPERTY_OPERATOR) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOperator(OperatorEnum operator) { + public void setOperator(@javax.annotation.Nonnull OperatorEnum operator) { this.operator = operator; } - public SubFormFieldRuleTrigger value(String value) { + public SubFormFieldRuleTrigger value(@javax.annotation.Nullable String value) { this.value = value; return this; } @@ -193,11 +193,11 @@ public String getValue() { @JsonProperty(JSON_PROPERTY_VALUE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValue(String value) { + public void setValue(@javax.annotation.Nullable String value) { this.value = value; } - public SubFormFieldRuleTrigger values(List values) { + public SubFormFieldRuleTrigger values(@javax.annotation.Nullable List values) { this.values = values; return this; } @@ -224,7 +224,7 @@ public List getValues() { @JsonProperty(JSON_PROPERTY_VALUES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValues(List values) { + public void setValues(@javax.annotation.Nullable List values) { this.values = values; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java index 7b985bccc..98f14fc21 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java @@ -82,37 +82,37 @@ }) public class SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_DOCUMENT_INDEX = "document_index"; - private Integer documentIndex; + @javax.annotation.Nonnull private Integer documentIndex; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nonnull private String apiId; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nonnull private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nonnull private Boolean required; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nonnull private String signer; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nonnull private Integer width; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nonnull private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nonnull private Integer y; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_PAGE = "page"; - private Integer page; + @javax.annotation.Nullable private Integer page; public SubFormFieldsPerDocumentBase() {} @@ -132,7 +132,8 @@ public static SubFormFieldsPerDocumentBase init(HashMap data) throws Exception { SubFormFieldsPerDocumentBase.class); } - public SubFormFieldsPerDocumentBase documentIndex(Integer documentIndex) { + public SubFormFieldsPerDocumentBase documentIndex( + @javax.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; return this; } @@ -152,11 +153,11 @@ public Integer getDocumentIndex() { @JsonProperty(JSON_PROPERTY_DOCUMENT_INDEX) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDocumentIndex(Integer documentIndex) { + public void setDocumentIndex(@javax.annotation.Nonnull Integer documentIndex) { this.documentIndex = documentIndex; } - public SubFormFieldsPerDocumentBase apiId(String apiId) { + public SubFormFieldsPerDocumentBase apiId(@javax.annotation.Nonnull String apiId) { this.apiId = apiId; return this; } @@ -175,11 +176,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nonnull String apiId) { this.apiId = apiId; } - public SubFormFieldsPerDocumentBase height(Integer height) { + public SubFormFieldsPerDocumentBase height(@javax.annotation.Nonnull Integer height) { this.height = height; return this; } @@ -198,11 +199,11 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nonnull Integer height) { this.height = height; } - public SubFormFieldsPerDocumentBase required(Boolean required) { + public SubFormFieldsPerDocumentBase required(@javax.annotation.Nonnull Boolean required) { this.required = required; return this; } @@ -221,11 +222,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nonnull Boolean required) { this.required = required; } - public SubFormFieldsPerDocumentBase signer(String signer) { + public SubFormFieldsPerDocumentBase signer(@javax.annotation.Nonnull String signer) { this.signer = signer; return this; } @@ -252,7 +253,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nonnull String signer) { this.signer = signer; } @@ -260,7 +261,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public SubFormFieldsPerDocumentBase type(String type) { + public SubFormFieldsPerDocumentBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -279,11 +280,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentBase width(Integer width) { + public SubFormFieldsPerDocumentBase width(@javax.annotation.Nonnull Integer width) { this.width = width; return this; } @@ -302,11 +303,11 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nonnull Integer width) { this.width = width; } - public SubFormFieldsPerDocumentBase x(Integer x) { + public SubFormFieldsPerDocumentBase x(@javax.annotation.Nonnull Integer x) { this.x = x; return this; } @@ -325,11 +326,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nonnull Integer x) { this.x = x; } - public SubFormFieldsPerDocumentBase y(Integer y) { + public SubFormFieldsPerDocumentBase y(@javax.annotation.Nonnull Integer y) { this.y = y; return this; } @@ -348,11 +349,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nonnull Integer y) { this.y = y; } - public SubFormFieldsPerDocumentBase name(String name) { + public SubFormFieldsPerDocumentBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -370,11 +371,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SubFormFieldsPerDocumentBase page(Integer page) { + public SubFormFieldsPerDocumentBase page(@javax.annotation.Nullable Integer page) { this.page = page; return this; } @@ -395,7 +396,7 @@ public Integer getPage() { @JsonProperty(JSON_PROPERTY_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPage(Integer page) { + public void setPage(@javax.annotation.Nullable Integer page) { this.page = page; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java index d9e67248b..5b951c747 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java @@ -43,13 +43,13 @@ visible = true) public class SubFormFieldsPerDocumentCheckbox extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; + @javax.annotation.Nonnull private Boolean isChecked; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public SubFormFieldsPerDocumentCheckbox() {} @@ -69,7 +69,7 @@ public static SubFormFieldsPerDocumentCheckbox init(HashMap data) throws Excepti SubFormFieldsPerDocumentCheckbox.class); } - public SubFormFieldsPerDocumentCheckbox type(String type) { + public SubFormFieldsPerDocumentCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentCheckbox isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentCheckbox isChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -111,11 +111,11 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } - public SubFormFieldsPerDocumentCheckbox group(String group) { + public SubFormFieldsPerDocumentCheckbox group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -133,7 +133,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java index 0889539bd..81087ff09 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentCheckboxMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox-merge"; + @javax.annotation.Nonnull private String type = "checkbox-merge"; public SubFormFieldsPerDocumentCheckboxMerge() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentCheckboxMerge init(HashMap data) throws Ex SubFormFieldsPerDocumentCheckboxMerge.class); } - public SubFormFieldsPerDocumentCheckboxMerge type(String type) { + public SubFormFieldsPerDocumentCheckboxMerge type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -79,7 +79,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java index 83e5960aa..59236b57d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java @@ -45,41 +45,41 @@ visible = true) public class SubFormFieldsPerDocumentDateSigned extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -109,10 +109,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDateSigned() {} @@ -132,7 +132,7 @@ public static SubFormFieldsPerDocumentDateSigned init(HashMap data) throws Excep SubFormFieldsPerDocumentDateSigned.class); } - public SubFormFieldsPerDocumentDateSigned type(String type) { + public SubFormFieldsPerDocumentDateSigned type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -151,11 +151,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDateSigned fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDateSigned fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -173,11 +174,12 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDateSigned fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDateSigned fontSize( + @javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -197,7 +199,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java index 5089a091d..265d23c66 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java @@ -49,47 +49,47 @@ visible = true) public class SubFormFieldsPerDocumentDropdown extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_OPTIONS = "options"; - private List options = new ArrayList<>(); + @javax.annotation.Nonnull private List options = new ArrayList<>(); public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nullable private String content; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -119,10 +119,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentDropdown() {} @@ -142,7 +142,7 @@ public static SubFormFieldsPerDocumentDropdown init(HashMap data) throws Excepti SubFormFieldsPerDocumentDropdown.class); } - public SubFormFieldsPerDocumentDropdown type(String type) { + public SubFormFieldsPerDocumentDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -161,11 +161,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentDropdown options(List options) { + public SubFormFieldsPerDocumentDropdown options( + @javax.annotation.Nonnull List options) { this.options = options; return this; } @@ -192,11 +193,11 @@ public List getOptions() { @JsonProperty(JSON_PROPERTY_OPTIONS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOptions(List options) { + public void setOptions(@javax.annotation.Nonnull List options) { this.options = options; } - public SubFormFieldsPerDocumentDropdown content(String content) { + public SubFormFieldsPerDocumentDropdown content(@javax.annotation.Nullable String content) { this.content = content; return this; } @@ -214,11 +215,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentDropdown fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentDropdown fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -236,11 +238,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentDropdown fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentDropdown fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -260,7 +262,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java index c3b09b212..a269b6f59 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java @@ -47,47 +47,47 @@ visible = true) public class SubFormFieldsPerDocumentHyperlink extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nonnull private String content; public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; - private String contentUrl; + @javax.annotation.Nonnull private String contentUrl; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -117,10 +117,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentHyperlink() {} @@ -140,7 +140,7 @@ public static SubFormFieldsPerDocumentHyperlink init(HashMap data) throws Except SubFormFieldsPerDocumentHyperlink.class); } - public SubFormFieldsPerDocumentHyperlink type(String type) { + public SubFormFieldsPerDocumentHyperlink type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -159,11 +159,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentHyperlink content(String content) { + public SubFormFieldsPerDocumentHyperlink content(@javax.annotation.Nonnull String content) { this.content = content; return this; } @@ -182,11 +182,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nonnull String content) { this.content = content; } - public SubFormFieldsPerDocumentHyperlink contentUrl(String contentUrl) { + public SubFormFieldsPerDocumentHyperlink contentUrl( + @javax.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; return this; } @@ -205,11 +206,12 @@ public String getContentUrl() { @JsonProperty(JSON_PROPERTY_CONTENT_URL) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setContentUrl(String contentUrl) { + public void setContentUrl(@javax.annotation.Nonnull String contentUrl) { this.contentUrl = contentUrl; } - public SubFormFieldsPerDocumentHyperlink fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentHyperlink fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -227,11 +229,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentHyperlink fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentHyperlink fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -251,7 +253,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java index 4cb9a0519..55027194e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentInitials extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public SubFormFieldsPerDocumentInitials() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentInitials init(HashMap data) throws Excepti SubFormFieldsPerDocumentInitials.class); } - public SubFormFieldsPerDocumentInitials type(String type) { + public SubFormFieldsPerDocumentInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -78,7 +78,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java index f6837cfe1..e1ecbb851 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java @@ -43,13 +43,13 @@ visible = true) public class SubFormFieldsPerDocumentRadio extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public static final String JSON_PROPERTY_IS_CHECKED = "is_checked"; - private Boolean isChecked; + @javax.annotation.Nonnull private Boolean isChecked; public SubFormFieldsPerDocumentRadio() {} @@ -69,7 +69,7 @@ public static SubFormFieldsPerDocumentRadio init(HashMap data) throws Exception SubFormFieldsPerDocumentRadio.class); } - public SubFormFieldsPerDocumentRadio type(String type) { + public SubFormFieldsPerDocumentRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,11 +88,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentRadio group(String group) { + public SubFormFieldsPerDocumentRadio group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -111,11 +111,11 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } - public SubFormFieldsPerDocumentRadio isChecked(Boolean isChecked) { + public SubFormFieldsPerDocumentRadio isChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; return this; } @@ -135,7 +135,7 @@ public Boolean getIsChecked() { @JsonProperty(JSON_PROPERTY_IS_CHECKED) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsChecked(Boolean isChecked) { + public void setIsChecked(@javax.annotation.Nonnull Boolean isChecked) { this.isChecked = isChecked; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java index 4c3019c99..7786f29c6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java @@ -39,7 +39,7 @@ visible = true) public class SubFormFieldsPerDocumentSignature extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public SubFormFieldsPerDocumentSignature() {} @@ -59,7 +59,7 @@ public static SubFormFieldsPerDocumentSignature init(HashMap data) throws Except SubFormFieldsPerDocumentSignature.class); } - public SubFormFieldsPerDocumentSignature type(String type) { + public SubFormFieldsPerDocumentSignature type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -78,7 +78,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java index 31ab41161..bb266b107 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java @@ -53,19 +53,19 @@ visible = true) public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_PLACEHOLDER = "placeholder"; - private String placeholder; + @javax.annotation.Nullable private String placeholder; public static final String JSON_PROPERTY_AUTO_FILL_TYPE = "auto_fill_type"; - private String autoFillType; + @javax.annotation.Nullable private String autoFillType; public static final String JSON_PROPERTY_LINK_ID = "link_id"; - private String linkId; + @javax.annotation.Nullable private String linkId; public static final String JSON_PROPERTY_MASKED = "masked"; - private Boolean masked; + @javax.annotation.Nullable private Boolean masked; /** * Each text field may contain a `validation_type` parameter. Check out the list of @@ -76,25 +76,25 @@ public class SubFormFieldsPerDocumentText extends SubFormFieldsPerDocumentBase { * case of an invalid value. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -124,51 +124,51 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; + @javax.annotation.Nullable private ValidationTypeEnum validationType; public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX = "validation_custom_regex"; - private String validationCustomRegex; + @javax.annotation.Nullable private String validationCustomRegex; public static final String JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL = "validation_custom_regex_format_label"; - private String validationCustomRegexFormatLabel; + @javax.annotation.Nullable private String validationCustomRegexFormatLabel; public static final String JSON_PROPERTY_CONTENT = "content"; - private String content; + @javax.annotation.Nullable private String content; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -198,10 +198,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentText() {} @@ -221,7 +221,7 @@ public static SubFormFieldsPerDocumentText init(HashMap data) throws Exception { SubFormFieldsPerDocumentText.class); } - public SubFormFieldsPerDocumentText type(String type) { + public SubFormFieldsPerDocumentText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -240,11 +240,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentText placeholder(String placeholder) { + public SubFormFieldsPerDocumentText placeholder(@javax.annotation.Nullable String placeholder) { this.placeholder = placeholder; return this; } @@ -262,11 +262,12 @@ public String getPlaceholder() { @JsonProperty(JSON_PROPERTY_PLACEHOLDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPlaceholder(String placeholder) { + public void setPlaceholder(@javax.annotation.Nullable String placeholder) { this.placeholder = placeholder; } - public SubFormFieldsPerDocumentText autoFillType(String autoFillType) { + public SubFormFieldsPerDocumentText autoFillType( + @javax.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; return this; } @@ -285,11 +286,11 @@ public String getAutoFillType() { @JsonProperty(JSON_PROPERTY_AUTO_FILL_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAutoFillType(String autoFillType) { + public void setAutoFillType(@javax.annotation.Nullable String autoFillType) { this.autoFillType = autoFillType; } - public SubFormFieldsPerDocumentText linkId(String linkId) { + public SubFormFieldsPerDocumentText linkId(@javax.annotation.Nullable String linkId) { this.linkId = linkId; return this; } @@ -308,11 +309,11 @@ public String getLinkId() { @JsonProperty(JSON_PROPERTY_LINK_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkId(String linkId) { + public void setLinkId(@javax.annotation.Nullable String linkId) { this.linkId = linkId; } - public SubFormFieldsPerDocumentText masked(Boolean masked) { + public SubFormFieldsPerDocumentText masked(@javax.annotation.Nullable Boolean masked) { this.masked = masked; return this; } @@ -332,11 +333,12 @@ public Boolean getMasked() { @JsonProperty(JSON_PROPERTY_MASKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMasked(Boolean masked) { + public void setMasked(@javax.annotation.Nullable Boolean masked) { this.masked = masked; } - public SubFormFieldsPerDocumentText validationType(ValidationTypeEnum validationType) { + public SubFormFieldsPerDocumentText validationType( + @javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -359,11 +361,12 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public SubFormFieldsPerDocumentText validationCustomRegex(String validationCustomRegex) { + public SubFormFieldsPerDocumentText validationCustomRegex( + @javax.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; return this; } @@ -381,12 +384,12 @@ public String getValidationCustomRegex() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegex(String validationCustomRegex) { + public void setValidationCustomRegex(@javax.annotation.Nullable String validationCustomRegex) { this.validationCustomRegex = validationCustomRegex; } public SubFormFieldsPerDocumentText validationCustomRegexFormatLabel( - String validationCustomRegexFormatLabel) { + @javax.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; return this; } @@ -404,11 +407,12 @@ public String getValidationCustomRegexFormatLabel() { @JsonProperty(JSON_PROPERTY_VALIDATION_CUSTOM_REGEX_FORMAT_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationCustomRegexFormatLabel(String validationCustomRegexFormatLabel) { + public void setValidationCustomRegexFormatLabel( + @javax.annotation.Nullable String validationCustomRegexFormatLabel) { this.validationCustomRegexFormatLabel = validationCustomRegexFormatLabel; } - public SubFormFieldsPerDocumentText content(String content) { + public SubFormFieldsPerDocumentText content(@javax.annotation.Nullable String content) { this.content = content; return this; } @@ -426,11 +430,12 @@ public String getContent() { @JsonProperty(JSON_PROPERTY_CONTENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setContent(String content) { + public void setContent(@javax.annotation.Nullable String content) { this.content = content; } - public SubFormFieldsPerDocumentText fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentText fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -448,11 +453,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentText fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentText fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -472,7 +477,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java index 833bfc7f4..d402eb058 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java @@ -45,41 +45,41 @@ visible = true) public class SubFormFieldsPerDocumentTextMerge extends SubFormFieldsPerDocumentBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text-merge"; + @javax.annotation.Nonnull private String type = "text-merge"; /** Font family for the field. */ public enum FontFamilyEnum { - HELVETICA("helvetica"), + HELVETICA(String.valueOf("helvetica")), - ARIAL("arial"), + ARIAL(String.valueOf("arial")), - COURIER("courier"), + COURIER(String.valueOf("courier")), - CALIBRI("calibri"), + CALIBRI(String.valueOf("calibri")), - CAMBRIA("cambria"), + CAMBRIA(String.valueOf("cambria")), - GEORGIA("georgia"), + GEORGIA(String.valueOf("georgia")), - TIMES("times"), + TIMES(String.valueOf("times")), - TREBUCHET("trebuchet"), + TREBUCHET(String.valueOf("trebuchet")), - VERDANA("verdana"), + VERDANA(String.valueOf("verdana")), - ROBOTO("roboto"), + ROBOTO(String.valueOf("roboto")), - ROBOTO_MONO("robotoMono"), + ROBOTO_MONO(String.valueOf("robotoMono")), - NOTO_SANS("notoSans"), + NOTO_SANS(String.valueOf("notoSans")), - NOTO_SERIF("notoSerif"), + NOTO_SERIF(String.valueOf("notoSerif")), - NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + NOTO_CJK_JP_REGULAR(String.valueOf("notoCJK-JP-Regular")), - NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + NOTO_HEBREW_REGULAR(String.valueOf("notoHebrew-Regular")), - NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + NOTO_SAN_THAI_MERGED(String.valueOf("notoSanThaiMerged")); private String value; @@ -109,10 +109,10 @@ public static FontFamilyEnum fromValue(String value) { } public static final String JSON_PROPERTY_FONT_FAMILY = "font_family"; - private FontFamilyEnum fontFamily; + @javax.annotation.Nullable private FontFamilyEnum fontFamily; public static final String JSON_PROPERTY_FONT_SIZE = "font_size"; - private Integer fontSize = 12; + @javax.annotation.Nullable private Integer fontSize = 12; public SubFormFieldsPerDocumentTextMerge() {} @@ -132,7 +132,7 @@ public static SubFormFieldsPerDocumentTextMerge init(HashMap data) throws Except SubFormFieldsPerDocumentTextMerge.class); } - public SubFormFieldsPerDocumentTextMerge type(String type) { + public SubFormFieldsPerDocumentTextMerge type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -152,11 +152,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public SubFormFieldsPerDocumentTextMerge fontFamily(FontFamilyEnum fontFamily) { + public SubFormFieldsPerDocumentTextMerge fontFamily( + @javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; return this; } @@ -174,11 +175,11 @@ public FontFamilyEnum getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(FontFamilyEnum fontFamily) { + public void setFontFamily(@javax.annotation.Nullable FontFamilyEnum fontFamily) { this.fontFamily = fontFamily; } - public SubFormFieldsPerDocumentTextMerge fontSize(Integer fontSize) { + public SubFormFieldsPerDocumentTextMerge fontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; return this; } @@ -198,7 +199,7 @@ public Integer getFontSize() { @JsonProperty(JSON_PROPERTY_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontSize(Integer fontSize) { + public void setFontSize(@javax.annotation.Nullable Integer fontSize) { this.fontSize = fontSize; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java index 53accb1a1..4a103e412 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java @@ -33,13 +33,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubMergeField { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; /** The type of merge field. */ public enum TypeEnum { - TEXT("text"), + TEXT(String.valueOf("text")), - CHECKBOX("checkbox"); + CHECKBOX(String.valueOf("checkbox")); private String value; @@ -69,7 +69,7 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public SubMergeField() {} @@ -87,7 +87,7 @@ public static SubMergeField init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubMergeField.class); } - public SubMergeField name(String name) { + public SubMergeField name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -106,11 +106,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubMergeField type(TypeEnum type) { + public SubMergeField type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -129,7 +129,7 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java index 015efbcb4..26e6fccd7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java @@ -35,25 +35,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; - private String callbackUrl; + @javax.annotation.Nullable private String callbackUrl; /** Gets or Sets scopes */ public enum ScopesEnum { - REQUEST_SIGNATURE("request_signature"), + REQUEST_SIGNATURE(String.valueOf("request_signature")), - BASIC_ACCOUNT_INFO("basic_account_info"), + BASIC_ACCOUNT_INFO(String.valueOf("basic_account_info")), - ACCOUNT_ACCESS("account_access"), + ACCOUNT_ACCESS(String.valueOf("account_access")), - SIGNATURE_REQUEST_ACCESS("signature_request_access"), + SIGNATURE_REQUEST_ACCESS(String.valueOf("signature_request_access")), - TEMPLATE_ACCESS("template_access"), + TEMPLATE_ACCESS(String.valueOf("template_access")), - TEAM_ACCESS("team_access"), + TEAM_ACCESS(String.valueOf("team_access")), - API_APP_ACCESS("api_app_access"), + API_APP_ACCESS(String.valueOf("api_app_access")), - EMPTY(""); + EMPTY(String.valueOf("")); private String value; @@ -83,7 +83,7 @@ public static ScopesEnum fromValue(String value) { } public static final String JSON_PROPERTY_SCOPES = "scopes"; - private List scopes = null; + @javax.annotation.Nullable private List scopes = null; public SubOAuth() {} @@ -101,7 +101,7 @@ public static SubOAuth init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubOAuth.class); } - public SubOAuth callbackUrl(String callbackUrl) { + public SubOAuth callbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; return this; } @@ -120,11 +120,11 @@ public String getCallbackUrl() { @JsonProperty(JSON_PROPERTY_CALLBACK_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCallbackUrl(String callbackUrl) { + public void setCallbackUrl(@javax.annotation.Nullable String callbackUrl) { this.callbackUrl = callbackUrl; } - public SubOAuth scopes(List scopes) { + public SubOAuth scopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; return this; } @@ -151,7 +151,7 @@ public List getScopes() { @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScopes(List scopes) { + public void setScopes(@javax.annotation.Nullable List scopes) { this.scopes = scopes; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java index c172a1be1..a651efadf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; - private Boolean canInsertEverywhere = false; + @javax.annotation.Nullable private Boolean canInsertEverywhere = false; public SubOptions() {} @@ -49,7 +49,7 @@ public static SubOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubOptions.class); } - public SubOptions canInsertEverywhere(Boolean canInsertEverywhere) { + public SubOptions canInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; return this; } @@ -67,7 +67,7 @@ public Boolean getCanInsertEverywhere() { @JsonProperty(JSON_PROPERTY_CAN_INSERT_EVERYWHERE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanInsertEverywhere(Boolean canInsertEverywhere) { + public void setCanInsertEverywhere(@javax.annotation.Nullable Boolean canInsertEverywhere) { this.canInsertEverywhere = canInsertEverywhere; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java index e6c28a56a..7ec7f0d77 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestGroupedSigners { public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = new ArrayList<>(); + @javax.annotation.Nonnull private List signers = new ArrayList<>(); public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubSignatureRequestGroupedSigners() {} @@ -63,7 +63,7 @@ public static SubSignatureRequestGroupedSigners init(HashMap data) throws Except SubSignatureRequestGroupedSigners.class); } - public SubSignatureRequestGroupedSigners group(String group) { + public SubSignatureRequestGroupedSigners group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -82,11 +82,12 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } - public SubSignatureRequestGroupedSigners signers(List signers) { + public SubSignatureRequestGroupedSigners signers( + @javax.annotation.Nonnull List signers) { this.signers = signers; return this; } @@ -115,11 +116,11 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nonnull List signers) { this.signers = signers; } - public SubSignatureRequestGroupedSigners order(Integer order) { + public SubSignatureRequestGroupedSigners order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -138,7 +139,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java index a110601e8..2c3604017 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java @@ -40,19 +40,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestSigner { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; + @javax.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default @@ -61,9 +61,9 @@ public class SubSignatureRequestSigner { * the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -93,7 +93,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; + @javax.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestSigner() {} @@ -113,7 +113,7 @@ public static SubSignatureRequestSigner init(HashMap data) throws Exception { SubSignatureRequestSigner.class); } - public SubSignatureRequestSigner name(String name) { + public SubSignatureRequestSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -132,11 +132,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestSigner emailAddress(String emailAddress) { + public SubSignatureRequestSigner emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -155,11 +155,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestSigner order(Integer order) { + public SubSignatureRequestSigner order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -177,11 +177,11 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } - public SubSignatureRequestSigner pin(String pin) { + public SubSignatureRequestSigner pin(@javax.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -199,11 +199,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@javax.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestSigner smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -226,11 +227,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } - public SubSignatureRequestSigner smsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public SubSignatureRequestSigner smsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -251,7 +253,8 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java index 1c2b9ee34..d9782dc3f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java @@ -40,19 +40,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_PIN = "pin"; - private String pin; + @javax.annotation.Nullable private String pin; public static final String JSON_PROPERTY_SMS_PHONE_NUMBER = "sms_phone_number"; - private String smsPhoneNumber; + @javax.annotation.Nullable private String smsPhoneNumber; /** * Specifies the feature used with the `sms_phone_number`. Default @@ -61,9 +61,9 @@ public class SubSignatureRequestTemplateSigner { * the signature request is delivered via SMS (_and_ email). */ public enum SmsPhoneNumberTypeEnum { - AUTHENTICATION("authentication"), + AUTHENTICATION(String.valueOf("authentication")), - DELIVERY("delivery"); + DELIVERY(String.valueOf("delivery")); private String value; @@ -93,7 +93,7 @@ public static SmsPhoneNumberTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE = "sms_phone_number_type"; - private SmsPhoneNumberTypeEnum smsPhoneNumberType; + @javax.annotation.Nullable private SmsPhoneNumberTypeEnum smsPhoneNumberType; public SubSignatureRequestTemplateSigner() {} @@ -113,7 +113,7 @@ public static SubSignatureRequestTemplateSigner init(HashMap data) throws Except SubSignatureRequestTemplateSigner.class); } - public SubSignatureRequestTemplateSigner role(String role) { + public SubSignatureRequestTemplateSigner role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -132,11 +132,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubSignatureRequestTemplateSigner name(String name) { + public SubSignatureRequestTemplateSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -155,11 +155,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubSignatureRequestTemplateSigner emailAddress(String emailAddress) { + public SubSignatureRequestTemplateSigner emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -178,11 +179,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubSignatureRequestTemplateSigner pin(String pin) { + public SubSignatureRequestTemplateSigner pin(@javax.annotation.Nullable String pin) { this.pin = pin; return this; } @@ -200,11 +201,12 @@ public String getPin() { @JsonProperty(JSON_PROPERTY_PIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPin(String pin) { + public void setPin(@javax.annotation.Nullable String pin) { this.pin = pin; } - public SubSignatureRequestTemplateSigner smsPhoneNumber(String smsPhoneNumber) { + public SubSignatureRequestTemplateSigner smsPhoneNumber( + @javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; return this; } @@ -227,12 +229,12 @@ public String getSmsPhoneNumber() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumber(String smsPhoneNumber) { + public void setSmsPhoneNumber(@javax.annotation.Nullable String smsPhoneNumber) { this.smsPhoneNumber = smsPhoneNumber; } public SubSignatureRequestTemplateSigner smsPhoneNumberType( - SmsPhoneNumberTypeEnum smsPhoneNumberType) { + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; return this; } @@ -253,7 +255,8 @@ public SmsPhoneNumberTypeEnum getSmsPhoneNumberType() { @JsonProperty(JSON_PROPERTY_SMS_PHONE_NUMBER_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsPhoneNumberType(SmsPhoneNumberTypeEnum smsPhoneNumberType) { + public void setSmsPhoneNumberType( + @javax.annotation.Nullable SmsPhoneNumberTypeEnum smsPhoneNumberType) { this.smsPhoneNumberType = smsPhoneNumberType; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java index c1be71eed..1b87e61c7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java @@ -44,13 +44,13 @@ public class SubSigningOptions { /** The default type shown (limited to the listed types) */ public enum DefaultTypeEnum { - DRAW("draw"), + DRAW(String.valueOf("draw")), - PHONE("phone"), + PHONE(String.valueOf("phone")), - TYPE("type"), + TYPE(String.valueOf("type")), - UPLOAD("upload"); + UPLOAD(String.valueOf("upload")); private String value; @@ -80,19 +80,19 @@ public static DefaultTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_DEFAULT_TYPE = "default_type"; - private DefaultTypeEnum defaultType; + @javax.annotation.Nonnull private DefaultTypeEnum defaultType; public static final String JSON_PROPERTY_DRAW = "draw"; - private Boolean draw = false; + @javax.annotation.Nullable private Boolean draw = false; public static final String JSON_PROPERTY_PHONE = "phone"; - private Boolean phone = false; + @javax.annotation.Nullable private Boolean phone = false; public static final String JSON_PROPERTY_TYPE = "type"; - private Boolean type = false; + @javax.annotation.Nullable private Boolean type = false; public static final String JSON_PROPERTY_UPLOAD = "upload"; - private Boolean upload = false; + @javax.annotation.Nullable private Boolean upload = false; public SubSigningOptions() {} @@ -110,7 +110,7 @@ public static SubSigningOptions init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubSigningOptions.class); } - public SubSigningOptions defaultType(DefaultTypeEnum defaultType) { + public SubSigningOptions defaultType(@javax.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; return this; } @@ -129,11 +129,11 @@ public DefaultTypeEnum getDefaultType() { @JsonProperty(JSON_PROPERTY_DEFAULT_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDefaultType(DefaultTypeEnum defaultType) { + public void setDefaultType(@javax.annotation.Nonnull DefaultTypeEnum defaultType) { this.defaultType = defaultType; } - public SubSigningOptions draw(Boolean draw) { + public SubSigningOptions draw(@javax.annotation.Nullable Boolean draw) { this.draw = draw; return this; } @@ -151,11 +151,11 @@ public Boolean getDraw() { @JsonProperty(JSON_PROPERTY_DRAW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDraw(Boolean draw) { + public void setDraw(@javax.annotation.Nullable Boolean draw) { this.draw = draw; } - public SubSigningOptions phone(Boolean phone) { + public SubSigningOptions phone(@javax.annotation.Nullable Boolean phone) { this.phone = phone; return this; } @@ -173,11 +173,11 @@ public Boolean getPhone() { @JsonProperty(JSON_PROPERTY_PHONE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(Boolean phone) { + public void setPhone(@javax.annotation.Nullable Boolean phone) { this.phone = phone; } - public SubSigningOptions type(Boolean type) { + public SubSigningOptions type(@javax.annotation.Nullable Boolean type) { this.type = type; return this; } @@ -195,11 +195,11 @@ public Boolean getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(Boolean type) { + public void setType(@javax.annotation.Nullable Boolean type) { this.type = type; } - public SubSigningOptions upload(Boolean upload) { + public SubSigningOptions upload(@javax.annotation.Nullable Boolean upload) { this.upload = upload; return this; } @@ -217,7 +217,7 @@ public Boolean getUpload() { @JsonProperty(JSON_PROPERTY_UPLOAD) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpload(Boolean upload) { + public void setUpload(@javax.annotation.Nullable Boolean upload) { this.upload = upload; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java index 359c32a6c..512878e62 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java @@ -31,10 +31,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubTeamResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public SubTeamResponse() {} @@ -52,7 +52,7 @@ public static SubTeamResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubTeamResponse.class); } - public SubTeamResponse teamId(String teamId) { + public SubTeamResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -70,11 +70,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public SubTeamResponse name(String name) { + public SubTeamResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -92,7 +92,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java index 78413aade..dba1d74cc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java @@ -31,10 +31,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubTemplateRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubTemplateRole() {} @@ -52,7 +52,7 @@ public static SubTemplateRole init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), SubTemplateRole.class); } - public SubTemplateRole name(String name) { + public SubTemplateRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -71,11 +71,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public SubTemplateRole order(Integer order) { + public SubTemplateRole order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -93,7 +93,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java index 0118049aa..c6c5a251c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftSigner { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public SubUnclaimedDraftSigner() {} @@ -60,7 +60,7 @@ public static SubUnclaimedDraftSigner init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubUnclaimedDraftSigner.class); } - public SubUnclaimedDraftSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftSigner emailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -79,11 +79,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } - public SubUnclaimedDraftSigner name(String name) { + public SubUnclaimedDraftSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -102,11 +102,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftSigner order(Integer order) { + public SubUnclaimedDraftSigner order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -124,7 +124,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java index 58128a75e..afc82b889 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nonnull private String role; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nonnull private String name; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nonnull private String emailAddress; public SubUnclaimedDraftTemplateSigner() {} @@ -61,7 +61,7 @@ public static SubUnclaimedDraftTemplateSigner init(HashMap data) throws Exceptio SubUnclaimedDraftTemplateSigner.class); } - public SubUnclaimedDraftTemplateSigner role(String role) { + public SubUnclaimedDraftTemplateSigner role(@javax.annotation.Nonnull String role) { this.role = role; return this; } @@ -80,11 +80,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nonnull String role) { this.role = role; } - public SubUnclaimedDraftTemplateSigner name(String name) { + public SubUnclaimedDraftTemplateSigner name(@javax.annotation.Nonnull String name) { this.name = name; return this; } @@ -103,11 +103,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(String name) { + public void setName(@javax.annotation.Nonnull String name) { this.name = name; } - public SubUnclaimedDraftTemplateSigner emailAddress(String emailAddress) { + public SubUnclaimedDraftTemplateSigner emailAddress( + @javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -126,7 +127,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nonnull String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java index 2737e1b6d..e96eb6adb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java @@ -53,13 +53,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; - private String headerBackgroundColor = "#1a1a1a"; + @javax.annotation.Nullable private String headerBackgroundColor = "#1a1a1a"; /** Gets or Sets legalVersion */ public enum LegalVersionEnum { - TERMS1("terms1"), + TERMS1(String.valueOf("terms1")), - TERMS2("terms2"); + TERMS2(String.valueOf("terms2")); private String value; @@ -89,52 +89,52 @@ public static LegalVersionEnum fromValue(String value) { } public static final String JSON_PROPERTY_LEGAL_VERSION = "legal_version"; - private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; + @javax.annotation.Nullable private LegalVersionEnum legalVersion = LegalVersionEnum.TERMS1; public static final String JSON_PROPERTY_LINK_COLOR = "link_color"; - private String linkColor = "#0061FE"; + @javax.annotation.Nullable private String linkColor = "#0061FE"; public static final String JSON_PROPERTY_PAGE_BACKGROUND_COLOR = "page_background_color"; - private String pageBackgroundColor = "#f7f8f9"; + @javax.annotation.Nullable private String pageBackgroundColor = "#f7f8f9"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR = "primary_button_color"; - private String primaryButtonColor = "#0061FE"; + @javax.annotation.Nullable private String primaryButtonColor = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER = "primary_button_color_hover"; - private String primaryButtonColorHover = "#0061FE"; + @javax.annotation.Nullable private String primaryButtonColorHover = "#0061FE"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR = "primary_button_text_color"; - private String primaryButtonTextColor = "#ffffff"; + @javax.annotation.Nullable private String primaryButtonTextColor = "#ffffff"; public static final String JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER = "primary_button_text_color_hover"; - private String primaryButtonTextColorHover = "#ffffff"; + @javax.annotation.Nullable private String primaryButtonTextColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR = "secondary_button_color"; - private String secondaryButtonColor = "#ffffff"; + @javax.annotation.Nullable private String secondaryButtonColor = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER = "secondary_button_color_hover"; - private String secondaryButtonColorHover = "#ffffff"; + @javax.annotation.Nullable private String secondaryButtonColorHover = "#ffffff"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR = "secondary_button_text_color"; - private String secondaryButtonTextColor = "#0061FE"; + @javax.annotation.Nullable private String secondaryButtonTextColor = "#0061FE"; public static final String JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER = "secondary_button_text_color_hover"; - private String secondaryButtonTextColorHover = "#0061FE"; + @javax.annotation.Nullable private String secondaryButtonTextColorHover = "#0061FE"; public static final String JSON_PROPERTY_TEXT_COLOR1 = "text_color1"; - private String textColor1 = "#808080"; + @javax.annotation.Nullable private String textColor1 = "#808080"; public static final String JSON_PROPERTY_TEXT_COLOR2 = "text_color2"; - private String textColor2 = "#ffffff"; + @javax.annotation.Nullable private String textColor2 = "#ffffff"; public static final String JSON_PROPERTY_RESET_TO_DEFAULT = "reset_to_default"; - private Boolean resetToDefault; + @javax.annotation.Nullable private Boolean resetToDefault; public SubWhiteLabelingOptions() {} @@ -153,7 +153,8 @@ public static SubWhiteLabelingOptions init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), SubWhiteLabelingOptions.class); } - public SubWhiteLabelingOptions headerBackgroundColor(String headerBackgroundColor) { + public SubWhiteLabelingOptions headerBackgroundColor( + @javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; return this; } @@ -171,11 +172,12 @@ public String getHeaderBackgroundColor() { @JsonProperty(JSON_PROPERTY_HEADER_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeaderBackgroundColor(String headerBackgroundColor) { + public void setHeaderBackgroundColor(@javax.annotation.Nullable String headerBackgroundColor) { this.headerBackgroundColor = headerBackgroundColor; } - public SubWhiteLabelingOptions legalVersion(LegalVersionEnum legalVersion) { + public SubWhiteLabelingOptions legalVersion( + @javax.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; return this; } @@ -193,11 +195,11 @@ public LegalVersionEnum getLegalVersion() { @JsonProperty(JSON_PROPERTY_LEGAL_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalVersion(LegalVersionEnum legalVersion) { + public void setLegalVersion(@javax.annotation.Nullable LegalVersionEnum legalVersion) { this.legalVersion = legalVersion; } - public SubWhiteLabelingOptions linkColor(String linkColor) { + public SubWhiteLabelingOptions linkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; return this; } @@ -215,11 +217,12 @@ public String getLinkColor() { @JsonProperty(JSON_PROPERTY_LINK_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkColor(String linkColor) { + public void setLinkColor(@javax.annotation.Nullable String linkColor) { this.linkColor = linkColor; } - public SubWhiteLabelingOptions pageBackgroundColor(String pageBackgroundColor) { + public SubWhiteLabelingOptions pageBackgroundColor( + @javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; return this; } @@ -237,11 +240,12 @@ public String getPageBackgroundColor() { @JsonProperty(JSON_PROPERTY_PAGE_BACKGROUND_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPageBackgroundColor(String pageBackgroundColor) { + public void setPageBackgroundColor(@javax.annotation.Nullable String pageBackgroundColor) { this.pageBackgroundColor = pageBackgroundColor; } - public SubWhiteLabelingOptions primaryButtonColor(String primaryButtonColor) { + public SubWhiteLabelingOptions primaryButtonColor( + @javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; return this; } @@ -259,11 +263,12 @@ public String getPrimaryButtonColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColor(String primaryButtonColor) { + public void setPrimaryButtonColor(@javax.annotation.Nullable String primaryButtonColor) { this.primaryButtonColor = primaryButtonColor; } - public SubWhiteLabelingOptions primaryButtonColorHover(String primaryButtonColorHover) { + public SubWhiteLabelingOptions primaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; return this; } @@ -281,11 +286,13 @@ public String getPrimaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonColorHover(String primaryButtonColorHover) { + public void setPrimaryButtonColorHover( + @javax.annotation.Nullable String primaryButtonColorHover) { this.primaryButtonColorHover = primaryButtonColorHover; } - public SubWhiteLabelingOptions primaryButtonTextColor(String primaryButtonTextColor) { + public SubWhiteLabelingOptions primaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; return this; } @@ -303,11 +310,13 @@ public String getPrimaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColor(String primaryButtonTextColor) { + public void setPrimaryButtonTextColor( + @javax.annotation.Nullable String primaryButtonTextColor) { this.primaryButtonTextColor = primaryButtonTextColor; } - public SubWhiteLabelingOptions primaryButtonTextColorHover(String primaryButtonTextColorHover) { + public SubWhiteLabelingOptions primaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; return this; } @@ -325,11 +334,13 @@ public String getPrimaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_PRIMARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrimaryButtonTextColorHover(String primaryButtonTextColorHover) { + public void setPrimaryButtonTextColorHover( + @javax.annotation.Nullable String primaryButtonTextColorHover) { this.primaryButtonTextColorHover = primaryButtonTextColorHover; } - public SubWhiteLabelingOptions secondaryButtonColor(String secondaryButtonColor) { + public SubWhiteLabelingOptions secondaryButtonColor( + @javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; return this; } @@ -347,11 +358,12 @@ public String getSecondaryButtonColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColor(String secondaryButtonColor) { + public void setSecondaryButtonColor(@javax.annotation.Nullable String secondaryButtonColor) { this.secondaryButtonColor = secondaryButtonColor; } - public SubWhiteLabelingOptions secondaryButtonColorHover(String secondaryButtonColorHover) { + public SubWhiteLabelingOptions secondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; return this; } @@ -369,11 +381,13 @@ public String getSecondaryButtonColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonColorHover(String secondaryButtonColorHover) { + public void setSecondaryButtonColorHover( + @javax.annotation.Nullable String secondaryButtonColorHover) { this.secondaryButtonColorHover = secondaryButtonColorHover; } - public SubWhiteLabelingOptions secondaryButtonTextColor(String secondaryButtonTextColor) { + public SubWhiteLabelingOptions secondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; return this; } @@ -391,12 +405,13 @@ public String getSecondaryButtonTextColor() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColor(String secondaryButtonTextColor) { + public void setSecondaryButtonTextColor( + @javax.annotation.Nullable String secondaryButtonTextColor) { this.secondaryButtonTextColor = secondaryButtonTextColor; } public SubWhiteLabelingOptions secondaryButtonTextColorHover( - String secondaryButtonTextColorHover) { + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; return this; } @@ -414,11 +429,12 @@ public String getSecondaryButtonTextColorHover() { @JsonProperty(JSON_PROPERTY_SECONDARY_BUTTON_TEXT_COLOR_HOVER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSecondaryButtonTextColorHover(String secondaryButtonTextColorHover) { + public void setSecondaryButtonTextColorHover( + @javax.annotation.Nullable String secondaryButtonTextColorHover) { this.secondaryButtonTextColorHover = secondaryButtonTextColorHover; } - public SubWhiteLabelingOptions textColor1(String textColor1) { + public SubWhiteLabelingOptions textColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; return this; } @@ -436,11 +452,11 @@ public String getTextColor1() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR1) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor1(String textColor1) { + public void setTextColor1(@javax.annotation.Nullable String textColor1) { this.textColor1 = textColor1; } - public SubWhiteLabelingOptions textColor2(String textColor2) { + public SubWhiteLabelingOptions textColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; return this; } @@ -458,11 +474,12 @@ public String getTextColor2() { @JsonProperty(JSON_PROPERTY_TEXT_COLOR2) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTextColor2(String textColor2) { + public void setTextColor2(@javax.annotation.Nullable String textColor2) { this.textColor2 = textColor2; } - public SubWhiteLabelingOptions resetToDefault(Boolean resetToDefault) { + public SubWhiteLabelingOptions resetToDefault( + @javax.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; return this; } @@ -480,7 +497,7 @@ public Boolean getResetToDefault() { @JsonProperty(JSON_PROPERTY_RESET_TO_DEFAULT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setResetToDefault(Boolean resetToDefault) { + public void setResetToDefault(@javax.annotation.Nullable Boolean resetToDefault) { this.resetToDefault = resetToDefault; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java index 49beaf28e..8da0558c1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java @@ -37,23 +37,23 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamAddMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; /** * A role member will take in a new Team. **NOTE:** This parameter is used only if * `team_id` is provided. */ public enum RoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -83,7 +83,7 @@ public static RoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_ROLE = "role"; - private RoleEnum role; + @javax.annotation.Nullable private RoleEnum role; public TeamAddMemberRequest() {} @@ -101,7 +101,7 @@ public static TeamAddMemberRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamAddMemberRequest.class); } - public TeamAddMemberRequest accountId(String accountId) { + public TeamAddMemberRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -120,11 +120,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamAddMemberRequest emailAddress(String emailAddress) { + public TeamAddMemberRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -143,11 +143,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamAddMemberRequest role(RoleEnum role) { + public TeamAddMemberRequest role(@javax.annotation.Nullable RoleEnum role) { this.role = role; return this; } @@ -166,7 +166,7 @@ public RoleEnum getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(RoleEnum role) { + public void setRole(@javax.annotation.Nullable RoleEnum role) { this.role = role; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index 6724eeaae..c3c469b6d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamCreateRequest { public static final String JSON_PROPERTY_NAME = "name"; - private String name = "Untitled Team"; + @javax.annotation.Nullable private String name = "Untitled Team"; public TeamCreateRequest() {} @@ -49,7 +49,7 @@ public static TeamCreateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamCreateRequest.class); } - public TeamCreateRequest name(String name) { + public TeamCreateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -67,7 +67,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java index fbb889e11..dbd34bf71 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetInfoResponse { public static final String JSON_PROPERTY_TEAM = "team"; - private TeamInfoResponse team; + @javax.annotation.Nonnull private TeamInfoResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamGetInfoResponse() {} @@ -57,7 +57,7 @@ public static TeamGetInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamGetInfoResponse.class); } - public TeamGetInfoResponse team(TeamInfoResponse team) { + public TeamGetInfoResponse team(@javax.annotation.Nonnull TeamInfoResponse team) { this.team = team; return this; } @@ -76,11 +76,11 @@ public TeamInfoResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamInfoResponse team) { + public void setTeam(@javax.annotation.Nonnull TeamInfoResponse team) { this.team = team; } - public TeamGetInfoResponse warnings(List warnings) { + public TeamGetInfoResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java index c7be1f6ee..47c93ca31 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java @@ -33,10 +33,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetResponse { public static final String JSON_PROPERTY_TEAM = "team"; - private TeamResponse team; + @javax.annotation.Nonnull private TeamResponse team; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamGetResponse() {} @@ -54,7 +54,7 @@ public static TeamGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamGetResponse.class); } - public TeamGetResponse team(TeamResponse team) { + public TeamGetResponse team(@javax.annotation.Nonnull TeamResponse team) { this.team = team; return this; } @@ -73,11 +73,11 @@ public TeamResponse getTeam() { @JsonProperty(JSON_PROPERTY_TEAM) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeam(TeamResponse team) { + public void setTeam(@javax.annotation.Nonnull TeamResponse team) { this.team = team; } - public TeamGetResponse warnings(List warnings) { + public TeamGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -103,7 +103,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java index 7edabf525..dafe4e8f7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java @@ -37,19 +37,19 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInfoResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_TEAM_PARENT = "team_parent"; - private TeamParentResponse teamParent; + @javax.annotation.Nullable private TeamParentResponse teamParent; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_NUM_MEMBERS = "num_members"; - private Integer numMembers; + @javax.annotation.Nullable private Integer numMembers; public static final String JSON_PROPERTY_NUM_SUB_TEAMS = "num_sub_teams"; - private Integer numSubTeams; + @javax.annotation.Nullable private Integer numSubTeams; public TeamInfoResponse() {} @@ -67,7 +67,7 @@ public static TeamInfoResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInfoResponse.class); } - public TeamInfoResponse teamId(String teamId) { + public TeamInfoResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -85,11 +85,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInfoResponse teamParent(TeamParentResponse teamParent) { + public TeamInfoResponse teamParent(@javax.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; return this; } @@ -107,11 +107,11 @@ public TeamParentResponse getTeamParent() { @JsonProperty(JSON_PROPERTY_TEAM_PARENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamParent(TeamParentResponse teamParent) { + public void setTeamParent(@javax.annotation.Nullable TeamParentResponse teamParent) { this.teamParent = teamParent; } - public TeamInfoResponse name(String name) { + public TeamInfoResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -129,11 +129,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TeamInfoResponse numMembers(Integer numMembers) { + public TeamInfoResponse numMembers(@javax.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; return this; } @@ -151,11 +151,11 @@ public Integer getNumMembers() { @JsonProperty(JSON_PROPERTY_NUM_MEMBERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumMembers(Integer numMembers) { + public void setNumMembers(@javax.annotation.Nullable Integer numMembers) { this.numMembers = numMembers; } - public TeamInfoResponse numSubTeams(Integer numSubTeams) { + public TeamInfoResponse numSubTeams(@javax.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; return this; } @@ -173,7 +173,7 @@ public Integer getNumSubTeams() { @JsonProperty(JSON_PROPERTY_NUM_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumSubTeams(Integer numSubTeams) { + public void setNumSubTeams(@javax.annotation.Nullable Integer numSubTeams) { this.numSubTeams = numSubTeams; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java index 2d49161bf..1f42adfd2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java @@ -38,22 +38,22 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInviteResponse { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nullable private String role; public static final String JSON_PROPERTY_SENT_AT = "sent_at"; - private Integer sentAt; + @javax.annotation.Nullable private Integer sentAt; public static final String JSON_PROPERTY_REDEEMED_AT = "redeemed_at"; - private Integer redeemedAt; + @javax.annotation.Nullable private Integer redeemedAt; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public TeamInviteResponse() {} @@ -71,7 +71,7 @@ public static TeamInviteResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInviteResponse.class); } - public TeamInviteResponse emailAddress(String emailAddress) { + public TeamInviteResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -89,11 +89,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamInviteResponse teamId(String teamId) { + public TeamInviteResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -111,11 +111,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamInviteResponse role(String role) { + public TeamInviteResponse role(@javax.annotation.Nullable String role) { this.role = role; return this; } @@ -133,11 +133,11 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nullable String role) { this.role = role; } - public TeamInviteResponse sentAt(Integer sentAt) { + public TeamInviteResponse sentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; return this; } @@ -155,11 +155,11 @@ public Integer getSentAt() { @JsonProperty(JSON_PROPERTY_SENT_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSentAt(Integer sentAt) { + public void setSentAt(@javax.annotation.Nullable Integer sentAt) { this.sentAt = sentAt; } - public TeamInviteResponse redeemedAt(Integer redeemedAt) { + public TeamInviteResponse redeemedAt(@javax.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; return this; } @@ -177,11 +177,11 @@ public Integer getRedeemedAt() { @JsonProperty(JSON_PROPERTY_REDEEMED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRedeemedAt(Integer redeemedAt) { + public void setRedeemedAt(@javax.annotation.Nullable Integer redeemedAt) { this.redeemedAt = redeemedAt; } - public TeamInviteResponse expiresAt(Integer expiresAt) { + public TeamInviteResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -199,7 +199,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java index 0e13d74c2..fc093ba9d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInvitesResponse { public static final String JSON_PROPERTY_TEAM_INVITES = "team_invites"; - private List teamInvites = new ArrayList<>(); + @javax.annotation.Nonnull private List teamInvites = new ArrayList<>(); public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamInvitesResponse() {} @@ -57,7 +57,8 @@ public static TeamInvitesResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamInvitesResponse.class); } - public TeamInvitesResponse teamInvites(List teamInvites) { + public TeamInvitesResponse teamInvites( + @javax.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; return this; } @@ -84,11 +85,11 @@ public List getTeamInvites() { @JsonProperty(JSON_PROPERTY_TEAM_INVITES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamInvites(List teamInvites) { + public void setTeamInvites(@javax.annotation.Nonnull List teamInvites) { this.teamInvites = teamInvites; } - public TeamInvitesResponse warnings(List warnings) { + public TeamInvitesResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -114,7 +115,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java index 1f86e2a5b..40a369512 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMemberResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + @javax.annotation.Nullable private String role; public TeamMemberResponse() {} @@ -59,7 +59,7 @@ public static TeamMemberResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamMemberResponse.class); } - public TeamMemberResponse accountId(String accountId) { + public TeamMemberResponse accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -77,11 +77,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamMemberResponse emailAddress(String emailAddress) { + public TeamMemberResponse emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -99,11 +99,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamMemberResponse role(String role) { + public TeamMemberResponse role(@javax.annotation.Nullable String role) { this.role = role; return this; } @@ -121,7 +121,7 @@ public String getRole() { @JsonProperty(JSON_PROPERTY_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { + public void setRole(@javax.annotation.Nullable String role) { this.role = role; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java index 203819cbf..67321fdbb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMembersResponse { public static final String JSON_PROPERTY_TEAM_MEMBERS = "team_members"; - private List teamMembers = new ArrayList<>(); + @javax.annotation.Nonnull private List teamMembers = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamMembersResponse() {} @@ -61,7 +61,8 @@ public static TeamMembersResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamMembersResponse.class); } - public TeamMembersResponse teamMembers(List teamMembers) { + public TeamMembersResponse teamMembers( + @javax.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; return this; } @@ -88,11 +89,11 @@ public List getTeamMembers() { @JsonProperty(JSON_PROPERTY_TEAM_MEMBERS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTeamMembers(List teamMembers) { + public void setTeamMembers(@javax.annotation.Nonnull List teamMembers) { this.teamMembers = teamMembers; } - public TeamMembersResponse listInfo(ListInfoResponse listInfo) { + public TeamMembersResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +112,11 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamMembersResponse warnings(List warnings) { + public TeamMembersResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +142,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java index cb5041a62..2fb15e6dc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamParentResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; - private String teamId; + @javax.annotation.Nullable private String teamId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TeamParentResponse() {} @@ -55,7 +55,7 @@ public static TeamParentResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamParentResponse.class); } - public TeamParentResponse teamId(String teamId) { + public TeamParentResponse teamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; return this; } @@ -73,11 +73,11 @@ public String getTeamId() { @JsonProperty(JSON_PROPERTY_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTeamId(String teamId) { + public void setTeamId(@javax.annotation.Nullable String teamId) { this.teamId = teamId; } - public TeamParentResponse name(String name) { + public TeamParentResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -95,7 +95,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java index 1dd8dc7d3..b54af7c85 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java @@ -39,29 +39,29 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamRemoveMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS = "new_owner_email_address"; - private String newOwnerEmailAddress; + @javax.annotation.Nullable private String newOwnerEmailAddress; public static final String JSON_PROPERTY_NEW_TEAM_ID = "new_team_id"; - private String newTeamId; + @javax.annotation.Nullable private String newTeamId; /** * A new role member will take in a new Team. **NOTE:** This parameter is used only if * `new_team_id` is provided. */ public enum NewRoleEnum { - MEMBER("Member"), + MEMBER(String.valueOf("Member")), - DEVELOPER("Developer"), + DEVELOPER(String.valueOf("Developer")), - TEAM_MANAGER("Team Manager"), + TEAM_MANAGER(String.valueOf("Team Manager")), - ADMIN("Admin"); + ADMIN(String.valueOf("Admin")); private String value; @@ -91,7 +91,7 @@ public static NewRoleEnum fromValue(String value) { } public static final String JSON_PROPERTY_NEW_ROLE = "new_role"; - private NewRoleEnum newRole; + @javax.annotation.Nullable private NewRoleEnum newRole; public TeamRemoveMemberRequest() {} @@ -110,7 +110,7 @@ public static TeamRemoveMemberRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TeamRemoveMemberRequest.class); } - public TeamRemoveMemberRequest accountId(String accountId) { + public TeamRemoveMemberRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -129,11 +129,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TeamRemoveMemberRequest emailAddress(String emailAddress) { + public TeamRemoveMemberRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -152,11 +152,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TeamRemoveMemberRequest newOwnerEmailAddress(String newOwnerEmailAddress) { + public TeamRemoveMemberRequest newOwnerEmailAddress( + @javax.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; return this; } @@ -177,11 +178,11 @@ public String getNewOwnerEmailAddress() { @JsonProperty(JSON_PROPERTY_NEW_OWNER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewOwnerEmailAddress(String newOwnerEmailAddress) { + public void setNewOwnerEmailAddress(@javax.annotation.Nullable String newOwnerEmailAddress) { this.newOwnerEmailAddress = newOwnerEmailAddress; } - public TeamRemoveMemberRequest newTeamId(String newTeamId) { + public TeamRemoveMemberRequest newTeamId(@javax.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; return this; } @@ -199,11 +200,11 @@ public String getNewTeamId() { @JsonProperty(JSON_PROPERTY_NEW_TEAM_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewTeamId(String newTeamId) { + public void setNewTeamId(@javax.annotation.Nullable String newTeamId) { this.newTeamId = newTeamId; } - public TeamRemoveMemberRequest newRole(NewRoleEnum newRole) { + public TeamRemoveMemberRequest newRole(@javax.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; return this; } @@ -222,7 +223,7 @@ public NewRoleEnum getNewRole() { @JsonProperty(JSON_PROPERTY_NEW_ROLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNewRole(NewRoleEnum newRole) { + public void setNewRole(@javax.annotation.Nullable NewRoleEnum newRole) { this.newRole = newRole; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java index 2abc906c6..a4ff43879 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -38,16 +38,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamResponse { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_INVITED_ACCOUNTS = "invited_accounts"; - private List invitedAccounts = null; + @javax.annotation.Nullable private List invitedAccounts = null; public static final String JSON_PROPERTY_INVITED_EMAILS = "invited_emails"; - private List invitedEmails = null; + @javax.annotation.Nullable private List invitedEmails = null; public TeamResponse() {} @@ -65,7 +65,7 @@ public static TeamResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamResponse.class); } - public TeamResponse name(String name) { + public TeamResponse name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -83,11 +83,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TeamResponse accounts(List accounts) { + public TeamResponse accounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -113,11 +113,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } - public TeamResponse invitedAccounts(List invitedAccounts) { + public TeamResponse invitedAccounts( + @javax.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; return this; } @@ -144,11 +145,12 @@ public List getInvitedAccounts() { @JsonProperty(JSON_PROPERTY_INVITED_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedAccounts(List invitedAccounts) { + public void setInvitedAccounts( + @javax.annotation.Nullable List invitedAccounts) { this.invitedAccounts = invitedAccounts; } - public TeamResponse invitedEmails(List invitedEmails) { + public TeamResponse invitedEmails(@javax.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; return this; } @@ -175,7 +177,7 @@ public List getInvitedEmails() { @JsonProperty(JSON_PROPERTY_INVITED_EMAILS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInvitedEmails(List invitedEmails) { + public void setInvitedEmails(@javax.annotation.Nullable List invitedEmails) { this.invitedEmails = invitedEmails; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java index 5ccab5b01..2d61251d4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamSubTeamsResponse { public static final String JSON_PROPERTY_SUB_TEAMS = "sub_teams"; - private List subTeams = new ArrayList<>(); + @javax.annotation.Nonnull private List subTeams = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TeamSubTeamsResponse() {} @@ -61,7 +61,7 @@ public static TeamSubTeamsResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamSubTeamsResponse.class); } - public TeamSubTeamsResponse subTeams(List subTeams) { + public TeamSubTeamsResponse subTeams(@javax.annotation.Nonnull List subTeams) { this.subTeams = subTeams; return this; } @@ -88,11 +88,11 @@ public List getSubTeams() { @JsonProperty(JSON_PROPERTY_SUB_TEAMS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSubTeams(List subTeams) { + public void setSubTeams(@javax.annotation.Nonnull List subTeams) { this.subTeams = subTeams; } - public TeamSubTeamsResponse listInfo(ListInfoResponse listInfo) { + public TeamSubTeamsResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +111,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TeamSubTeamsResponse warnings(List warnings) { + public TeamSubTeamsResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +142,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java index c6a8f944a..d520b06a6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TeamUpdateRequest { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TeamUpdateRequest() {} @@ -49,7 +49,7 @@ public static TeamUpdateRequest init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TeamUpdateRequest.class); } - public TeamUpdateRequest name(String name) { + public TeamUpdateRequest name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -67,7 +67,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java index c52f0700f..cbe6d7bf8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java @@ -35,13 +35,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateAddUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_SKIP_NOTIFICATION = "skip_notification"; - private Boolean skipNotification = false; + @javax.annotation.Nullable private Boolean skipNotification = false; public TemplateAddUserRequest() {} @@ -60,7 +60,7 @@ public static TemplateAddUserRequest init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateAddUserRequest.class); } - public TemplateAddUserRequest accountId(String accountId) { + public TemplateAddUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -79,11 +79,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateAddUserRequest emailAddress(String emailAddress) { + public TemplateAddUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -102,11 +102,12 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateAddUserRequest skipNotification(Boolean skipNotification) { + public TemplateAddUserRequest skipNotification( + @javax.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; return this; } @@ -125,7 +126,7 @@ public Boolean getSkipNotification() { @JsonProperty(JSON_PROPERTY_SKIP_NOTIFICATION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipNotification(Boolean skipNotification) { + public void setSkipNotification(@javax.annotation.Nullable Boolean skipNotification) { this.skipNotification = skipNotification; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java index 95632844c..e1ae6f15d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java @@ -60,79 +60,80 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; + @javax.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; + @javax.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateEmbeddedDraftRequest() {} @@ -152,7 +153,7 @@ public static TemplateCreateEmbeddedDraftRequest init(HashMap data) throws Excep TemplateCreateEmbeddedDraftRequest.class); } - public TemplateCreateEmbeddedDraftRequest clientId(String clientId) { + public TemplateCreateEmbeddedDraftRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -172,11 +173,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public TemplateCreateEmbeddedDraftRequest files(List files) { + public TemplateCreateEmbeddedDraftRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -203,11 +204,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateCreateEmbeddedDraftRequest fileUrls(List fileUrls) { + public TemplateCreateEmbeddedDraftRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -234,11 +236,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateEmbeddedDraftRequest allowCcs(Boolean allowCcs) { + public TemplateCreateEmbeddedDraftRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -257,11 +260,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public TemplateCreateEmbeddedDraftRequest allowReassign(Boolean allowReassign) { + public TemplateCreateEmbeddedDraftRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -281,11 +285,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateEmbeddedDraftRequest attachments(List attachments) { + public TemplateCreateEmbeddedDraftRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -311,11 +316,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateEmbeddedDraftRequest ccRoles(List ccRoles) { + public TemplateCreateEmbeddedDraftRequest ccRoles( + @javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -341,11 +347,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateEmbeddedDraftRequest editorOptions(SubEditorOptions editorOptions) { + public TemplateCreateEmbeddedDraftRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -363,11 +370,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public TemplateCreateEmbeddedDraftRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateEmbeddedDraftRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -385,11 +393,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateEmbeddedDraftRequest forceSignerRoles(Boolean forceSignerRoles) { + public TemplateCreateEmbeddedDraftRequest forceSignerRoles( + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -407,11 +416,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } - public TemplateCreateEmbeddedDraftRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public TemplateCreateEmbeddedDraftRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -429,12 +439,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } public TemplateCreateEmbeddedDraftRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -464,12 +474,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public TemplateCreateEmbeddedDraftRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -496,12 +507,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public TemplateCreateEmbeddedDraftRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -543,11 +555,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateEmbeddedDraftRequest mergeFields(List mergeFields) { + public TemplateCreateEmbeddedDraftRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -576,11 +590,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateEmbeddedDraftRequest message(String message) { + public TemplateCreateEmbeddedDraftRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -598,11 +612,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateCreateEmbeddedDraftRequest metadata(Map metadata) { + public TemplateCreateEmbeddedDraftRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -632,11 +647,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateEmbeddedDraftRequest showPreview(Boolean showPreview) { + public TemplateCreateEmbeddedDraftRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -657,11 +673,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public TemplateCreateEmbeddedDraftRequest showProgressStepper(Boolean showProgressStepper) { + public TemplateCreateEmbeddedDraftRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -680,11 +697,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public TemplateCreateEmbeddedDraftRequest signerRoles(List signerRoles) { + public TemplateCreateEmbeddedDraftRequest signerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -711,11 +729,12 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateEmbeddedDraftRequest skipMeNow(Boolean skipMeNow) { + public TemplateCreateEmbeddedDraftRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -734,11 +753,11 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public TemplateCreateEmbeddedDraftRequest subject(String subject) { + public TemplateCreateEmbeddedDraftRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -756,11 +775,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateEmbeddedDraftRequest testMode(Boolean testMode) { + public TemplateCreateEmbeddedDraftRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -779,11 +799,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateEmbeddedDraftRequest title(String title) { + public TemplateCreateEmbeddedDraftRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -801,11 +821,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateCreateEmbeddedDraftRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateEmbeddedDraftRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -825,7 +846,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java index 21f1d7d65..6dfdd57a5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateEmbeddedDraftResponseTemplate template; + @javax.annotation.Nonnull private TemplateCreateEmbeddedDraftResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponse() {} @@ -60,7 +60,7 @@ public static TemplateCreateEmbeddedDraftResponse init(HashMap data) throws Exce } public TemplateCreateEmbeddedDraftResponse template( - TemplateCreateEmbeddedDraftResponseTemplate template) { + @javax.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; return this; } @@ -79,11 +79,13 @@ public TemplateCreateEmbeddedDraftResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateEmbeddedDraftResponseTemplate template) { + public void setTemplate( + @javax.annotation.Nonnull TemplateCreateEmbeddedDraftResponseTemplate template) { this.template = template; } - public TemplateCreateEmbeddedDraftResponse warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -109,7 +111,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java index 7e2fc0bc4..e04563ecd 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java @@ -41,16 +41,16 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; - private String editUrl; + @javax.annotation.Nullable private String editUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; + @Deprecated @javax.annotation.Nullable private List warnings = null; public TemplateCreateEmbeddedDraftResponseTemplate() {} @@ -72,7 +72,8 @@ public static TemplateCreateEmbeddedDraftResponseTemplate init(HashMap data) thr TemplateCreateEmbeddedDraftResponseTemplate.class); } - public TemplateCreateEmbeddedDraftResponseTemplate templateId(String templateId) { + public TemplateCreateEmbeddedDraftResponseTemplate templateId( + @javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -90,11 +91,12 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateCreateEmbeddedDraftResponseTemplate editUrl(String editUrl) { + public TemplateCreateEmbeddedDraftResponseTemplate editUrl( + @javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; return this; } @@ -112,11 +114,12 @@ public String getEditUrl() { @JsonProperty(JSON_PROPERTY_EDIT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditUrl(String editUrl) { + public void setEditUrl(@javax.annotation.Nullable String editUrl) { this.editUrl = editUrl; } - public TemplateCreateEmbeddedDraftResponseTemplate expiresAt(Integer expiresAt) { + public TemplateCreateEmbeddedDraftResponseTemplate expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -134,12 +137,13 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } @Deprecated - public TemplateCreateEmbeddedDraftResponseTemplate warnings(List warnings) { + public TemplateCreateEmbeddedDraftResponseTemplate warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -169,7 +173,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java index 9a554ed65..2ee1f8bc5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java @@ -53,58 +53,60 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateRequest { public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; + + @javax.annotation.Nonnull private List formFieldsPerDocument = new ArrayList<>(); public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = new ArrayList<>(); + @javax.annotation.Nonnull private List signerRoles = new ArrayList<>(); public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_MERGE_FIELDS = "merge_fields"; - private List mergeFields = null; + @javax.annotation.Nullable private List mergeFields = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public TemplateCreateRequest() {} @@ -124,7 +126,7 @@ public static TemplateCreateRequest init(HashMap data) throws Exception { } public TemplateCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -167,11 +169,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nonnull List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public TemplateCreateRequest signerRoles(List signerRoles) { + public TemplateCreateRequest signerRoles( + @javax.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -199,11 +203,11 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles(@javax.annotation.Nonnull List signerRoles) { this.signerRoles = signerRoles; } - public TemplateCreateRequest files(List files) { + public TemplateCreateRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -230,11 +234,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateCreateRequest fileUrls(List fileUrls) { + public TemplateCreateRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -261,11 +265,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateCreateRequest allowReassign(Boolean allowReassign) { + public TemplateCreateRequest allowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -285,11 +289,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public TemplateCreateRequest attachments(List attachments) { + public TemplateCreateRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -315,11 +320,11 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public TemplateCreateRequest ccRoles(List ccRoles) { + public TemplateCreateRequest ccRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -345,11 +350,11 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateCreateRequest clientId(String clientId) { + public TemplateCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -368,11 +373,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public TemplateCreateRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -390,11 +396,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public TemplateCreateRequest formFieldGroups(List formFieldGroups) { + public TemplateCreateRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -423,11 +430,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public TemplateCreateRequest formFieldRules(List formFieldRules) { + public TemplateCreateRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -453,11 +462,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } - public TemplateCreateRequest mergeFields(List mergeFields) { + public TemplateCreateRequest mergeFields( + @javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; return this; } @@ -486,11 +497,11 @@ public List getMergeFields() { @JsonProperty(JSON_PROPERTY_MERGE_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMergeFields(List mergeFields) { + public void setMergeFields(@javax.annotation.Nullable List mergeFields) { this.mergeFields = mergeFields; } - public TemplateCreateRequest message(String message) { + public TemplateCreateRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -508,11 +519,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateCreateRequest metadata(Map metadata) { + public TemplateCreateRequest metadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -542,11 +553,11 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateCreateRequest subject(String subject) { + public TemplateCreateRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -564,11 +575,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateCreateRequest testMode(Boolean testMode) { + public TemplateCreateRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -587,11 +598,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public TemplateCreateRequest title(String title) { + public TemplateCreateRequest title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -609,11 +620,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public TemplateCreateRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -633,7 +645,7 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java index 3c228e89c..fd4eb3c84 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateCreateResponseTemplate template; + @javax.annotation.Nonnull private TemplateCreateResponseTemplate template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateCreateResponse() {} @@ -58,7 +58,8 @@ public static TemplateCreateResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateCreateResponse.class); } - public TemplateCreateResponse template(TemplateCreateResponseTemplate template) { + public TemplateCreateResponse template( + @javax.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; return this; } @@ -77,11 +78,12 @@ public TemplateCreateResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateCreateResponseTemplate template) { + public void setTemplate(@javax.annotation.Nonnull TemplateCreateResponseTemplate template) { this.template = template; } - public TemplateCreateResponse warnings(List warnings) { + public TemplateCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -107,7 +109,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java index 017ed6e40..a016373aa 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public TemplateCreateResponseTemplate() {} @@ -51,7 +51,7 @@ public static TemplateCreateResponseTemplate init(HashMap data) throws Exception TemplateCreateResponseTemplate.class); } - public TemplateCreateResponseTemplate templateId(String templateId) { + public TemplateCreateResponseTemplate templateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -69,7 +69,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java index 65be6fd0b..a92f547b4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateEditResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nonnull private String templateId; public TemplateEditResponse() {} @@ -49,7 +49,7 @@ public static TemplateEditResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateEditResponse.class); } - public TemplateEditResponse templateId(String templateId) { + public TemplateEditResponse templateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; return this; } @@ -68,7 +68,7 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nonnull String templateId) { this.templateId = templateId; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java index 1c4f53d6b..8879e556c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateGetResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateResponse template; + @javax.annotation.Nonnull private TemplateResponse template; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateGetResponse() {} @@ -57,7 +57,7 @@ public static TemplateGetResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateGetResponse.class); } - public TemplateGetResponse template(TemplateResponse template) { + public TemplateGetResponse template(@javax.annotation.Nonnull TemplateResponse template) { this.template = template; return this; } @@ -76,11 +76,11 @@ public TemplateResponse getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateResponse template) { + public void setTemplate(@javax.annotation.Nonnull TemplateResponse template) { this.template = template; } - public TemplateGetResponse warnings(List warnings) { + public TemplateGetResponse warnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -106,7 +106,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java index 70385b00c..831758364 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java @@ -37,13 +37,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateListResponse { public static final String JSON_PROPERTY_TEMPLATES = "templates"; - private List templates = new ArrayList<>(); + @javax.annotation.Nonnull private List templates = new ArrayList<>(); public static final String JSON_PROPERTY_LIST_INFO = "list_info"; - private ListInfoResponse listInfo; + @javax.annotation.Nonnull private ListInfoResponse listInfo; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public TemplateListResponse() {} @@ -61,7 +61,8 @@ public static TemplateListResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateListResponse.class); } - public TemplateListResponse templates(List templates) { + public TemplateListResponse templates( + @javax.annotation.Nonnull List templates) { this.templates = templates; return this; } @@ -88,11 +89,11 @@ public List getTemplates() { @JsonProperty(JSON_PROPERTY_TEMPLATES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplates(List templates) { + public void setTemplates(@javax.annotation.Nonnull List templates) { this.templates = templates; } - public TemplateListResponse listInfo(ListInfoResponse listInfo) { + public TemplateListResponse listInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; return this; } @@ -111,11 +112,12 @@ public ListInfoResponse getListInfo() { @JsonProperty(JSON_PROPERTY_LIST_INFO) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setListInfo(ListInfoResponse listInfo) { + public void setListInfo(@javax.annotation.Nonnull ListInfoResponse listInfo) { this.listInfo = listInfo; } - public TemplateListResponse warnings(List warnings) { + public TemplateListResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -141,7 +143,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java index 28d04e064..2fba7071b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateRemoveUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public TemplateRemoveUserRequest() {} @@ -57,7 +57,7 @@ public static TemplateRemoveUserRequest init(HashMap data) throws Exception { TemplateRemoveUserRequest.class); } - public TemplateRemoveUserRequest accountId(String accountId) { + public TemplateRemoveUserRequest accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -76,11 +76,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateRemoveUserRequest emailAddress(String emailAddress) { + public TemplateRemoveUserRequest emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -99,7 +99,7 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java index fde4151d3..2dd5cca72 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java @@ -50,52 +50,54 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private Integer updatedAt; + @javax.annotation.Nullable private Integer updatedAt; public static final String JSON_PROPERTY_IS_EMBEDDED = "is_embedded"; - private Boolean isEmbedded; + @javax.annotation.Nullable private Boolean isEmbedded; public static final String JSON_PROPERTY_IS_CREATOR = "is_creator"; - private Boolean isCreator; + @javax.annotation.Nullable private Boolean isCreator; public static final String JSON_PROPERTY_CAN_EDIT = "can_edit"; - private Boolean canEdit; + @javax.annotation.Nullable private Boolean canEdit; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SIGNER_ROLES = "signer_roles"; - private List signerRoles = null; + @javax.annotation.Nullable private List signerRoles = null; public static final String JSON_PROPERTY_CC_ROLES = "cc_roles"; - private List ccRoles = null; + @javax.annotation.Nullable private List ccRoles = null; public static final String JSON_PROPERTY_DOCUMENTS = "documents"; - private List documents = null; + @javax.annotation.Nullable private List documents = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - @Deprecated private List customFields = null; + + @Deprecated @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_NAMED_FORM_FIELDS = "named_form_fields"; - @Deprecated private List namedFormFields = null; + + @Deprecated @javax.annotation.Nullable private List namedFormFields = null; public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; - private List accounts = null; + @javax.annotation.Nullable private List accounts = null; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public TemplateResponse() {} @@ -113,7 +115,7 @@ public static TemplateResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), TemplateResponse.class); } - public TemplateResponse templateId(String templateId) { + public TemplateResponse templateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -131,11 +133,11 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } - public TemplateResponse title(String title) { + public TemplateResponse title(@javax.annotation.Nullable String title) { this.title = title; return this; } @@ -155,11 +157,11 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } - public TemplateResponse message(String message) { + public TemplateResponse message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -178,11 +180,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateResponse updatedAt(Integer updatedAt) { + public TemplateResponse updatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; return this; } @@ -200,11 +202,11 @@ public Integer getUpdatedAt() { @JsonProperty(JSON_PROPERTY_UPDATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(@javax.annotation.Nullable Integer updatedAt) { this.updatedAt = updatedAt; } - public TemplateResponse isEmbedded(Boolean isEmbedded) { + public TemplateResponse isEmbedded(@javax.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; return this; } @@ -224,11 +226,11 @@ public Boolean getIsEmbedded() { @JsonProperty(JSON_PROPERTY_IS_EMBEDDED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsEmbedded(Boolean isEmbedded) { + public void setIsEmbedded(@javax.annotation.Nullable Boolean isEmbedded) { this.isEmbedded = isEmbedded; } - public TemplateResponse isCreator(Boolean isCreator) { + public TemplateResponse isCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; return this; } @@ -247,11 +249,11 @@ public Boolean getIsCreator() { @JsonProperty(JSON_PROPERTY_IS_CREATOR) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsCreator(Boolean isCreator) { + public void setIsCreator(@javax.annotation.Nullable Boolean isCreator) { this.isCreator = isCreator; } - public TemplateResponse canEdit(Boolean canEdit) { + public TemplateResponse canEdit(@javax.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; return this; } @@ -270,11 +272,11 @@ public Boolean getCanEdit() { @JsonProperty(JSON_PROPERTY_CAN_EDIT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCanEdit(Boolean canEdit) { + public void setCanEdit(@javax.annotation.Nullable Boolean canEdit) { this.canEdit = canEdit; } - public TemplateResponse isLocked(Boolean isLocked) { + public TemplateResponse isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -294,11 +296,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponse metadata(Map metadata) { + public TemplateResponse metadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -324,11 +326,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public TemplateResponse signerRoles(List signerRoles) { + public TemplateResponse signerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; return this; } @@ -355,11 +358,13 @@ public List getSignerRoles() { @JsonProperty(JSON_PROPERTY_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignerRoles(List signerRoles) { + public void setSignerRoles( + @javax.annotation.Nullable List signerRoles) { this.signerRoles = signerRoles; } - public TemplateResponse ccRoles(List ccRoles) { + public TemplateResponse ccRoles( + @javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; return this; } @@ -386,11 +391,12 @@ public List getCcRoles() { @JsonProperty(JSON_PROPERTY_CC_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcRoles(List ccRoles) { + public void setCcRoles(@javax.annotation.Nullable List ccRoles) { this.ccRoles = ccRoles; } - public TemplateResponse documents(List documents) { + public TemplateResponse documents( + @javax.annotation.Nullable List documents) { this.documents = documents; return this; } @@ -417,13 +423,13 @@ public List getDocuments() { @JsonProperty(JSON_PROPERTY_DOCUMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocuments(List documents) { + public void setDocuments(@javax.annotation.Nullable List documents) { this.documents = documents; } @Deprecated public TemplateResponse customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -455,13 +461,14 @@ public List getCustomFields() { @Deprecated @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } @Deprecated public TemplateResponse namedFormFields( - List namedFormFields) { + @javax.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; return this; } @@ -493,11 +500,13 @@ public List getNamedFormFields() { @Deprecated @JsonProperty(JSON_PROPERTY_NAMED_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNamedFormFields(List namedFormFields) { + public void setNamedFormFields( + @javax.annotation.Nullable List namedFormFields) { this.namedFormFields = namedFormFields; } - public TemplateResponse accounts(List accounts) { + public TemplateResponse accounts( + @javax.annotation.Nullable List accounts) { this.accounts = accounts; return this; } @@ -523,11 +532,12 @@ public List getAccounts() { @JsonProperty(JSON_PROPERTY_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccounts(List accounts) { + public void setAccounts(@javax.annotation.Nullable List accounts) { this.accounts = accounts; } - public TemplateResponse attachments(List attachments) { + public TemplateResponse attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -553,7 +563,8 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java index 901e4be34..7b2866158 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java @@ -38,22 +38,22 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; - private String accountId; + @javax.annotation.Nullable private String accountId; public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; - private String emailAddress; + @javax.annotation.Nullable private String emailAddress; public static final String JSON_PROPERTY_IS_LOCKED = "is_locked"; - private Boolean isLocked; + @javax.annotation.Nullable private Boolean isLocked; public static final String JSON_PROPERTY_IS_PAID_HS = "is_paid_hs"; - private Boolean isPaidHs; + @javax.annotation.Nullable private Boolean isPaidHs; public static final String JSON_PROPERTY_IS_PAID_HF = "is_paid_hf"; - private Boolean isPaidHf; + @javax.annotation.Nullable private Boolean isPaidHf; public static final String JSON_PROPERTY_QUOTAS = "quotas"; - private TemplateResponseAccountQuota quotas; + @javax.annotation.Nullable private TemplateResponseAccountQuota quotas; public TemplateResponseAccount() {} @@ -72,7 +72,7 @@ public static TemplateResponseAccount init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateResponseAccount.class); } - public TemplateResponseAccount accountId(String accountId) { + public TemplateResponseAccount accountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; return this; } @@ -90,11 +90,11 @@ public String getAccountId() { @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(String accountId) { + public void setAccountId(@javax.annotation.Nullable String accountId) { this.accountId = accountId; } - public TemplateResponseAccount emailAddress(String emailAddress) { + public TemplateResponseAccount emailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; return this; } @@ -112,11 +112,11 @@ public String getEmailAddress() { @JsonProperty(JSON_PROPERTY_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmailAddress(String emailAddress) { + public void setEmailAddress(@javax.annotation.Nullable String emailAddress) { this.emailAddress = emailAddress; } - public TemplateResponseAccount isLocked(Boolean isLocked) { + public TemplateResponseAccount isLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; return this; } @@ -134,11 +134,11 @@ public Boolean getIsLocked() { @JsonProperty(JSON_PROPERTY_IS_LOCKED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsLocked(Boolean isLocked) { + public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { this.isLocked = isLocked; } - public TemplateResponseAccount isPaidHs(Boolean isPaidHs) { + public TemplateResponseAccount isPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; return this; } @@ -156,11 +156,11 @@ public Boolean getIsPaidHs() { @JsonProperty(JSON_PROPERTY_IS_PAID_HS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHs(Boolean isPaidHs) { + public void setIsPaidHs(@javax.annotation.Nullable Boolean isPaidHs) { this.isPaidHs = isPaidHs; } - public TemplateResponseAccount isPaidHf(Boolean isPaidHf) { + public TemplateResponseAccount isPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; return this; } @@ -178,11 +178,12 @@ public Boolean getIsPaidHf() { @JsonProperty(JSON_PROPERTY_IS_PAID_HF) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsPaidHf(Boolean isPaidHf) { + public void setIsPaidHf(@javax.annotation.Nullable Boolean isPaidHf) { this.isPaidHf = isPaidHf; } - public TemplateResponseAccount quotas(TemplateResponseAccountQuota quotas) { + public TemplateResponseAccount quotas( + @javax.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; return this; } @@ -200,7 +201,7 @@ public TemplateResponseAccountQuota getQuotas() { @JsonProperty(JSON_PROPERTY_QUOTAS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuotas(TemplateResponseAccountQuota quotas) { + public void setQuotas(@javax.annotation.Nullable TemplateResponseAccountQuota quotas) { this.quotas = quotas; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java index 0ebdbe2a4..0ed63af67 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java @@ -39,17 +39,17 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccountQuota { public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; - private Integer templatesLeft; + @javax.annotation.Nullable private Integer templatesLeft; public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = "api_signature_requests_left"; - private Integer apiSignatureRequestsLeft; + @javax.annotation.Nullable private Integer apiSignatureRequestsLeft; public static final String JSON_PROPERTY_DOCUMENTS_LEFT = "documents_left"; - private Integer documentsLeft; + @javax.annotation.Nullable private Integer documentsLeft; public static final String JSON_PROPERTY_SMS_VERIFICATIONS_LEFT = "sms_verifications_left"; - private Integer smsVerificationsLeft; + @javax.annotation.Nullable private Integer smsVerificationsLeft; public TemplateResponseAccountQuota() {} @@ -69,7 +69,8 @@ public static TemplateResponseAccountQuota init(HashMap data) throws Exception { TemplateResponseAccountQuota.class); } - public TemplateResponseAccountQuota templatesLeft(Integer templatesLeft) { + public TemplateResponseAccountQuota templatesLeft( + @javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; return this; } @@ -87,11 +88,12 @@ public Integer getTemplatesLeft() { @JsonProperty(JSON_PROPERTY_TEMPLATES_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplatesLeft(Integer templatesLeft) { + public void setTemplatesLeft(@javax.annotation.Nullable Integer templatesLeft) { this.templatesLeft = templatesLeft; } - public TemplateResponseAccountQuota apiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public TemplateResponseAccountQuota apiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; return this; } @@ -109,11 +111,13 @@ public Integer getApiSignatureRequestsLeft() { @JsonProperty(JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiSignatureRequestsLeft(Integer apiSignatureRequestsLeft) { + public void setApiSignatureRequestsLeft( + @javax.annotation.Nullable Integer apiSignatureRequestsLeft) { this.apiSignatureRequestsLeft = apiSignatureRequestsLeft; } - public TemplateResponseAccountQuota documentsLeft(Integer documentsLeft) { + public TemplateResponseAccountQuota documentsLeft( + @javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; return this; } @@ -131,11 +135,12 @@ public Integer getDocumentsLeft() { @JsonProperty(JSON_PROPERTY_DOCUMENTS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDocumentsLeft(Integer documentsLeft) { + public void setDocumentsLeft(@javax.annotation.Nullable Integer documentsLeft) { this.documentsLeft = documentsLeft; } - public TemplateResponseAccountQuota smsVerificationsLeft(Integer smsVerificationsLeft) { + public TemplateResponseAccountQuota smsVerificationsLeft( + @javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; return this; } @@ -153,7 +158,7 @@ public Integer getSmsVerificationsLeft() { @JsonProperty(JSON_PROPERTY_SMS_VERIFICATIONS_LEFT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmsVerificationsLeft(Integer smsVerificationsLeft) { + public void setSmsVerificationsLeft(@javax.annotation.Nullable Integer smsVerificationsLeft) { this.smsVerificationsLeft = smsVerificationsLeft; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java index e4a7d7377..2e5099354 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseCCRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public TemplateResponseCCRole() {} @@ -50,7 +50,7 @@ public static TemplateResponseCCRole init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), TemplateResponseCCRole.class); } - public TemplateResponseCCRole name(String name) { + public TemplateResponseCCRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -68,7 +68,7 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java index de32fb5ac..060805fa2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java @@ -40,22 +40,25 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocument { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_INDEX = "index"; - private Integer index; + @javax.annotation.Nullable private Integer index; public static final String JSON_PROPERTY_FIELD_GROUPS = "field_groups"; - private List fieldGroups = null; + @javax.annotation.Nullable private List fieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELDS = "form_fields"; - private List formFields = null; + + @javax.annotation.Nullable private List formFields = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_STATIC_FIELDS = "static_fields"; - private List staticFields = null; + + @javax.annotation.Nullable private List staticFields = null; public TemplateResponseDocument() {} @@ -75,7 +78,7 @@ public static TemplateResponseDocument init(HashMap data) throws Exception { TemplateResponseDocument.class); } - public TemplateResponseDocument name(String name) { + public TemplateResponseDocument name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -93,11 +96,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocument index(Integer index) { + public TemplateResponseDocument index(@javax.annotation.Nullable Integer index) { this.index = index; return this; } @@ -116,12 +119,12 @@ public Integer getIndex() { @JsonProperty(JSON_PROPERTY_INDEX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndex(Integer index) { + public void setIndex(@javax.annotation.Nullable Integer index) { this.index = index; } public TemplateResponseDocument fieldGroups( - List fieldGroups) { + @javax.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; return this; } @@ -148,12 +151,13 @@ public List getFieldGroups() { @JsonProperty(JSON_PROPERTY_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldGroups(List fieldGroups) { + public void setFieldGroups( + @javax.annotation.Nullable List fieldGroups) { this.fieldGroups = fieldGroups; } public TemplateResponseDocument formFields( - List formFields) { + @javax.annotation.Nullable List formFields) { this.formFields = formFields; return this; } @@ -180,12 +184,13 @@ public List getFormFields() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFields(List formFields) { + public void setFormFields( + @javax.annotation.Nullable List formFields) { this.formFields = formFields; } public TemplateResponseDocument customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -212,12 +217,13 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; } public TemplateResponseDocument staticFields( - List staticFields) { + @javax.annotation.Nullable List staticFields) { this.staticFields = staticFields; return this; } @@ -245,7 +251,8 @@ public List getStaticFields() { @JsonProperty(JSON_PROPERTY_STATIC_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStaticFields(List staticFields) { + public void setStaticFields( + @javax.annotation.Nullable List staticFields) { this.staticFields = staticFields; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java index d6c0d010c..5391a638e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java @@ -57,34 +57,34 @@ }) public class TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentCustomFieldBase() {} @@ -105,7 +105,7 @@ public static TemplateResponseDocumentCustomFieldBase init(HashMap data) throws TemplateResponseDocumentCustomFieldBase.class); } - public TemplateResponseDocumentCustomFieldBase type(String type) { + public TemplateResponseDocumentCustomFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -124,11 +124,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentCustomFieldBase apiId(String apiId) { + public TemplateResponseDocumentCustomFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -146,11 +146,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentCustomFieldBase name(String name) { + public TemplateResponseDocumentCustomFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -168,11 +168,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentCustomFieldBase signer(String signer) { + public TemplateResponseDocumentCustomFieldBase signer( + @javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -196,7 +197,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } @@ -204,7 +205,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public TemplateResponseDocumentCustomFieldBase x(Integer x) { + public TemplateResponseDocumentCustomFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -222,11 +223,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentCustomFieldBase y(Integer y) { + public TemplateResponseDocumentCustomFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -244,11 +245,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentCustomFieldBase width(Integer width) { + public TemplateResponseDocumentCustomFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -266,11 +267,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentCustomFieldBase height(Integer height) { + public TemplateResponseDocumentCustomFieldBase height( + @javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -288,11 +290,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentCustomFieldBase required(Boolean required) { + public TemplateResponseDocumentCustomFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -310,11 +313,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentCustomFieldBase group(String group) { + public TemplateResponseDocumentCustomFieldBase group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -333,7 +336,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java index b11eca50b..cabb602e8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentCustomFieldCheckbox extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentCustomFieldCheckbox() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentCustomFieldCheckbox init(HashMap data) thr TemplateResponseDocumentCustomFieldCheckbox.class); } - public TemplateResponseDocumentCustomFieldCheckbox type(String type) { + public TemplateResponseDocumentCustomFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -83,7 +83,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java index e915dc017..5cb60680e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java @@ -46,19 +46,19 @@ public class TemplateResponseDocumentCustomFieldText extends TemplateResponseDocumentCustomFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; public TemplateResponseDocumentCustomFieldText() {} @@ -79,7 +79,7 @@ public static TemplateResponseDocumentCustomFieldText init(HashMap data) throws TemplateResponseDocumentCustomFieldText.class); } - public TemplateResponseDocumentCustomFieldText type(String type) { + public TemplateResponseDocumentCustomFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -100,12 +100,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentCustomFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -123,11 +123,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentCustomFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentCustomFieldText isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -145,11 +147,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentCustomFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentCustomFieldText originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -167,11 +170,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentCustomFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentCustomFieldText fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -189,7 +193,7 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java index 27dd50e83..3a2f86851 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroup { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_RULE = "rule"; - private TemplateResponseDocumentFieldGroupRule rule; + @javax.annotation.Nullable private TemplateResponseDocumentFieldGroupRule rule; public TemplateResponseDocumentFieldGroup() {} @@ -57,7 +57,7 @@ public static TemplateResponseDocumentFieldGroup init(HashMap data) throws Excep TemplateResponseDocumentFieldGroup.class); } - public TemplateResponseDocumentFieldGroup name(String name) { + public TemplateResponseDocumentFieldGroup name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -75,11 +75,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFieldGroup rule(TemplateResponseDocumentFieldGroupRule rule) { + public TemplateResponseDocumentFieldGroup rule( + @javax.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; return this; } @@ -97,7 +98,7 @@ public TemplateResponseDocumentFieldGroupRule getRule() { @JsonProperty(JSON_PROPERTY_RULE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRule(TemplateResponseDocumentFieldGroupRule rule) { + public void setRule(@javax.annotation.Nullable TemplateResponseDocumentFieldGroupRule rule) { this.rule = rule; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java index 0fa796c46..e1f8781ed 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java @@ -37,10 +37,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroupRule { public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; - private String requirement; + @javax.annotation.Nullable private String requirement; public static final String JSON_PROPERTY_GROUP_LABEL = "groupLabel"; - private String groupLabel; + @javax.annotation.Nullable private String groupLabel; public TemplateResponseDocumentFieldGroupRule() {} @@ -60,7 +60,8 @@ public static TemplateResponseDocumentFieldGroupRule init(HashMap data) throws E TemplateResponseDocumentFieldGroupRule.class); } - public TemplateResponseDocumentFieldGroupRule requirement(String requirement) { + public TemplateResponseDocumentFieldGroupRule requirement( + @javax.annotation.Nullable String requirement) { this.requirement = requirement; return this; } @@ -83,11 +84,12 @@ public String getRequirement() { @JsonProperty(JSON_PROPERTY_REQUIREMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequirement(String requirement) { + public void setRequirement(@javax.annotation.Nullable String requirement) { this.requirement = requirement; } - public TemplateResponseDocumentFieldGroupRule groupLabel(String groupLabel) { + public TemplateResponseDocumentFieldGroupRule groupLabel( + @javax.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; return this; } @@ -105,7 +107,7 @@ public String getGroupLabel() { @JsonProperty(JSON_PROPERTY_GROUP_LABEL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroupLabel(String groupLabel) { + public void setGroupLabel(@javax.annotation.Nullable String groupLabel) { this.groupLabel = groupLabel; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java index 36940640a..b4fc890d7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java @@ -66,31 +66,31 @@ }) public class TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer; + @javax.annotation.Nullable private String signer; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public TemplateResponseDocumentFormFieldBase() {} @@ -110,7 +110,7 @@ public static TemplateResponseDocumentFormFieldBase init(HashMap data) throws Ex TemplateResponseDocumentFormFieldBase.class); } - public TemplateResponseDocumentFormFieldBase type(String type) { + public TemplateResponseDocumentFormFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -129,11 +129,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldBase apiId(String apiId) { + public TemplateResponseDocumentFormFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -151,11 +151,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentFormFieldBase name(String name) { + public TemplateResponseDocumentFormFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -173,11 +173,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentFormFieldBase signer(String signer) { + public TemplateResponseDocumentFormFieldBase signer(@javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -200,7 +200,7 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } @@ -208,7 +208,7 @@ public void setSigner(Integer signer) { this.signer = String.valueOf(signer); } - public TemplateResponseDocumentFormFieldBase x(Integer x) { + public TemplateResponseDocumentFormFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -226,11 +226,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentFormFieldBase y(Integer y) { + public TemplateResponseDocumentFormFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -248,11 +248,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentFormFieldBase width(Integer width) { + public TemplateResponseDocumentFormFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -270,11 +270,11 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentFormFieldBase height(Integer height) { + public TemplateResponseDocumentFormFieldBase height(@javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -292,11 +292,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentFormFieldBase required(Boolean required) { + public TemplateResponseDocumentFormFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -314,7 +315,7 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java index b291ffdd8..3928910b9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldCheckbox extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldCheckbox() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldCheckbox init(HashMap data) throw TemplateResponseDocumentFormFieldCheckbox.class); } - public TemplateResponseDocumentFormFieldCheckbox type(String type) { + public TemplateResponseDocumentFormFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldCheckbox group(String group) { + public TemplateResponseDocumentFormFieldCheckbox group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java index b43906f05..fa11c083c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldDateSigned extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDateSigned() {} @@ -68,7 +68,7 @@ public static TemplateResponseDocumentFormFieldDateSigned init(HashMap data) thr TemplateResponseDocumentFormFieldDateSigned.class); } - public TemplateResponseDocumentFormFieldDateSigned type(String type) { + public TemplateResponseDocumentFormFieldDateSigned type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -95,11 +95,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDateSigned group(String group) { + public TemplateResponseDocumentFormFieldDateSigned group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -118,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 1c6289c42..68a068a70 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldDropdown extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldDropdown() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldDropdown init(HashMap data) throw TemplateResponseDocumentFormFieldDropdown.class); } - public TemplateResponseDocumentFormFieldDropdown type(String type) { + public TemplateResponseDocumentFormFieldDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldDropdown group(String group) { + public TemplateResponseDocumentFormFieldDropdown group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java index b2af4e8f9..e05215a84 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java @@ -47,22 +47,22 @@ public class TemplateResponseDocumentFormFieldHyperlink extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldHyperlink() {} @@ -84,7 +84,7 @@ public static TemplateResponseDocumentFormFieldHyperlink init(HashMap data) thro TemplateResponseDocumentFormFieldHyperlink.class); } - public TemplateResponseDocumentFormFieldHyperlink type(String type) { + public TemplateResponseDocumentFormFieldHyperlink type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -111,12 +111,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentFormFieldHyperlink avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -134,11 +134,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldHyperlink isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldHyperlink isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -156,11 +158,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldHyperlink originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldHyperlink originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -178,11 +181,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldHyperlink fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldHyperlink fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -200,11 +204,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldHyperlink group(String group) { + public TemplateResponseDocumentFormFieldHyperlink group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -223,7 +228,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java index 17bc3553e..fcf15b814 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldInitials extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldInitials() {} @@ -67,7 +67,7 @@ public static TemplateResponseDocumentFormFieldInitials init(HashMap data) throw TemplateResponseDocumentFormFieldInitials.class); } - public TemplateResponseDocumentFormFieldInitials type(String type) { + public TemplateResponseDocumentFormFieldInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -94,11 +94,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldInitials group(String group) { + public TemplateResponseDocumentFormFieldInitials group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -117,7 +118,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java index 75b7a72ad..8a54089dd 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java @@ -42,10 +42,10 @@ visible = true) public class TemplateResponseDocumentFormFieldRadio extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nonnull private String group; public TemplateResponseDocumentFormFieldRadio() {} @@ -65,7 +65,7 @@ public static TemplateResponseDocumentFormFieldRadio init(HashMap data) throws E TemplateResponseDocumentFormFieldRadio.class); } - public TemplateResponseDocumentFormFieldRadio type(String type) { + public TemplateResponseDocumentFormFieldRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -92,11 +92,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldRadio group(String group) { + public TemplateResponseDocumentFormFieldRadio group(@javax.annotation.Nonnull String group) { this.group = group; return this; } @@ -116,7 +116,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nonnull String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java index 15630a485..08e6f6c5b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java @@ -43,10 +43,10 @@ public class TemplateResponseDocumentFormFieldSignature extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldSignature() {} @@ -68,7 +68,7 @@ public static TemplateResponseDocumentFormFieldSignature init(HashMap data) thro TemplateResponseDocumentFormFieldSignature.class); } - public TemplateResponseDocumentFormFieldSignature type(String type) { + public TemplateResponseDocumentFormFieldSignature type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -95,11 +95,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentFormFieldSignature group(String group) { + public TemplateResponseDocumentFormFieldSignature group( + @javax.annotation.Nullable String group) { this.group = group; return this; } @@ -118,7 +119,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java index dbb22a6d1..3b7b4680e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java @@ -49,19 +49,19 @@ visible = true) public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocumentFormFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public static final String JSON_PROPERTY_AVG_TEXT_LENGTH = "avg_text_length"; - private TemplateResponseFieldAvgTextLength avgTextLength; + @javax.annotation.Nullable private TemplateResponseFieldAvgTextLength avgTextLength; public static final String JSON_PROPERTY_IS_MULTILINE = "isMultiline"; - private Boolean isMultiline; + @javax.annotation.Nullable private Boolean isMultiline; public static final String JSON_PROPERTY_ORIGINAL_FONT_SIZE = "originalFontSize"; - private Integer originalFontSize; + @javax.annotation.Nullable private Integer originalFontSize; public static final String JSON_PROPERTY_FONT_FAMILY = "fontFamily"; - private String fontFamily; + @javax.annotation.Nullable private String fontFamily; /** * Each text field may contain a `validation_type` parameter. Check out the list of @@ -69,25 +69,25 @@ public class TemplateResponseDocumentFormFieldText extends TemplateResponseDocum * the possible values. */ public enum ValidationTypeEnum { - NUMBERS_ONLY("numbers_only"), + NUMBERS_ONLY(String.valueOf("numbers_only")), - LETTERS_ONLY("letters_only"), + LETTERS_ONLY(String.valueOf("letters_only")), - PHONE_NUMBER("phone_number"), + PHONE_NUMBER(String.valueOf("phone_number")), - BANK_ROUTING_NUMBER("bank_routing_number"), + BANK_ROUTING_NUMBER(String.valueOf("bank_routing_number")), - BANK_ACCOUNT_NUMBER("bank_account_number"), + BANK_ACCOUNT_NUMBER(String.valueOf("bank_account_number")), - EMAIL_ADDRESS("email_address"), + EMAIL_ADDRESS(String.valueOf("email_address")), - ZIP_CODE("zip_code"), + ZIP_CODE(String.valueOf("zip_code")), - SOCIAL_SECURITY_NUMBER("social_security_number"), + SOCIAL_SECURITY_NUMBER(String.valueOf("social_security_number")), - EMPLOYER_IDENTIFICATION_NUMBER("employer_identification_number"), + EMPLOYER_IDENTIFICATION_NUMBER(String.valueOf("employer_identification_number")), - CUSTOM_REGEX("custom_regex"); + CUSTOM_REGEX(String.valueOf("custom_regex")); private String value; @@ -117,10 +117,10 @@ public static ValidationTypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_VALIDATION_TYPE = "validation_type"; - private ValidationTypeEnum validationType; + @javax.annotation.Nullable private ValidationTypeEnum validationType; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentFormFieldText() {} @@ -140,7 +140,7 @@ public static TemplateResponseDocumentFormFieldText init(HashMap data) throws Ex TemplateResponseDocumentFormFieldText.class); } - public TemplateResponseDocumentFormFieldText type(String type) { + public TemplateResponseDocumentFormFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -167,12 +167,12 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } public TemplateResponseDocumentFormFieldText avgTextLength( - TemplateResponseFieldAvgTextLength avgTextLength) { + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; return this; } @@ -190,11 +190,13 @@ public TemplateResponseFieldAvgTextLength getAvgTextLength() { @JsonProperty(JSON_PROPERTY_AVG_TEXT_LENGTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAvgTextLength(TemplateResponseFieldAvgTextLength avgTextLength) { + public void setAvgTextLength( + @javax.annotation.Nullable TemplateResponseFieldAvgTextLength avgTextLength) { this.avgTextLength = avgTextLength; } - public TemplateResponseDocumentFormFieldText isMultiline(Boolean isMultiline) { + public TemplateResponseDocumentFormFieldText isMultiline( + @javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; return this; } @@ -212,11 +214,12 @@ public Boolean getIsMultiline() { @JsonProperty(JSON_PROPERTY_IS_MULTILINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsMultiline(Boolean isMultiline) { + public void setIsMultiline(@javax.annotation.Nullable Boolean isMultiline) { this.isMultiline = isMultiline; } - public TemplateResponseDocumentFormFieldText originalFontSize(Integer originalFontSize) { + public TemplateResponseDocumentFormFieldText originalFontSize( + @javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; return this; } @@ -234,11 +237,12 @@ public Integer getOriginalFontSize() { @JsonProperty(JSON_PROPERTY_ORIGINAL_FONT_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOriginalFontSize(Integer originalFontSize) { + public void setOriginalFontSize(@javax.annotation.Nullable Integer originalFontSize) { this.originalFontSize = originalFontSize; } - public TemplateResponseDocumentFormFieldText fontFamily(String fontFamily) { + public TemplateResponseDocumentFormFieldText fontFamily( + @javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; return this; } @@ -256,11 +260,12 @@ public String getFontFamily() { @JsonProperty(JSON_PROPERTY_FONT_FAMILY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFontFamily(String fontFamily) { + public void setFontFamily(@javax.annotation.Nullable String fontFamily) { this.fontFamily = fontFamily; } - public TemplateResponseDocumentFormFieldText validationType(ValidationTypeEnum validationType) { + public TemplateResponseDocumentFormFieldText validationType( + @javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; return this; } @@ -280,11 +285,11 @@ public ValidationTypeEnum getValidationType() { @JsonProperty(JSON_PROPERTY_VALIDATION_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setValidationType(ValidationTypeEnum validationType) { + public void setValidationType(@javax.annotation.Nullable ValidationTypeEnum validationType) { this.validationType = validationType; } - public TemplateResponseDocumentFormFieldText group(String group) { + public TemplateResponseDocumentFormFieldText group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -303,7 +308,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java index 164ee218b..170b98234 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java @@ -75,34 +75,34 @@ }) public class TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + @javax.annotation.Nonnull private String type; public static final String JSON_PROPERTY_API_ID = "api_id"; - private String apiId; + @javax.annotation.Nullable private String apiId; public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_SIGNER = "signer"; - private String signer = "me_now"; + @javax.annotation.Nullable private String signer = "me_now"; public static final String JSON_PROPERTY_X = "x"; - private Integer x; + @javax.annotation.Nullable private Integer x; public static final String JSON_PROPERTY_Y = "y"; - private Integer y; + @javax.annotation.Nullable private Integer y; public static final String JSON_PROPERTY_WIDTH = "width"; - private Integer width; + @javax.annotation.Nullable private Integer width; public static final String JSON_PROPERTY_HEIGHT = "height"; - private Integer height; + @javax.annotation.Nullable private Integer height; public static final String JSON_PROPERTY_REQUIRED = "required"; - private Boolean required; + @javax.annotation.Nullable private Boolean required; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + @javax.annotation.Nullable private String group; public TemplateResponseDocumentStaticFieldBase() {} @@ -123,7 +123,7 @@ public static TemplateResponseDocumentStaticFieldBase init(HashMap data) throws TemplateResponseDocumentStaticFieldBase.class); } - public TemplateResponseDocumentStaticFieldBase type(String type) { + public TemplateResponseDocumentStaticFieldBase type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -142,11 +142,11 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } - public TemplateResponseDocumentStaticFieldBase apiId(String apiId) { + public TemplateResponseDocumentStaticFieldBase apiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; return this; } @@ -164,11 +164,11 @@ public String getApiId() { @JsonProperty(JSON_PROPERTY_API_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setApiId(String apiId) { + public void setApiId(@javax.annotation.Nullable String apiId) { this.apiId = apiId; } - public TemplateResponseDocumentStaticFieldBase name(String name) { + public TemplateResponseDocumentStaticFieldBase name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -186,11 +186,12 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseDocumentStaticFieldBase signer(String signer) { + public TemplateResponseDocumentStaticFieldBase signer( + @javax.annotation.Nullable String signer) { this.signer = signer; return this; } @@ -208,11 +209,11 @@ public String getSigner() { @JsonProperty(JSON_PROPERTY_SIGNER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigner(String signer) { + public void setSigner(@javax.annotation.Nullable String signer) { this.signer = signer; } - public TemplateResponseDocumentStaticFieldBase x(Integer x) { + public TemplateResponseDocumentStaticFieldBase x(@javax.annotation.Nullable Integer x) { this.x = x; return this; } @@ -230,11 +231,11 @@ public Integer getX() { @JsonProperty(JSON_PROPERTY_X) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setX(Integer x) { + public void setX(@javax.annotation.Nullable Integer x) { this.x = x; } - public TemplateResponseDocumentStaticFieldBase y(Integer y) { + public TemplateResponseDocumentStaticFieldBase y(@javax.annotation.Nullable Integer y) { this.y = y; return this; } @@ -252,11 +253,11 @@ public Integer getY() { @JsonProperty(JSON_PROPERTY_Y) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setY(Integer y) { + public void setY(@javax.annotation.Nullable Integer y) { this.y = y; } - public TemplateResponseDocumentStaticFieldBase width(Integer width) { + public TemplateResponseDocumentStaticFieldBase width(@javax.annotation.Nullable Integer width) { this.width = width; return this; } @@ -274,11 +275,12 @@ public Integer getWidth() { @JsonProperty(JSON_PROPERTY_WIDTH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWidth(Integer width) { + public void setWidth(@javax.annotation.Nullable Integer width) { this.width = width; } - public TemplateResponseDocumentStaticFieldBase height(Integer height) { + public TemplateResponseDocumentStaticFieldBase height( + @javax.annotation.Nullable Integer height) { this.height = height; return this; } @@ -296,11 +298,12 @@ public Integer getHeight() { @JsonProperty(JSON_PROPERTY_HEIGHT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHeight(Integer height) { + public void setHeight(@javax.annotation.Nullable Integer height) { this.height = height; } - public TemplateResponseDocumentStaticFieldBase required(Boolean required) { + public TemplateResponseDocumentStaticFieldBase required( + @javax.annotation.Nullable Boolean required) { this.required = required; return this; } @@ -318,11 +321,11 @@ public Boolean getRequired() { @JsonProperty(JSON_PROPERTY_REQUIRED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequired(Boolean required) { + public void setRequired(@javax.annotation.Nullable Boolean required) { this.required = required; } - public TemplateResponseDocumentStaticFieldBase group(String group) { + public TemplateResponseDocumentStaticFieldBase group(@javax.annotation.Nullable String group) { this.group = group; return this; } @@ -341,7 +344,7 @@ public String getGroup() { @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setGroup(String group) { + public void setGroup(@javax.annotation.Nullable String group) { this.group = group; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java index 774abc3a2..c1425d209 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldCheckbox extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "checkbox"; + @javax.annotation.Nonnull private String type = "checkbox"; public TemplateResponseDocumentStaticFieldCheckbox() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldCheckbox init(HashMap data) thr TemplateResponseDocumentStaticFieldCheckbox.class); } - public TemplateResponseDocumentStaticFieldCheckbox type(String type) { + public TemplateResponseDocumentStaticFieldCheckbox type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java index d0674f84a..fbe47e5fc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldDateSigned extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "date_signed"; + @javax.annotation.Nonnull private String type = "date_signed"; public TemplateResponseDocumentStaticFieldDateSigned() {} @@ -63,7 +63,8 @@ public static TemplateResponseDocumentStaticFieldDateSigned init(HashMap data) TemplateResponseDocumentStaticFieldDateSigned.class); } - public TemplateResponseDocumentStaticFieldDateSigned type(String type) { + public TemplateResponseDocumentStaticFieldDateSigned type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -90,7 +91,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java index 343de411d..4c9a3f845 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldDropdown extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "dropdown"; + @javax.annotation.Nonnull private String type = "dropdown"; public TemplateResponseDocumentStaticFieldDropdown() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldDropdown init(HashMap data) thr TemplateResponseDocumentStaticFieldDropdown.class); } - public TemplateResponseDocumentStaticFieldDropdown type(String type) { + public TemplateResponseDocumentStaticFieldDropdown type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java index 15267904e..22042094d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldHyperlink extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "hyperlink"; + @javax.annotation.Nonnull private String type = "hyperlink"; public TemplateResponseDocumentStaticFieldHyperlink() {} @@ -62,7 +62,8 @@ public static TemplateResponseDocumentStaticFieldHyperlink init(HashMap data) th TemplateResponseDocumentStaticFieldHyperlink.class); } - public TemplateResponseDocumentStaticFieldHyperlink type(String type) { + public TemplateResponseDocumentStaticFieldHyperlink type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +90,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java index 01f42023a..2f6728825 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldInitials extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "initials"; + @javax.annotation.Nonnull private String type = "initials"; public TemplateResponseDocumentStaticFieldInitials() {} @@ -62,7 +62,7 @@ public static TemplateResponseDocumentStaticFieldInitials init(HashMap data) thr TemplateResponseDocumentStaticFieldInitials.class); } - public TemplateResponseDocumentStaticFieldInitials type(String type) { + public TemplateResponseDocumentStaticFieldInitials type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +89,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java index c1c658d13..15bd66274 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldRadio extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "radio"; + @javax.annotation.Nonnull private String type = "radio"; public TemplateResponseDocumentStaticFieldRadio() {} @@ -61,7 +61,7 @@ public static TemplateResponseDocumentStaticFieldRadio init(HashMap data) throws TemplateResponseDocumentStaticFieldRadio.class); } - public TemplateResponseDocumentStaticFieldRadio type(String type) { + public TemplateResponseDocumentStaticFieldRadio type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +88,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java index 3fd603737..29ff17534 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldSignature extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "signature"; + @javax.annotation.Nonnull private String type = "signature"; public TemplateResponseDocumentStaticFieldSignature() {} @@ -62,7 +62,8 @@ public static TemplateResponseDocumentStaticFieldSignature init(HashMap data) th TemplateResponseDocumentStaticFieldSignature.class); } - public TemplateResponseDocumentStaticFieldSignature type(String type) { + public TemplateResponseDocumentStaticFieldSignature type( + @javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -89,7 +90,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java index e8f17977b..e50e0f0ca 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java @@ -40,7 +40,7 @@ public class TemplateResponseDocumentStaticFieldText extends TemplateResponseDocumentStaticFieldBase { public static final String JSON_PROPERTY_TYPE = "type"; - private String type = "text"; + @javax.annotation.Nonnull private String type = "text"; public TemplateResponseDocumentStaticFieldText() {} @@ -61,7 +61,7 @@ public static TemplateResponseDocumentStaticFieldText init(HashMap data) throws TemplateResponseDocumentStaticFieldText.class); } - public TemplateResponseDocumentStaticFieldText type(String type) { + public TemplateResponseDocumentStaticFieldText type(@javax.annotation.Nonnull String type) { this.type = type; return this; } @@ -88,7 +88,7 @@ public String getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(String type) { + public void setType(@javax.annotation.Nonnull String type) { this.type = type; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java index b5a9afb52..654d2786d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseFieldAvgTextLength { public static final String JSON_PROPERTY_NUM_LINES = "num_lines"; - private Integer numLines; + @javax.annotation.Nullable private Integer numLines; public static final String JSON_PROPERTY_NUM_CHARS_PER_LINE = "num_chars_per_line"; - private Integer numCharsPerLine; + @javax.annotation.Nullable private Integer numCharsPerLine; public TemplateResponseFieldAvgTextLength() {} @@ -57,7 +57,8 @@ public static TemplateResponseFieldAvgTextLength init(HashMap data) throws Excep TemplateResponseFieldAvgTextLength.class); } - public TemplateResponseFieldAvgTextLength numLines(Integer numLines) { + public TemplateResponseFieldAvgTextLength numLines( + @javax.annotation.Nullable Integer numLines) { this.numLines = numLines; return this; } @@ -75,11 +76,12 @@ public Integer getNumLines() { @JsonProperty(JSON_PROPERTY_NUM_LINES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumLines(Integer numLines) { + public void setNumLines(@javax.annotation.Nullable Integer numLines) { this.numLines = numLines; } - public TemplateResponseFieldAvgTextLength numCharsPerLine(Integer numCharsPerLine) { + public TemplateResponseFieldAvgTextLength numCharsPerLine( + @javax.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; return this; } @@ -97,7 +99,7 @@ public Integer getNumCharsPerLine() { @JsonProperty(JSON_PROPERTY_NUM_CHARS_PER_LINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNumCharsPerLine(Integer numCharsPerLine) { + public void setNumCharsPerLine(@javax.annotation.Nullable Integer numCharsPerLine) { this.numCharsPerLine = numCharsPerLine; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java index 4724f47e5..2493cef0c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseSignerRole { public static final String JSON_PROPERTY_NAME = "name"; - private String name; + @javax.annotation.Nullable private String name; public static final String JSON_PROPERTY_ORDER = "order"; - private Integer order; + @javax.annotation.Nullable private Integer order; public TemplateResponseSignerRole() {} @@ -57,7 +57,7 @@ public static TemplateResponseSignerRole init(HashMap data) throws Exception { TemplateResponseSignerRole.class); } - public TemplateResponseSignerRole name(String name) { + public TemplateResponseSignerRole name(@javax.annotation.Nullable String name) { this.name = name; return this; } @@ -75,11 +75,11 @@ public String getName() { @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { + public void setName(@javax.annotation.Nullable String name) { this.name = name; } - public TemplateResponseSignerRole order(Integer order) { + public TemplateResponseSignerRole order(@javax.annotation.Nullable Integer order) { this.order = order; return this; } @@ -97,7 +97,7 @@ public Integer getOrder() { @JsonProperty(JSON_PROPERTY_ORDER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOrder(Integer order) { + public void setOrder(@javax.annotation.Nullable Integer order) { this.order = order; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java index 6404a95aa..898248851 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java @@ -41,22 +41,22 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public TemplateUpdateFilesRequest() {} @@ -76,7 +76,7 @@ public static TemplateUpdateFilesRequest init(HashMap data) throws Exception { TemplateUpdateFilesRequest.class); } - public TemplateUpdateFilesRequest clientId(String clientId) { + public TemplateUpdateFilesRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -94,11 +94,11 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public TemplateUpdateFilesRequest files(List files) { + public TemplateUpdateFilesRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -125,11 +125,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public TemplateUpdateFilesRequest fileUrls(List fileUrls) { + public TemplateUpdateFilesRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -156,11 +156,11 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public TemplateUpdateFilesRequest message(String message) { + public TemplateUpdateFilesRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -178,11 +178,11 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public TemplateUpdateFilesRequest subject(String subject) { + public TemplateUpdateFilesRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -200,11 +200,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public TemplateUpdateFilesRequest testMode(Boolean testMode) { + public TemplateUpdateFilesRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -223,7 +223,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java index 396c7548f..373a3a764 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java @@ -31,7 +31,7 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; - private TemplateUpdateFilesResponseTemplate template; + @javax.annotation.Nonnull private TemplateUpdateFilesResponseTemplate template; public TemplateUpdateFilesResponse() {} @@ -51,7 +51,8 @@ public static TemplateUpdateFilesResponse init(HashMap data) throws Exception { TemplateUpdateFilesResponse.class); } - public TemplateUpdateFilesResponse template(TemplateUpdateFilesResponseTemplate template) { + public TemplateUpdateFilesResponse template( + @javax.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; return this; } @@ -70,7 +71,8 @@ public TemplateUpdateFilesResponseTemplate getTemplate() { @JsonProperty(JSON_PROPERTY_TEMPLATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplate(TemplateUpdateFilesResponseTemplate template) { + public void setTemplate( + @javax.annotation.Nonnull TemplateUpdateFilesResponseTemplate template) { this.template = template; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java index 08f0784e7..21b0b2a13 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; - private String templateId; + @javax.annotation.Nullable private String templateId; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - @Deprecated private List warnings = null; + @Deprecated @javax.annotation.Nullable private List warnings = null; public TemplateUpdateFilesResponseTemplate() {} @@ -59,7 +59,8 @@ public static TemplateUpdateFilesResponseTemplate init(HashMap data) throws Exce TemplateUpdateFilesResponseTemplate.class); } - public TemplateUpdateFilesResponseTemplate templateId(String templateId) { + public TemplateUpdateFilesResponseTemplate templateId( + @javax.annotation.Nullable String templateId) { this.templateId = templateId; return this; } @@ -77,12 +78,13 @@ public String getTemplateId() { @JsonProperty(JSON_PROPERTY_TEMPLATE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTemplateId(String templateId) { + public void setTemplateId(@javax.annotation.Nullable String templateId) { this.templateId = templateId; } @Deprecated - public TemplateUpdateFilesResponseTemplate warnings(List warnings) { + public TemplateUpdateFilesResponseTemplate warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -111,7 +113,7 @@ public List getWarnings() { @Deprecated @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java index 17f7ccabf..1a26b5607 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java @@ -73,106 +73,107 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = true; + @javax.annotation.Nullable private Boolean allowCcs = true; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORCE_SIGNER_PAGE = "force_signer_page"; - private Boolean forceSignerPage = false; + @javax.annotation.Nullable private Boolean forceSignerPage = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; + @javax.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview; + @javax.annotation.Nullable private Boolean showPreview; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; /** * The type of the draft. By default this is `request_signature`, but you can set it * to `send_document` if you want to self sign a document and download it. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -202,20 +203,20 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; + @javax.annotation.Nullable private TypeEnum type = TypeEnum.REQUEST_SIGNATURE; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateEmbeddedRequest() {} @@ -235,7 +236,7 @@ public static UnclaimedDraftCreateEmbeddedRequest init(HashMap data) throws Exce UnclaimedDraftCreateEmbeddedRequest.class); } - public UnclaimedDraftCreateEmbeddedRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -255,11 +256,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftCreateEmbeddedRequest requesterEmailAddress( + @javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -279,11 +281,11 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedRequest files(List files) { + public UnclaimedDraftCreateEmbeddedRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -310,11 +312,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -341,11 +344,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateEmbeddedRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -364,11 +368,12 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } - public UnclaimedDraftCreateEmbeddedRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -387,11 +392,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -411,11 +417,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedRequest attachments(List attachments) { + public UnclaimedDraftCreateEmbeddedRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -441,11 +448,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateEmbeddedRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -472,11 +480,12 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateEmbeddedRequest customFields(List customFields) { + public UnclaimedDraftCreateEmbeddedRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -513,11 +522,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateEmbeddedRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftCreateEmbeddedRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -535,11 +545,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftCreateEmbeddedRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateEmbeddedRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -557,11 +568,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedRequest forceSignerPage(Boolean forceSignerPage) { + public UnclaimedDraftCreateEmbeddedRequest forceSignerPage( + @javax.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; return this; } @@ -579,11 +591,12 @@ public Boolean getForceSignerPage() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_PAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerPage(Boolean forceSignerPage) { + public void setForceSignerPage(@javax.annotation.Nullable Boolean forceSignerPage) { this.forceSignerPage = forceSignerPage; } - public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage(Boolean forceSubjectMessage) { + public UnclaimedDraftCreateEmbeddedRequest forceSubjectMessage( + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -601,12 +614,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } public UnclaimedDraftCreateEmbeddedRequest formFieldGroups( - List formFieldGroups) { + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -636,12 +649,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } public UnclaimedDraftCreateEmbeddedRequest formFieldRules( - List formFieldRules) { + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -668,12 +682,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public UnclaimedDraftCreateEmbeddedRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -715,11 +730,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateEmbeddedRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateEmbeddedRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -742,11 +759,12 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateEmbeddedRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedRequest holdRequest( + @javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -767,11 +785,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } - public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftCreateEmbeddedRequest isForEmbeddedSigning( + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -790,11 +809,11 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedRequest message(String message) { + public UnclaimedDraftCreateEmbeddedRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -812,11 +831,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -846,11 +866,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -868,11 +889,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -893,11 +915,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } - public UnclaimedDraftCreateEmbeddedRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateEmbeddedRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -916,11 +939,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateEmbeddedRequest signers(List signers) { + public UnclaimedDraftCreateEmbeddedRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -946,11 +970,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateEmbeddedRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateEmbeddedRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -968,11 +993,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateEmbeddedRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -990,11 +1016,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -1013,11 +1040,11 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -1035,11 +1062,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -1058,11 +1086,11 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedRequest type(TypeEnum type) { + public UnclaimedDraftCreateEmbeddedRequest type(@javax.annotation.Nullable TypeEnum type) { this.type = type; return this; } @@ -1081,11 +1109,12 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nullable TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateEmbeddedRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -1109,11 +1138,12 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateEmbeddedRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateEmbeddedRequest useTextTags( + @javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -1137,12 +1167,12 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } public UnclaimedDraftCreateEmbeddedRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -1164,11 +1194,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateEmbeddedRequest expiresAt( + @javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -1189,7 +1221,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java index 8310985d9..a201ebbda 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java @@ -65,95 +65,95 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nonnull private String requesterEmailAddress; public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; - private List templateIds = new ArrayList<>(); + @javax.annotation.Nonnull private List templateIds = new ArrayList<>(); public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ALLOW_REASSIGN = "allow_reassign"; - private Boolean allowReassign = false; + @javax.annotation.Nullable private Boolean allowReassign = false; public static final String JSON_PROPERTY_CCS = "ccs"; - private List ccs = null; + @javax.annotation.Nullable private List ccs = null; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_FORCE_SIGNER_ROLES = "force_signer_roles"; - private Boolean forceSignerRoles = false; + @javax.annotation.Nullable private Boolean forceSignerRoles = false; public static final String JSON_PROPERTY_FORCE_SUBJECT_MESSAGE = "force_subject_message"; - private Boolean forceSubjectMessage = false; + @javax.annotation.Nullable private Boolean forceSubjectMessage = false; public static final String JSON_PROPERTY_HOLD_REQUEST = "hold_request"; - private Boolean holdRequest = false; + @javax.annotation.Nullable private Boolean holdRequest = false; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning = false; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_PREVIEW_ONLY = "preview_only"; - private Boolean previewOnly = false; + @javax.annotation.Nullable private Boolean previewOnly = false; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PREVIEW = "show_preview"; - private Boolean showPreview = false; + @javax.annotation.Nullable private Boolean showPreview = false; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SKIP_ME_NOW = "skip_me_now"; - private Boolean skipMeNow = false; + @javax.annotation.Nullable private Boolean skipMeNow = false; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_TITLE = "title"; - private String title; + @javax.annotation.Nullable private String title; public static final String JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS = "populate_auto_fill_fields"; - private Boolean populateAutoFillFields = false; + @javax.annotation.Nullable private Boolean populateAutoFillFields = false; public static final String JSON_PROPERTY_ALLOW_CCS = "allow_ccs"; - private Boolean allowCcs = false; + @javax.annotation.Nullable private Boolean allowCcs = false; public UnclaimedDraftCreateEmbeddedWithTemplateRequest() {} @@ -176,7 +176,8 @@ public static UnclaimedDraftCreateEmbeddedWithTemplateRequest init(HashMap data) UnclaimedDraftCreateEmbeddedWithTemplateRequest.class); } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId(String clientId) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest clientId( + @javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -196,12 +197,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest requesterEmailAddress( - String requesterEmailAddress) { + @javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -220,11 +221,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nonnull String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds(List templateIds) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest templateIds( + @javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; return this; } @@ -253,11 +255,12 @@ public List getTemplateIds() { @JsonProperty(JSON_PROPERTY_TEMPLATE_IDS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTemplateIds(List templateIds) { + public void setTemplateIds(@javax.annotation.Nonnull List templateIds) { this.templateIds = templateIds; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -276,11 +279,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign(Boolean allowReassign) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowReassign( + @javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; return this; } @@ -300,11 +304,12 @@ public Boolean getAllowReassign() { @JsonProperty(JSON_PROPERTY_ALLOW_REASSIGN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowReassign(Boolean allowReassign) { + public void setAllowReassign(@javax.annotation.Nullable Boolean allowReassign) { this.allowReassign = allowReassign; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs(List ccs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest ccs( + @javax.annotation.Nullable List ccs) { this.ccs = ccs; return this; } @@ -330,12 +335,12 @@ public List getCcs() { @JsonProperty(JSON_PROPERTY_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcs(List ccs) { + public void setCcs(@javax.annotation.Nullable List ccs) { this.ccs = ccs; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest customFields( - List customFields) { + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -363,12 +368,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest editorOptions( - SubEditorOptions editorOptions) { + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -386,12 +391,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest fieldOptions( - SubFieldOptions fieldOptions) { + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -409,11 +414,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest files(List files) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest files( + @javax.annotation.Nullable List files) { this.files = files; return this; } @@ -443,11 +449,12 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest fileUrls( + @javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -477,12 +484,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSignerRoles( - Boolean forceSignerRoles) { + @javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; return this; } @@ -500,12 +507,12 @@ public Boolean getForceSignerRoles() { @JsonProperty(JSON_PROPERTY_FORCE_SIGNER_ROLES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSignerRoles(Boolean forceSignerRoles) { + public void setForceSignerRoles(@javax.annotation.Nullable Boolean forceSignerRoles) { this.forceSignerRoles = forceSignerRoles; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest forceSubjectMessage( - Boolean forceSubjectMessage) { + @javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; return this; } @@ -523,11 +530,12 @@ public Boolean getForceSubjectMessage() { @JsonProperty(JSON_PROPERTY_FORCE_SUBJECT_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setForceSubjectMessage(Boolean forceSubjectMessage) { + public void setForceSubjectMessage(@javax.annotation.Nullable Boolean forceSubjectMessage) { this.forceSubjectMessage = forceSubjectMessage; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest(Boolean holdRequest) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest holdRequest( + @javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; return this; } @@ -547,12 +555,12 @@ public Boolean getHoldRequest() { @JsonProperty(JSON_PROPERTY_HOLD_REQUEST) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHoldRequest(Boolean holdRequest) { + public void setHoldRequest(@javax.annotation.Nullable Boolean holdRequest) { this.holdRequest = holdRequest; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest isForEmbeddedSigning( - Boolean isForEmbeddedSigning) { + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -571,11 +579,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest message(String message) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest message( + @javax.annotation.Nullable String message) { this.message = message; return this; } @@ -593,11 +602,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata(Map metadata) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -628,11 +638,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly(Boolean previewOnly) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest previewOnly( + @javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; return this; } @@ -654,12 +665,12 @@ public Boolean getPreviewOnly() { @JsonProperty(JSON_PROPERTY_PREVIEW_ONLY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPreviewOnly(Boolean previewOnly) { + public void setPreviewOnly(@javax.annotation.Nullable Boolean previewOnly) { this.previewOnly = previewOnly; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest requestingRedirectUrl( - String requestingRedirectUrl) { + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -677,11 +688,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview(Boolean showPreview) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest showPreview( + @javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; return this; } @@ -702,12 +714,12 @@ public Boolean getShowPreview() { @JsonProperty(JSON_PROPERTY_SHOW_PREVIEW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowPreview(Boolean showPreview) { + public void setShowPreview(@javax.annotation.Nullable Boolean showPreview) { this.showPreview = showPreview; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest showProgressStepper( - Boolean showProgressStepper) { + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -726,12 +738,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signers( - List signers) { + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -758,12 +770,13 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners( + @javax.annotation.Nullable List signers) { this.signers = signers; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingOptions( - SubSigningOptions signingOptions) { + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -781,12 +794,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest signingRedirectUrl( - String signingRedirectUrl) { + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -804,11 +817,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow(Boolean skipMeNow) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest skipMeNow( + @javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; return this; } @@ -827,11 +841,12 @@ public Boolean getSkipMeNow() { @JsonProperty(JSON_PROPERTY_SKIP_ME_NOW) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSkipMeNow(Boolean skipMeNow) { + public void setSkipMeNow(@javax.annotation.Nullable Boolean skipMeNow) { this.skipMeNow = skipMeNow; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject(String subject) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest subject( + @javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -849,11 +864,12 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -872,11 +888,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest title(String title) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest title( + @javax.annotation.Nullable String title) { this.title = title; return this; } @@ -894,12 +911,12 @@ public String getTitle() { @JsonProperty(JSON_PROPERTY_TITLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTitle(String title) { + public void setTitle(@javax.annotation.Nullable String title) { this.title = title; } public UnclaimedDraftCreateEmbeddedWithTemplateRequest populateAutoFillFields( - Boolean populateAutoFillFields) { + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; return this; } @@ -921,11 +938,13 @@ public Boolean getPopulateAutoFillFields() { @JsonProperty(JSON_PROPERTY_POPULATE_AUTO_FILL_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPopulateAutoFillFields(Boolean populateAutoFillFields) { + public void setPopulateAutoFillFields( + @javax.annotation.Nullable Boolean populateAutoFillFields) { this.populateAutoFillFields = populateAutoFillFields; } - public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs(Boolean allowCcs) { + public UnclaimedDraftCreateEmbeddedWithTemplateRequest allowCcs( + @javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; return this; } @@ -944,7 +963,7 @@ public Boolean getAllowCcs() { @JsonProperty(JSON_PROPERTY_ALLOW_CCS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowCcs(Boolean allowCcs) { + public void setAllowCcs(@javax.annotation.Nullable Boolean allowCcs) { this.allowCcs = allowCcs; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java index 2c2d0ff14..b6b7d70f1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java @@ -66,9 +66,9 @@ public class UnclaimedDraftCreateRequest { * `request_signature` then signers name and email_address are not optional. */ public enum TypeEnum { - SEND_DOCUMENT("send_document"), + SEND_DOCUMENT(String.valueOf("send_document")), - REQUEST_SIGNATURE("request_signature"); + REQUEST_SIGNATURE(String.valueOf("request_signature")); private String value; @@ -98,76 +98,77 @@ public static TypeEnum fromValue(String value) { } public static final String JSON_PROPERTY_TYPE = "type"; - private TypeEnum type; + @javax.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_FILES = "files"; - private List files = null; + @javax.annotation.Nullable private List files = null; public static final String JSON_PROPERTY_FILE_URLS = "file_urls"; - private List fileUrls = null; + @javax.annotation.Nullable private List fileUrls = null; public static final String JSON_PROPERTY_ALLOW_DECLINE = "allow_decline"; - private Boolean allowDecline = false; + @javax.annotation.Nullable private Boolean allowDecline = false; public static final String JSON_PROPERTY_ATTACHMENTS = "attachments"; - private List attachments = null; + @javax.annotation.Nullable private List attachments = null; public static final String JSON_PROPERTY_CC_EMAIL_ADDRESSES = "cc_email_addresses"; - private List ccEmailAddresses = null; + @javax.annotation.Nullable private List ccEmailAddresses = null; public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nullable private String clientId; public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; - private List customFields = null; + @javax.annotation.Nullable private List customFields = null; public static final String JSON_PROPERTY_FIELD_OPTIONS = "field_options"; - private SubFieldOptions fieldOptions; + @javax.annotation.Nullable private SubFieldOptions fieldOptions; public static final String JSON_PROPERTY_FORM_FIELD_GROUPS = "form_field_groups"; - private List formFieldGroups = null; + @javax.annotation.Nullable private List formFieldGroups = null; public static final String JSON_PROPERTY_FORM_FIELD_RULES = "form_field_rules"; - private List formFieldRules = null; + @javax.annotation.Nullable private List formFieldRules = null; public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; - private List formFieldsPerDocument = null; + + @javax.annotation.Nullable private List formFieldsPerDocument = null; public static final String JSON_PROPERTY_HIDE_TEXT_TAGS = "hide_text_tags"; - private Boolean hideTextTags = false; + @javax.annotation.Nullable private Boolean hideTextTags = false; public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; + @javax.annotation.Nullable private String message; public static final String JSON_PROPERTY_METADATA = "metadata"; - private Map metadata = null; + @javax.annotation.Nullable private Map metadata = null; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNERS = "signers"; - private List signers = null; + @javax.annotation.Nullable private List signers = null; public static final String JSON_PROPERTY_SIGNING_OPTIONS = "signing_options"; - private SubSigningOptions signingOptions; + @javax.annotation.Nullable private SubSigningOptions signingOptions; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_SUBJECT = "subject"; - private String subject; + @javax.annotation.Nullable private String subject; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public static final String JSON_PROPERTY_USE_PREEXISTING_FIELDS = "use_preexisting_fields"; - private Boolean usePreexistingFields = false; + @javax.annotation.Nullable private Boolean usePreexistingFields = false; public static final String JSON_PROPERTY_USE_TEXT_TAGS = "use_text_tags"; - private Boolean useTextTags = false; + @javax.annotation.Nullable private Boolean useTextTags = false; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public UnclaimedDraftCreateRequest() {} @@ -187,7 +188,7 @@ public static UnclaimedDraftCreateRequest init(HashMap data) throws Exception { UnclaimedDraftCreateRequest.class); } - public UnclaimedDraftCreateRequest type(TypeEnum type) { + public UnclaimedDraftCreateRequest type(@javax.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -208,11 +209,11 @@ public TypeEnum getType() { @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(TypeEnum type) { + public void setType(@javax.annotation.Nonnull TypeEnum type) { this.type = type; } - public UnclaimedDraftCreateRequest files(List files) { + public UnclaimedDraftCreateRequest files(@javax.annotation.Nullable List files) { this.files = files; return this; } @@ -239,11 +240,11 @@ public List getFiles() { @JsonProperty(JSON_PROPERTY_FILES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { + public void setFiles(@javax.annotation.Nullable List files) { this.files = files; } - public UnclaimedDraftCreateRequest fileUrls(List fileUrls) { + public UnclaimedDraftCreateRequest fileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; return this; } @@ -270,11 +271,12 @@ public List getFileUrls() { @JsonProperty(JSON_PROPERTY_FILE_URLS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFileUrls(List fileUrls) { + public void setFileUrls(@javax.annotation.Nullable List fileUrls) { this.fileUrls = fileUrls; } - public UnclaimedDraftCreateRequest allowDecline(Boolean allowDecline) { + public UnclaimedDraftCreateRequest allowDecline( + @javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; return this; } @@ -293,11 +295,12 @@ public Boolean getAllowDecline() { @JsonProperty(JSON_PROPERTY_ALLOW_DECLINE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAllowDecline(Boolean allowDecline) { + public void setAllowDecline(@javax.annotation.Nullable Boolean allowDecline) { this.allowDecline = allowDecline; } - public UnclaimedDraftCreateRequest attachments(List attachments) { + public UnclaimedDraftCreateRequest attachments( + @javax.annotation.Nullable List attachments) { this.attachments = attachments; return this; } @@ -323,11 +326,12 @@ public List getAttachments() { @JsonProperty(JSON_PROPERTY_ATTACHMENTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAttachments(List attachments) { + public void setAttachments(@javax.annotation.Nullable List attachments) { this.attachments = attachments; } - public UnclaimedDraftCreateRequest ccEmailAddresses(List ccEmailAddresses) { + public UnclaimedDraftCreateRequest ccEmailAddresses( + @javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; return this; } @@ -353,11 +357,11 @@ public List getCcEmailAddresses() { @JsonProperty(JSON_PROPERTY_CC_EMAIL_ADDRESSES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCcEmailAddresses(List ccEmailAddresses) { + public void setCcEmailAddresses(@javax.annotation.Nullable List ccEmailAddresses) { this.ccEmailAddresses = ccEmailAddresses; } - public UnclaimedDraftCreateRequest clientId(String clientId) { + public UnclaimedDraftCreateRequest clientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; return this; } @@ -376,11 +380,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nullable String clientId) { this.clientId = clientId; } - public UnclaimedDraftCreateRequest customFields(List customFields) { + public UnclaimedDraftCreateRequest customFields( + @javax.annotation.Nullable List customFields) { this.customFields = customFields; return this; } @@ -416,11 +421,12 @@ public List getCustomFields() { @JsonProperty(JSON_PROPERTY_CUSTOM_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomFields(List customFields) { + public void setCustomFields(@javax.annotation.Nullable List customFields) { this.customFields = customFields; } - public UnclaimedDraftCreateRequest fieldOptions(SubFieldOptions fieldOptions) { + public UnclaimedDraftCreateRequest fieldOptions( + @javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; return this; } @@ -438,11 +444,12 @@ public SubFieldOptions getFieldOptions() { @JsonProperty(JSON_PROPERTY_FIELD_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFieldOptions(SubFieldOptions fieldOptions) { + public void setFieldOptions(@javax.annotation.Nullable SubFieldOptions fieldOptions) { this.fieldOptions = fieldOptions; } - public UnclaimedDraftCreateRequest formFieldGroups(List formFieldGroups) { + public UnclaimedDraftCreateRequest formFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; return this; } @@ -472,11 +479,13 @@ public List getFormFieldGroups() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_GROUPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldGroups(List formFieldGroups) { + public void setFormFieldGroups( + @javax.annotation.Nullable List formFieldGroups) { this.formFieldGroups = formFieldGroups; } - public UnclaimedDraftCreateRequest formFieldRules(List formFieldRules) { + public UnclaimedDraftCreateRequest formFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; return this; } @@ -502,12 +511,13 @@ public List getFormFieldRules() { @JsonProperty(JSON_PROPERTY_FORM_FIELD_RULES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldRules(List formFieldRules) { + public void setFormFieldRules( + @javax.annotation.Nullable List formFieldRules) { this.formFieldRules = formFieldRules; } public UnclaimedDraftCreateRequest formFieldsPerDocument( - List formFieldsPerDocument) { + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; return this; } @@ -549,11 +559,13 @@ public List getFormFieldsPerDocument() { @JsonProperty(JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFormFieldsPerDocument(List formFieldsPerDocument) { + public void setFormFieldsPerDocument( + @javax.annotation.Nullable List formFieldsPerDocument) { this.formFieldsPerDocument = formFieldsPerDocument; } - public UnclaimedDraftCreateRequest hideTextTags(Boolean hideTextTags) { + public UnclaimedDraftCreateRequest hideTextTags( + @javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; return this; } @@ -576,11 +588,11 @@ public Boolean getHideTextTags() { @JsonProperty(JSON_PROPERTY_HIDE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setHideTextTags(Boolean hideTextTags) { + public void setHideTextTags(@javax.annotation.Nullable Boolean hideTextTags) { this.hideTextTags = hideTextTags; } - public UnclaimedDraftCreateRequest message(String message) { + public UnclaimedDraftCreateRequest message(@javax.annotation.Nullable String message) { this.message = message; return this; } @@ -598,11 +610,12 @@ public String getMessage() { @JsonProperty(JSON_PROPERTY_MESSAGE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { + public void setMessage(@javax.annotation.Nullable String message) { this.message = message; } - public UnclaimedDraftCreateRequest metadata(Map metadata) { + public UnclaimedDraftCreateRequest metadata( + @javax.annotation.Nullable Map metadata) { this.metadata = metadata; return this; } @@ -632,11 +645,12 @@ public Map getMetadata() { @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setMetadata(Map metadata) { + public void setMetadata(@javax.annotation.Nullable Map metadata) { this.metadata = metadata; } - public UnclaimedDraftCreateRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftCreateRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -655,11 +669,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftCreateRequest signers(List signers) { + public UnclaimedDraftCreateRequest signers( + @javax.annotation.Nullable List signers) { this.signers = signers; return this; } @@ -685,11 +700,12 @@ public List getSigners() { @JsonProperty(JSON_PROPERTY_SIGNERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigners(List signers) { + public void setSigners(@javax.annotation.Nullable List signers) { this.signers = signers; } - public UnclaimedDraftCreateRequest signingOptions(SubSigningOptions signingOptions) { + public UnclaimedDraftCreateRequest signingOptions( + @javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; return this; } @@ -707,11 +723,12 @@ public SubSigningOptions getSigningOptions() { @JsonProperty(JSON_PROPERTY_SIGNING_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningOptions(SubSigningOptions signingOptions) { + public void setSigningOptions(@javax.annotation.Nullable SubSigningOptions signingOptions) { this.signingOptions = signingOptions; } - public UnclaimedDraftCreateRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftCreateRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -729,11 +746,11 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftCreateRequest subject(String subject) { + public UnclaimedDraftCreateRequest subject(@javax.annotation.Nullable String subject) { this.subject = subject; return this; } @@ -751,11 +768,11 @@ public String getSubject() { @JsonProperty(JSON_PROPERTY_SUBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSubject(String subject) { + public void setSubject(@javax.annotation.Nullable String subject) { this.subject = subject; } - public UnclaimedDraftCreateRequest testMode(Boolean testMode) { + public UnclaimedDraftCreateRequest testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -774,11 +791,12 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } - public UnclaimedDraftCreateRequest usePreexistingFields(Boolean usePreexistingFields) { + public UnclaimedDraftCreateRequest usePreexistingFields( + @javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; return this; } @@ -802,11 +820,11 @@ public Boolean getUsePreexistingFields() { @JsonProperty(JSON_PROPERTY_USE_PREEXISTING_FIELDS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsePreexistingFields(Boolean usePreexistingFields) { + public void setUsePreexistingFields(@javax.annotation.Nullable Boolean usePreexistingFields) { this.usePreexistingFields = usePreexistingFields; } - public UnclaimedDraftCreateRequest useTextTags(Boolean useTextTags) { + public UnclaimedDraftCreateRequest useTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; return this; } @@ -830,11 +848,11 @@ public Boolean getUseTextTags() { @JsonProperty(JSON_PROPERTY_USE_TEXT_TAGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUseTextTags(Boolean useTextTags) { + public void setUseTextTags(@javax.annotation.Nullable Boolean useTextTags) { this.useTextTags = useTextTags; } - public UnclaimedDraftCreateRequest expiresAt(Integer expiresAt) { + public UnclaimedDraftCreateRequest expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -855,7 +873,7 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java index 6e6ed41c1..255069122 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java @@ -36,10 +36,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateResponse { public static final String JSON_PROPERTY_UNCLAIMED_DRAFT = "unclaimed_draft"; - private UnclaimedDraftResponse unclaimedDraft; + @javax.annotation.Nonnull private UnclaimedDraftResponse unclaimedDraft; public static final String JSON_PROPERTY_WARNINGS = "warnings"; - private List warnings = null; + @javax.annotation.Nullable private List warnings = null; public UnclaimedDraftCreateResponse() {} @@ -59,7 +59,8 @@ public static UnclaimedDraftCreateResponse init(HashMap data) throws Exception { UnclaimedDraftCreateResponse.class); } - public UnclaimedDraftCreateResponse unclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public UnclaimedDraftCreateResponse unclaimedDraft( + @javax.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; return this; } @@ -78,11 +79,12 @@ public UnclaimedDraftResponse getUnclaimedDraft() { @JsonProperty(JSON_PROPERTY_UNCLAIMED_DRAFT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUnclaimedDraft(UnclaimedDraftResponse unclaimedDraft) { + public void setUnclaimedDraft(@javax.annotation.Nonnull UnclaimedDraftResponse unclaimedDraft) { this.unclaimedDraft = unclaimedDraft; } - public UnclaimedDraftCreateResponse warnings(List warnings) { + public UnclaimedDraftCreateResponse warnings( + @javax.annotation.Nullable List warnings) { this.warnings = warnings; return this; } @@ -108,7 +110,7 @@ public List getWarnings() { @JsonProperty(JSON_PROPERTY_WARNINGS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setWarnings(List warnings) { + public void setWarnings(@javax.annotation.Nullable List warnings) { this.warnings = warnings; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java index eabad715c..bed8e5ff9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java @@ -40,28 +40,28 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftEditAndResendRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; - private String clientId; + @javax.annotation.Nonnull private String clientId; public static final String JSON_PROPERTY_EDITOR_OPTIONS = "editor_options"; - private SubEditorOptions editorOptions; + @javax.annotation.Nullable private SubEditorOptions editorOptions; public static final String JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING = "is_for_embedded_signing"; - private Boolean isForEmbeddedSigning; + @javax.annotation.Nullable private Boolean isForEmbeddedSigning; public static final String JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS = "requester_email_address"; - private String requesterEmailAddress; + @javax.annotation.Nullable private String requesterEmailAddress; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_SHOW_PROGRESS_STEPPER = "show_progress_stepper"; - private Boolean showProgressStepper = true; + @javax.annotation.Nullable private Boolean showProgressStepper = true; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode = false; + @javax.annotation.Nullable private Boolean testMode = false; public UnclaimedDraftEditAndResendRequest() {} @@ -81,7 +81,7 @@ public static UnclaimedDraftEditAndResendRequest init(HashMap data) throws Excep UnclaimedDraftEditAndResendRequest.class); } - public UnclaimedDraftEditAndResendRequest clientId(String clientId) { + public UnclaimedDraftEditAndResendRequest clientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; return this; } @@ -101,11 +101,12 @@ public String getClientId() { @JsonProperty(JSON_PROPERTY_CLIENT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClientId(String clientId) { + public void setClientId(@javax.annotation.Nonnull String clientId) { this.clientId = clientId; } - public UnclaimedDraftEditAndResendRequest editorOptions(SubEditorOptions editorOptions) { + public UnclaimedDraftEditAndResendRequest editorOptions( + @javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; return this; } @@ -123,11 +124,12 @@ public SubEditorOptions getEditorOptions() { @JsonProperty(JSON_PROPERTY_EDITOR_OPTIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEditorOptions(SubEditorOptions editorOptions) { + public void setEditorOptions(@javax.annotation.Nullable SubEditorOptions editorOptions) { this.editorOptions = editorOptions; } - public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public UnclaimedDraftEditAndResendRequest isForEmbeddedSigning( + @javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; return this; } @@ -146,11 +148,12 @@ public Boolean getIsForEmbeddedSigning() { @JsonProperty(JSON_PROPERTY_IS_FOR_EMBEDDED_SIGNING) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsForEmbeddedSigning(Boolean isForEmbeddedSigning) { + public void setIsForEmbeddedSigning(@javax.annotation.Nullable Boolean isForEmbeddedSigning) { this.isForEmbeddedSigning = isForEmbeddedSigning; } - public UnclaimedDraftEditAndResendRequest requesterEmailAddress(String requesterEmailAddress) { + public UnclaimedDraftEditAndResendRequest requesterEmailAddress( + @javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; return this; } @@ -169,11 +172,12 @@ public String getRequesterEmailAddress() { @JsonProperty(JSON_PROPERTY_REQUESTER_EMAIL_ADDRESS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequesterEmailAddress(String requesterEmailAddress) { + public void setRequesterEmailAddress(@javax.annotation.Nullable String requesterEmailAddress) { this.requesterEmailAddress = requesterEmailAddress; } - public UnclaimedDraftEditAndResendRequest requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -191,11 +195,12 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest showProgressStepper(Boolean showProgressStepper) { + public UnclaimedDraftEditAndResendRequest showProgressStepper( + @javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; return this; } @@ -214,11 +219,12 @@ public Boolean getShowProgressStepper() { @JsonProperty(JSON_PROPERTY_SHOW_PROGRESS_STEPPER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShowProgressStepper(Boolean showProgressStepper) { + public void setShowProgressStepper(@javax.annotation.Nullable Boolean showProgressStepper) { this.showProgressStepper = showProgressStepper; } - public UnclaimedDraftEditAndResendRequest signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftEditAndResendRequest signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -236,11 +242,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftEditAndResendRequest testMode(Boolean testMode) { + public UnclaimedDraftEditAndResendRequest testMode( + @javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -259,7 +266,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java index 7de5a3ecf..58675bc4d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java @@ -38,22 +38,22 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; - private String signatureRequestId; + @javax.annotation.Nullable private String signatureRequestId; public static final String JSON_PROPERTY_CLAIM_URL = "claim_url"; - private String claimUrl; + @javax.annotation.Nullable private String claimUrl; public static final String JSON_PROPERTY_SIGNING_REDIRECT_URL = "signing_redirect_url"; - private String signingRedirectUrl; + @javax.annotation.Nullable private String signingRedirectUrl; public static final String JSON_PROPERTY_REQUESTING_REDIRECT_URL = "requesting_redirect_url"; - private String requestingRedirectUrl; + @javax.annotation.Nullable private String requestingRedirectUrl; public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; - private Integer expiresAt; + @javax.annotation.Nullable private Integer expiresAt; public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; - private Boolean testMode; + @javax.annotation.Nullable private Boolean testMode; public UnclaimedDraftResponse() {} @@ -72,7 +72,8 @@ public static UnclaimedDraftResponse init(HashMap data) throws Exception { new ObjectMapper().writeValueAsString(data), UnclaimedDraftResponse.class); } - public UnclaimedDraftResponse signatureRequestId(String signatureRequestId) { + public UnclaimedDraftResponse signatureRequestId( + @javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; return this; } @@ -90,11 +91,11 @@ public String getSignatureRequestId() { @JsonProperty(JSON_PROPERTY_SIGNATURE_REQUEST_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSignatureRequestId(String signatureRequestId) { + public void setSignatureRequestId(@javax.annotation.Nullable String signatureRequestId) { this.signatureRequestId = signatureRequestId; } - public UnclaimedDraftResponse claimUrl(String claimUrl) { + public UnclaimedDraftResponse claimUrl(@javax.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; return this; } @@ -112,11 +113,12 @@ public String getClaimUrl() { @JsonProperty(JSON_PROPERTY_CLAIM_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClaimUrl(String claimUrl) { + public void setClaimUrl(@javax.annotation.Nullable String claimUrl) { this.claimUrl = claimUrl; } - public UnclaimedDraftResponse signingRedirectUrl(String signingRedirectUrl) { + public UnclaimedDraftResponse signingRedirectUrl( + @javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; return this; } @@ -134,11 +136,12 @@ public String getSigningRedirectUrl() { @JsonProperty(JSON_PROPERTY_SIGNING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSigningRedirectUrl(String signingRedirectUrl) { + public void setSigningRedirectUrl(@javax.annotation.Nullable String signingRedirectUrl) { this.signingRedirectUrl = signingRedirectUrl; } - public UnclaimedDraftResponse requestingRedirectUrl(String requestingRedirectUrl) { + public UnclaimedDraftResponse requestingRedirectUrl( + @javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; return this; } @@ -157,11 +160,11 @@ public String getRequestingRedirectUrl() { @JsonProperty(JSON_PROPERTY_REQUESTING_REDIRECT_URL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRequestingRedirectUrl(String requestingRedirectUrl) { + public void setRequestingRedirectUrl(@javax.annotation.Nullable String requestingRedirectUrl) { this.requestingRedirectUrl = requestingRedirectUrl; } - public UnclaimedDraftResponse expiresAt(Integer expiresAt) { + public UnclaimedDraftResponse expiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; return this; } @@ -179,11 +182,11 @@ public Integer getExpiresAt() { @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExpiresAt(Integer expiresAt) { + public void setExpiresAt(@javax.annotation.Nullable Integer expiresAt) { this.expiresAt = expiresAt; } - public UnclaimedDraftResponse testMode(Boolean testMode) { + public UnclaimedDraftResponse testMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; return this; } @@ -201,7 +204,7 @@ public Boolean getTestMode() { @JsonProperty(JSON_PROPERTY_TEST_MODE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTestMode(Boolean testMode) { + public void setTestMode(@javax.annotation.Nullable Boolean testMode) { this.testMode = testMode; } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java index acbd565ff..2cdf9165a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java @@ -34,10 +34,10 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class WarningResponse { public static final String JSON_PROPERTY_WARNING_MSG = "warning_msg"; - private String warningMsg; + @javax.annotation.Nonnull private String warningMsg; public static final String JSON_PROPERTY_WARNING_NAME = "warning_name"; - private String warningName; + @javax.annotation.Nonnull private String warningName; public WarningResponse() {} @@ -55,7 +55,7 @@ public static WarningResponse init(HashMap data) throws Exception { .readValue(new ObjectMapper().writeValueAsString(data), WarningResponse.class); } - public WarningResponse warningMsg(String warningMsg) { + public WarningResponse warningMsg(@javax.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; return this; } @@ -74,11 +74,11 @@ public String getWarningMsg() { @JsonProperty(JSON_PROPERTY_WARNING_MSG) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningMsg(String warningMsg) { + public void setWarningMsg(@javax.annotation.Nonnull String warningMsg) { this.warningMsg = warningMsg; } - public WarningResponse warningName(String warningName) { + public WarningResponse warningName(@javax.annotation.Nonnull String warningName) { this.warningName = warningName; return this; } @@ -97,7 +97,7 @@ public String getWarningName() { @JsonProperty(JSON_PROPERTY_WARNING_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setWarningName(String warningName) { + public void setWarningName(@javax.annotation.Nonnull String warningName) { this.warningName = warningName; } diff --git a/sdks/java-v1/templates/BeanValidationException.mustache b/sdks/java-v1/templates/BeanValidationException.mustache index d8b0fa695..d551902f8 100644 --- a/sdks/java-v1/templates/BeanValidationException.mustache +++ b/sdks/java-v1/templates/BeanValidationException.mustache @@ -4,8 +4,8 @@ package {{invokerPackage}}; import java.util.Set; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ValidationException; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.ValidationException; public class BeanValidationException extends ValidationException { /** diff --git a/sdks/java-v1/templates/Configuration.mustache b/sdks/java-v1/templates/Configuration.mustache index 8e9720e36..a5d9368da 100644 --- a/sdks/java-v1/templates/Configuration.mustache +++ b/sdks/java-v1/templates/Configuration.mustache @@ -2,29 +2,51 @@ package {{invokerPackage}}; +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + {{>generatedAnnotation}} public class Configuration { public static final String VERSION = "{{{artifactVersion}}}"; - private static ApiClient defaultApiClient = new ApiClient(); + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. + * 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; + 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. + * 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; + 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/sdks/java-v1/templates/JSON.mustache b/sdks/java-v1/templates/JSON.mustache index 1d0a81387..5ef02660d 100644 --- a/sdks/java-v1/templates/JSON.mustache +++ b/sdks/java-v1/templates/JSON.mustache @@ -31,9 +31,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/build.gradle.mustache b/sdks/java-v1/templates/build.gradle.mustache index 06f9bd5e9..6557a7c70 100644 --- a/sdks/java-v1/templates/build.gradle.mustache +++ b/sdks/java-v1/templates/build.gradle.mustache @@ -66,7 +66,7 @@ if(hasProperty('target') && target == 'android') { task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + archiveClassifier = 'sources' } artifacts { @@ -97,12 +97,12 @@ if(hasProperty('target') && target == 'android') { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -126,6 +126,9 @@ ext { jersey_version = "1.19.4" jodatime_version = "2.9.9" junit_version = "5.10.2" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -148,6 +151,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "junit:junit:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/javaBuilder.mustache b/sdks/java-v1/templates/javaBuilder.mustache index c02730081..4a0e102b8 100644 --- a/sdks/java-v1/templates/javaBuilder.mustache +++ b/sdks/java-v1/templates/javaBuilder.mustache @@ -14,9 +14,9 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par } {{#vars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} - this.instance.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} this.instance.{{name}} = {{name}}; @@ -24,7 +24,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } @@ -32,12 +32,12 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par {{/vars}} {{#parentVars}} - public {{classname}}.Builder {{name}}({{{datatypeWithEnum}}} {{name}}) { // inherited: {{isInherited}} + public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}} super.{{name}}({{name}}); return this; } {{#vendorExtensions.x-is-jackson-optional-nullable}} - public {{classname}}.Builder {{name}}(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + public {{classname}}.Builder {{name}}(JsonNullable<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}> {{name}}) { this.instance.{{name}} = {{name}}; return this; } diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache index a00c6dc45..67a110392 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache @@ -137,7 +137,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient(CloseableHttpClient httpClient) { objectMapper = new ObjectMapper(); objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); @@ -149,6 +149,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{#openApiNullable}} objectMapper.registerModule(new JsonNullableModule()); {{/openApiNullable}} + objectMapper.registerModule(new RFC3339JavaTimeModule()); objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); dateFormat = ApiClient.buildDefaultDateFormat(); @@ -444,7 +445,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param userAgent User agent * @return API client */ - public ApiClient setUserAgent(String userAgent) { + public final ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } @@ -466,7 +467,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param value The header's value * @return API client */ - public ApiClient addDefaultHeader(String key, String value) { + public final ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } @@ -622,7 +623,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @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 diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache index 27b456417..cfcd9f04c 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api.mustache @@ -24,8 +24,8 @@ import java.util.Map; import java.util.StringJoiner; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{>generatedAnnotation}} @@ -99,7 +99,7 @@ public class {{classname}} extends BaseApi { {{/required}}{{/allParams}} // create path and map variables String localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + .replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString(apiClient.parameterToString({{{paramName}}}))){{/pathParams}}; StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache index b4393ea82..05b2bf9fd 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache index 74a70a3ea..3a506ca3f 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/pom.mustache @@ -358,13 +358,12 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.2 diff --git a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache index 9a5b9bcd0..f744eec13 100644 --- a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache @@ -173,7 +173,12 @@ public class ApiClient { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + {{#failOnUnknownProperties}} + objectMapper.enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + {{/failOnUnknownProperties}} objectMapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); objectMapper.setDateFormat(new RFC3339DateFormat()); diff --git a/sdks/java-v1/templates/libraries/feign/README.mustache b/sdks/java-v1/templates/libraries/feign/README.mustache index fed3cbebd..c3d948749 100644 --- a/sdks/java-v1/templates/libraries/feign/README.mustache +++ b/sdks/java-v1/templates/libraries/feign/README.mustache @@ -32,7 +32,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -And to use the api you can follow the examples bellow: +And to use the api you can follow the examples below: ```java diff --git a/sdks/java-v1/templates/libraries/feign/api.mustache b/sdks/java-v1/templates/libraries/feign/api.mustache index af05d6595..d67de9a28 100644 --- a/sdks/java-v1/templates/libraries/feign/api.mustache +++ b/sdks/java-v1/templates/libraries/feign/api.mustache @@ -15,8 +15,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import feign.*; @@ -47,8 +47,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -77,8 +77,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -122,8 +122,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ -{{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", -{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} +{{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", +{{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) @@ -162,8 +162,8 @@ public interface {{classname}} extends ApiClient.Api { {{/isDeprecated}} @RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}") @Headers({ - {{#vendorExtensions.x-content-type}} "Content-Type: {{vendorExtensions.x-content-type}}", - {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{.}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} + {{#vendorExtensions.x-content-type}} "Content-Type: {{{vendorExtensions.x-content-type}}}", + {{/vendorExtensions.x-content-type}} "Accept: {{#vendorExtensions.x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/vendorExtensions.x-accepts}}",{{#headerParams}} "{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}}, {{/-last}}{{/headerParams}} }) diff --git a/sdks/java-v1/templates/libraries/feign/api_test.mustache b/sdks/java-v1/templates/libraries/feign/api_test.mustache index 1db841158..62521123f 100644 --- a/sdks/java-v1/templates/libraries/feign/api_test.mustache +++ b/sdks/java-v1/templates/libraries/feign/api_test.mustache @@ -14,8 +14,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache index 8af1cb136..b1b72389d 100644 --- a/sdks/java-v1/templates/libraries/feign/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.gradle.mustache @@ -114,6 +114,9 @@ ext { feign_form_version = "3.8.0" junit_version = "5.7.0" scribejava_version = "8.0.0" + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -142,11 +145,14 @@ dependencies { implementation "com.github.scribejava:scribejava-core:$scribejava_version" implementation "com.brsanthu:migbase64:2.2" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.1" testImplementation "org.hamcrest:hamcrest:2.2" - testImplementation "commons-io:commons-io:2.8.0" + testImplementation "commons-io:commons-io:2.16.1" testImplementation "ch.qos.logback:logback-classic:1.2.3" } diff --git a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache index 9af32c270..1a24b99f5 100644 --- a/sdks/java-v1/templates/libraries/feign/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/feign/build.sbt.mustache @@ -28,11 +28,14 @@ lazy val root = (project in file(".")). "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", "com.brsanthu" % "migbase64" % "2.2" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", +{{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", +{{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", "com.github.tomakehurst" % "wiremock-jre8" % "2.35.1" % "test", "org.hamcrest" % "hamcrest" % "2.2" % "test", - "commons-io" % "commons-io" % "2.8.0" % "test", + "commons-io" % "commons-io" % "2.16.1" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/feign/model.mustache b/sdks/java-v1/templates/libraries/feign/model.mustache index 5fa9bca80..108748f60 100644 --- a/sdks/java-v1/templates/libraries/feign/model.mustache +++ b/sdks/java-v1/templates/libraries/feign/model.mustache @@ -59,8 +59,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/feign/pojo.mustache b/sdks/java-v1/templates/libraries/feign/pojo.mustache index fe97e3b1b..76f119eb4 100644 --- a/sdks/java-v1/templates/libraries/feign/pojo.mustache +++ b/sdks/java-v1/templates/libraries/feign/pojo.mustache @@ -72,6 +72,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} {{#isContainer}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -189,17 +190,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -246,7 +237,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -272,7 +263,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens }{{#hasVars}} {{classname}} {{classVarName}} = ({{classname}}) o; return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && - {{/-last}}{{/vars}}{{#parent}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} {{/useReflectionEqualsHashCode}} @@ -288,7 +280,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens return HashCodeBuilder.reflectionHashCode(this); {{/useReflectionEqualsHashCode}} {{^useReflectionEqualsHashCode}} - return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); {{/useReflectionEqualsHashCode}} }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} @@ -309,6 +301,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} sb.append("}"); return sb.toString(); } diff --git a/sdks/java-v1/templates/libraries/feign/pom.mustache b/sdks/java-v1/templates/libraries/feign/pom.mustache index 9be4a094f..c915ea0ec 100644 --- a/sdks/java-v1/templates/libraries/feign/pom.mustache +++ b/sdks/java-v1/templates/libraries/feign/pom.mustache @@ -345,6 +345,14 @@ provided {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -403,13 +411,15 @@ {{/openApiNullable}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.0 1.0.0 8.3.3 diff --git a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache index 03c44a8ed..7d3e50fe1 100644 --- a/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/google-api-client/ApiClient.mustache @@ -34,7 +34,12 @@ public class ApiClient { // A reasonable default object mapper. Client can pass in a chosen ObjectMapper anyway, this is just for reasonable defaults. private static ObjectMapper createDefaultObjectMapper() { ObjectMapper objectMapper = new ObjectMapper() + {{#failOnUnknownProperties}} + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .setDateFormat(new RFC3339DateFormat()); {{#joda}} diff --git a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache index 6d5f8334e..23b435728 100644 --- a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache @@ -1001,24 +1001,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1047,6 +1033,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1377,7 +1393,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache index e1f17c972..8d6411b0e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache @@ -32,12 +32,12 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) -{{^useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} + {{^useCustomTemplateCode}} + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) + {{/useCustomTemplateCode}} + {{#useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) -{{/useCustomTemplateCode}} + {{/useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/api.mustache b/sdks/java-v1/templates/libraries/jersey2/api.mustache index b39d00df3..035edb3b7 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api.mustache @@ -12,8 +12,8 @@ import {{javaxPackage}}.ws.rs.core.GenericType; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; @@ -72,7 +72,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
+
+ {{#responses}} @@ -115,7 +116,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -226,7 +228,7 @@ public class {{classname}} { GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} {{^useCustomTemplateCode}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); {{/useCustomTemplateCode}} @@ -282,7 +284,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -302,7 +305,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache index 7b8214bd4..926ba0a82 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api_test.mustache @@ -17,8 +17,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache index 39aa19299..d3ea8ff60 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache @@ -229,6 +229,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} {{#useCustomTemplateCode}} mockito_version = "3.12.4" {{/useCustomTemplateCode}} @@ -265,6 +268,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" {{#useCustomTemplateCode}} diff --git a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache index bb525bf1f..3883888fe 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.sbt.mustache @@ -36,6 +36,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey2/model.mustache b/sdks/java-v1/templates/libraries/jersey2/model.mustache index 509857733..bf30b7f6e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/model.mustache @@ -42,8 +42,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache index 09906d7b0..c0716915e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} - {{#isArray}} public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache index 0ba5ad05a..a73f86943 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache @@ -91,6 +91,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} + {{>nullable_var_annotations}} {{^useCustomTemplateCode}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} @@ -150,7 +151,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -242,17 +243,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -302,7 +293,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey2/pom.mustache b/sdks/java-v1/templates/libraries/jersey2/pom.mustache index 9a596b00d..809547352 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pom.mustache @@ -404,6 +404,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -434,9 +443,11 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#useBeanValidation}} 3.0.2 @@ -448,6 +459,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 {{#useCustomTemplateCode}} 3.12.4 diff --git a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache index 09563afa7..a2d6dd380 100644 --- a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache @@ -988,24 +988,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) - .fileName(file.getName()).size(file.length()).build(); - - // Attempt to probe the content type for the file so that the form part is more correctly - // and precisely identified, but fall back to application/octet-stream if that fails. - MediaType type; - try { - type = MediaType.valueOf(Files.probeContentType(file.toPath())); - } catch (IOException | IllegalArgumentException e) { - type = MediaType.APPLICATION_OCTET_STREAM_TYPE; - } - - multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + if (param.getValue() instanceof Iterable) { + ((Iterable)param.getValue()).forEach(v -> addParamToMultipart(v, param.getKey(), multiPart)); } else { - FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); - multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + addParamToMultipart(param.getValue(), param.getKey(), multiPart); } } entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); @@ -1034,6 +1020,36 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return entity; } + /** + * Adds the object with the provided key to the MultiPart. + * Based on the object type sets Content-Disposition and Content-Type. + * + * @param obj Object + * @param key Key of the object + * @param multiPart MultiPart to add the form param to + */ + private void addParamToMultipart(Object value, String key, MultiPart multiPart) { + if (value instanceof File) { + File file = (File) value; + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key) + .fileName(file.getName()).size(file.length()).build(); + + // Attempt to probe the content type for the file so that the form part is more correctly + // and precisely identified, but fall back to application/octet-stream if that fails. + MediaType type; + try { + type = MediaType.valueOf(Files.probeContentType(file.toPath())); + } catch (IOException | IllegalArgumentException e) { + type = MediaType.APPLICATION_OCTET_STREAM_TYPE; + } + + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(key).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(value))); + } + } + /** * Serialize the given Java object into string according the given * Content-Type (only JSON, HTTP form is supported for now). @@ -1340,7 +1356,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else if ("PUT".equals(method)) { response = invocationBuilder.put(entity); } else if ("DELETE".equals(method)) { + if ("".equals(entity.getEntity())) { + response = invocationBuilder.method("DELETE"); + } else { response = invocationBuilder.method("DELETE", entity); + } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); } else { diff --git a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache index 97cee6394..615367bb3 100644 --- a/sdks/java-v1/templates/libraries/jersey3/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,7 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache index d480667f3..46c2cdc3a 100644 --- a/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/anyof_model.mustache @@ -68,10 +68,23 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return ret; } {{/discriminator}} + {{#composedSchemas}} {{#anyOf}} - // deserialize {{{.}}} + // deserialize {{{dataType}}}{{#isNullable}} (nullable){{/isNullable}} try { - deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class); + {{^isArray}} + {{^isMap}} + deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} + {{/isArray}} + {{#isArray}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isArray}} + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} {{classname}} ret = new {{classname}}(); ret.setActualInstance(deserialized); return ret; @@ -81,6 +94,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/anyOf}} + {{/composedSchemas}} throw new IOException(String.format("Failed deserialization for {{classname}}: no match found")); } @@ -119,13 +133,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return Objects.hash(getActualInstance(), isNullable(), getSchemaType(), additionalProperties); } {{/additionalPropertiesType}} + {{#composedSchemas}} {{#anyOf}} - public {{classname}}({{{.}}} o) { + {{^vendorExtensions.x-duplicated-data-type}} + public {{classname}}({{{baseType}}} o) { super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}}); setActualInstance(o); } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} static { {{#anyOf}} schemas.put("{{{.}}}", new GenericType<{{{.}}}>() { @@ -165,13 +183,17 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isNullable}} + {{#composedSchemas}} {{#anyOf}} - if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) { + {{^vendorExtensions.x-duplicated-data-type}} + if (JSON.isInstanceOf({{{baseType}}}.class, instance, new HashSet<>())) { super.setActualInstance(instance); return; } + {{/vendorExtensions.x-duplicated-data-type}} {{/anyOf}} + {{/composedSchemas}} throw new RuntimeException("Invalid instance type. Must be {{#anyOf}}{{{.}}}{{^-last}}, {{/-last}}{{/anyOf}}"); } @@ -186,17 +208,21 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im return super.getActualInstance(); } + {{#composedSchemas}} {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** - * Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, + * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. * - * @return The actual instance of `{{{.}}}` - * @throws ClassCastException if the instance is not `{{{.}}}` + * @return The actual instance of `{{{dataType}}}` + * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{.}}} get{{{.}}}() throws ClassCastException { - return ({{{.}}})super.getActualInstance(); + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + return ({{{dataType}}})super.getActualInstance(); } + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} + {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/api.mustache b/sdks/java-v1/templates/libraries/jersey3/api.mustache index 8d3e62f27..be8861553 100644 --- a/sdks/java-v1/templates/libraries/jersey3/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/api.mustache @@ -67,7 +67,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -101,7 +102,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -195,7 +197,7 @@ public class {{classname}} { {{#returnType}} GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {}; {{/returnType}} - return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, + return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{{path}}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, {{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType, {{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}}); } @@ -232,7 +234,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -252,7 +255,8 @@ public class {{classname}} { * @throws ApiException if fails to make API call {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache index 42908c8bb..f95eafca0 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.gradle.mustache @@ -116,6 +116,9 @@ ext { {{#hasHttpSignatureMethods}} tomitribe_http_signatures_version = "1.7" {{/hasHttpSignatureMethods}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -146,6 +149,9 @@ dependencies { {{#useBeanValidation}} implementation "jakarta.validation:jakarta.validation-api:$bean_validation_version" {{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" diff --git a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache index 6e89375a6..5f07e5671 100644 --- a/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/build.sbt.mustache @@ -33,6 +33,9 @@ lazy val root = (project in file(".")). "org.tomitribe" % "tomitribe-http-signatures" % "1.7" % "compile", {{/hasHttpSignatureMethods}} "jakarta.annotation" % "jakarta.annotation-api" % "2.1.0" % "compile", + {{#useReflectionEqualsHashCode}} + "org.apache.commons" % "commons-lang3" % "3.17.0" % "compile", + {{/useReflectionEqualsHashCode}} "org.junit.jupiter" % "junit-jupiter-api" % "5.8.2" % "test" ) ) diff --git a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache index 09906d7b0..c0716915e 100644 --- a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache @@ -112,7 +112,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im attemptParsing |= (token == JsonToken.VALUE_NUMBER_FLOAT); {{/isDecimal}} {{#isBoolean}} - attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE); {{/isBoolean}} {{#isNullable}} attemptParsing |= (token == JsonToken.VALUE_NULL); @@ -120,7 +120,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im } {{/isPrimitiveType}} if (attemptParsing) { + {{#isMap}} + final TypeReference<{{{dataType}}}> ref = new TypeReference<{{{dataType}}}>(){}; + deserialized = tree.traverse(jp.getCodec()).readValueAs(ref); + {{/isMap}} + {{^isMap}} deserialized = tree.traverse(jp.getCodec()).readValueAs({{{dataType}}}.class); + {{/isMap}} // TODO: there is no validation against JSON schema constraints // (min, max, enum, pattern...), this does not perform a strict JSON // validation, which means the 'match' count may be higher than it should be. @@ -266,6 +272,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -273,17 +280,11 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - {{^isArray}} - public {{{dataType}}} get{{{dataType}}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } - {{/isArray}} - {{#isArray}} public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/isArray}} + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} } diff --git a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache index 06be4ddf2..8f454c429 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache @@ -81,7 +81,8 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{>nullable_var_annotations}} + private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vars}} @@ -113,7 +114,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -197,17 +198,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -257,7 +248,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); diff --git a/sdks/java-v1/templates/libraries/jersey3/pom.mustache b/sdks/java-v1/templates/libraries/jersey3/pom.mustache index d2f13457c..a3c115041 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pom.mustache @@ -379,6 +379,15 @@ jersey-apache-connector${jersey-version} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -400,9 +409,7 @@ 2.17.1 0.2.6 2.1.1 - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 @@ -410,6 +417,9 @@ {{#hasOAuthMethods}} 8.3.3 {{/hasOAuthMethods}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 2.21.0 diff --git a/sdks/java-v1/templates/libraries/microprofile/api.mustache b/sdks/java-v1/templates/libraries/microprofile/api.mustache index 6e25c1f10..0b0a7c4ba 100644 --- a/sdks/java-v1/templates/libraries/microprofile/api.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/api.mustache @@ -71,10 +71,10 @@ public interface {{classname}} { {{#hasProduces}} @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }) {{/hasProduces}} -{{^useSingleRequestParameter}} - {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; -{{/useSingleRequestParameter}} -{{#useSingleRequestParameter}} +{{^singleRequestParameter}} + {{^vendorExtensions.x-java-is-response-void}}{{#microprofileServer}}{{> server_operation}}{{/microprofileServer}}{{^microprofileServer}}{{> client_operation}}{{/microprofileServer}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{>cookieParams}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException, ProcessingException; +{{/singleRequestParameter}} +{{#singleRequestParameter}} {{^vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni<{{{returnType}}}>{{/microprofileMutiny}}{{^microprofileMutiny}}{{{returnType}}}{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}}{{#vendorExtensions.x-java-is-response-void}}{{#microprofileMutiny}}Uni{{/microprofileMutiny}}{{^microprofileMutiny}}void{{/microprofileMutiny}}{{/vendorExtensions.x-java-is-response-void}} {{nickname}}({{#hasNonBodyParams}}@BeanParam {{operationIdCamelCase}}Request request{{/hasNonBodyParams}}{{#bodyParams}}{{#hasNonBodyParams}}, {{/hasNonBodyParams}}{{>bodyParams}}{{/bodyParams}}) throws ApiException, ProcessingException; {{#hasNonBodyParams}} public class {{operationIdCamelCase}}Request { @@ -91,6 +91,9 @@ public interface {{classname}} { {{#formParams}} private {{>formParams}}; {{/formParams}} + {{#cookieParams}} + private {{>cookieParams}}; + {{/cookieParams}} private {{operationIdCamelCase}}Request() { } @@ -106,7 +109,7 @@ public interface {{classname}} { * @param {{paramName}}{{>formParamsNameSuffix}} {{description}} ({{^required}}optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}{{/required}}{{#required}}required{{/required}}) * @return {{operationIdCamelCase}}Request */ - public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}) { + public {{operationIdCamelCase}}Request {{paramName}}{{>formParamsNameSuffix}}({{>queryParamsImpl}}{{>pathParamsImpl}}{{>headerParamsImpl}}{{>formParamsImpl}}{{>cookieParamsImpl}}) { this.{{paramName}}{{>formParamsNameSuffix}} = {{paramName}}{{>formParamsNameSuffix}}; return this; } @@ -114,7 +117,7 @@ public interface {{classname}} { {{/allParams}} } {{/hasNonBodyParams}} -{{/useSingleRequestParameter}} +{{/singleRequestParameter}} {{/operation}} } {{/operations}} diff --git a/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache new file mode 100644 index 000000000..c4ff01d7e --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/beanValidationCookieParams.mustache @@ -0,0 +1 @@ +{{#required}} @NotNull{{/required}}{{>beanValidationCore}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache new file mode 100644 index 000000000..4cca907c6 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParams.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}@CookieParam("{{baseName}}") {{#useBeanValidation}}{{>beanValidationCookieParams}}{{/useBeanValidation}} {{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache new file mode 100644 index 000000000..70871f0f8 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/cookieParamsImpl.mustache @@ -0,0 +1 @@ +{{#isCookieParam}}{{{dataType}}} {{paramName}}{{/isCookieParam}} \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache index cb8539bd1..7cead92c5 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache @@ -77,7 +77,7 @@ return b; } } - {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/isNullable}} + {{#isNullable}}return null;{{/isNullable}}{{^isNullable}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + value + "'");{{/enumUnknownDefaultCase}}{{/isNullable}} } {{/jackson}} {{/withXml}} diff --git a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache index 2539064d1..588e52c7e 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache @@ -65,6 +65,6 @@ import java.net.URI; return b; } } - {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}} + {{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}{{#enumUnknownDefaultCase}}{{#allowableValues}}{{#enumVars}}{{#-last}}return {{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}}{{/enumUnknownDefaultCase}}{{^enumUnknownDefaultCase}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/enumUnknownDefaultCase}}{{/useNullForUnknownEnumValue}} } } diff --git a/sdks/java-v1/templates/libraries/microprofile/model.mustache b/sdks/java-v1/templates/libraries/microprofile/model.mustache index e10e68d83..8ac93be1b 100644 --- a/sdks/java-v1/templates/libraries/microprofile/model.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/model.mustache @@ -1,6 +1,12 @@ {{>licenseInfo}} package {{package}}; +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +import java.util.Objects; +import java.util.Arrays; {{#imports}}import {{import}}; {{/imports}} {{#serializableModel}} @@ -31,9 +37,12 @@ import {{rootJavaEEPackage}}.json.bind.serializer.SerializationContext; import {{rootJavaEEPackage}}.json.stream.JsonGenerator; import {{rootJavaEEPackage}}.json.stream.JsonParser; import {{rootJavaEEPackage}}.json.bind.annotation.JsonbProperty; -{{#vendorExtensions.x-has-readonly-properties}} +{{#jsonbPolymorphism}} +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbSubtype; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTransient; +import {{rootJavaEEPackage}}.json.bind.annotation.JsonbTypeInfo; +{{/jsonbPolymorphism}} import {{rootJavaEEPackage}}.json.bind.annotation.JsonbCreator; -{{/vendorExtensions.x-has-readonly-properties}} {{/jsonb}} {{#useBeanValidation}} import {{rootJavaEEPackage}}.validation.constraints.*; diff --git a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache index afad09aa3..9fcac409c 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pojo.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pojo.mustache @@ -22,7 +22,7 @@ * {{{.}}} */ {{/description}} -{{>additionalModelTypeAnnotations}} +{{>additionalModelTypeAnnotations}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}} {{#vendorExtensions.x-class-extra-annotation}} {{{vendorExtensions.x-class-extra-annotation}}} {{/vendorExtensions.x-class-extra-annotation}} @@ -45,7 +45,7 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi */ {{/description}} {{^withXml}} - {{#jsonb}}@JsonbProperty("{{baseName}}"){{/jsonb}} + {{#jsonb}}{{^isDiscriminator}}@JsonbProperty("{{baseName}}"){{/isDiscriminator}}{{#isDiscriminator}}{{#jsonbPolymorphism}}@JsonbTransient{{/jsonbPolymorphism}}{{^jsonbPolymorphism}}@JsonbProperty("{{baseName}}"){{/jsonbPolymorphism}}{{/isDiscriminator}}{{/jsonb}} {{/withXml}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} @@ -148,28 +148,5 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi {{/isReadOnly}} {{/vars}} - - /** - * Create a string representation of this pojo. - */ - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); - {{/vars}}sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private static String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } +{{>pojoOverrides}} } diff --git a/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache new file mode 100644 index 000000000..f0fbb0b20 --- /dev/null +++ b/sdks/java-v1/templates/libraries/microprofile/pojoOverrides.mustache @@ -0,0 +1,64 @@ + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + /** + * Create a string representation of this pojo. + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} + {{#vars}}sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}}sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } \ No newline at end of file diff --git a/sdks/java-v1/templates/libraries/microprofile/pom.mustache b/sdks/java-v1/templates/libraries/microprofile/pom.mustache index f814d4c0d..4fefd6db2 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom.mustache @@ -196,6 +196,14 @@ ${mutiny.version} {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -210,10 +218,12 @@ 1.8 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.2 {{/useBeanValidation}} @@ -238,9 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 {{#microprofileMutiny}} - 1.2.0 + 1.10.0 {{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache index 7accc4cb2..9462e0d92 100644 --- a/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/pom_3.0.mustache @@ -189,6 +189,21 @@ ${jakarta.annotation.version} provided +{{#microprofileMutiny}} + + io.smallrye.reactive + mutiny + ${mutiny.version} + +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + +{{/useReflectionEqualsHashCode}} @@ -203,10 +218,12 @@ 11 ${java.version} ${java.version} + UTF-8 + 1.5.18 9.2.9.v20150224 5.10.2 - 1.4.14 + 1.5.13 {{#useBeanValidation}} 3.0.1 {{/useBeanValidation}} @@ -217,7 +234,7 @@ {{/jackson}} 2.1.0 2.0.0 - 2.0.0 + 3.0.0 2.0.1 3.0.0 3.0.1 @@ -231,6 +248,11 @@ 1.1.0 2.6 1.9.1 - UTF-8 +{{#microprofileMutiny}} + 1.10.0 +{{/microprofileMutiny}} +{{#useReflectionEqualsHashCode}} + 3.17.0 +{{/useReflectionEqualsHashCode}} diff --git a/sdks/java-v1/templates/libraries/native/ApiClient.mustache b/sdks/java-v1/templates/libraries/native/ApiClient.mustache index a641525af..a8bede355 100644 --- a/sdks/java-v1/templates/libraries/native/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/native/ApiClient.mustache @@ -183,7 +183,7 @@ public class ApiClient { asyncResponseInterceptor = null; } - protected ObjectMapper createDefaultObjectMapper() { + public static ObjectMapper createDefaultObjectMapper() { ObjectMapper mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); @@ -199,15 +199,15 @@ public class ApiClient { return mapper; } - protected String getDefaultBaseUri() { + private String getDefaultBaseUri() { return "{{{basePath}}}"; } - protected HttpClient.Builder createDefaultHttpClientBuilder() { + public static HttpClient.Builder createDefaultHttpClientBuilder() { return HttpClient.newBuilder(); } - public void updateBaseUri(String baseUri) { + public final void updateBaseUri(String baseUri) { URI uri = URI.create(baseUri); scheme = uri.getScheme(); host = uri.getHost(); diff --git a/sdks/java-v1/templates/libraries/native/JSON.mustache b/sdks/java-v1/templates/libraries/native/JSON.mustache index 813bb7940..496e5a1a8 100644 --- a/sdks/java-v1/templates/libraries/native/JSON.mustache +++ b/sdks/java-v1/templates/libraries/native/JSON.mustache @@ -30,7 +30,12 @@ public class JSON { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .disable(MapperFeature.ALLOW_COERCION_OF_SCALARS) + {{#failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} + {{^failOnUnknownProperties}} + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + {{/failOnUnknownProperties}} .enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/native/anyof_model.mustache b/sdks/java-v1/templates/libraries/native/anyof_model.mustache index dfb6464d5..7cc5081d8 100644 --- a/sdks/java-v1/templates/libraries/native/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/anyof_model.mustache @@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -241,7 +242,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -251,7 +252,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -289,7 +290,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -301,7 +302,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -316,7 +317,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -345,7 +346,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/api.mustache b/sdks/java-v1/templates/libraries/native/api.mustache index a80dcbac8..884c5817f 100644 --- a/sdks/java-v1/templates/libraries/native/api.mustache +++ b/sdks/java-v1/templates/libraries/native/api.mustache @@ -4,6 +4,7 @@ package {{package}}; import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.ApiException; import {{invokerPackage}}.ApiResponse; +import {{invokerPackage}}.Configuration; import {{invokerPackage}}.Pair; {{#imports}} @@ -14,8 +15,8 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#hasFormParamsInSpec}} @@ -64,7 +65,7 @@ public class {{classname}} { private final Consumer> memberVarAsyncResponseInterceptor; public {{classname}}() { - this(new ApiClient()); + this(Configuration.getDefaultApiClient()); } public {{classname}}(ApiClient apiClient) { @@ -271,16 +272,40 @@ public class {{classname}} { } {{/vendorExtensions.x-java-text-plain-string}} {{^vendorExtensions.x-java-text-plain-string}} - return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( + {{#returnType}} + {{! Fix for https://github.com/OpenAPITools/openapi-generator/issues/13968 }} + {{! This part had a bugfix for an empty response in the past, but this part of that PR was reverted because it was not doing anything. }} + {{! Keep this documentation here, because the problem is not obvious. }} + {{! `InputStream.available()` was used, but that only works for inputstreams that are already in memory, it will not give the right result if it is a remote stream. We only work with remote streams here. }} + {{! https://github.com/OpenAPITools/openapi-generator/pull/13993/commits/3e!37411d2acef0311c82e6d941a8e40b3bc0b6da }} + {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} + {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} + {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} + if (localVarResponse.body() == null) { + return new ApiResponse<{{{returnType}}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - {{#returnType}} - localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream + null + ); + } + + String responseBody = new String(localVarResponse.body().readAllBytes()); + localVarResponse.body().close(); + + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) + ); {{/returnType}} {{^returnType}} + return new ApiResponse<{{{returnType}}}>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), null - {{/returnType}} ); + {{/returnType}} {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} diff --git a/sdks/java-v1/templates/libraries/native/api_test.mustache b/sdks/java-v1/templates/libraries/native/api_test.mustache index 497bd5308..8558cc6f4 100644 --- a/sdks/java-v1/templates/libraries/native/api_test.mustache +++ b/sdks/java-v1/templates/libraries/native/api_test.mustache @@ -19,8 +19,8 @@ import java.util.concurrent.CompletableFuture; {{/asyncNative}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/native/build.gradle.mustache b/sdks/java-v1/templates/libraries/native/build.gradle.mustache index 24ea4fef0..a04a9645e 100644 --- a/sdks/java-v1/templates/libraries/native/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/native/build.gradle.mustache @@ -50,12 +50,12 @@ task execute(type:JavaExec) { } task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + archiveClassifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.destinationDir } @@ -73,11 +73,21 @@ ext { swagger_annotations_version = "2.2.9" {{/swagger2AnnotationLibrary}} jackson_version = "2.17.1" + {{#useJakartaEe}} + jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" + {{/useJakartaEe}} + {{^useJakartaEe}} jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" + {{/useJakartaEe}} junit_version = "5.10.2" {{#hasFormParamsInSpec}} httpmime_version = "4.5.13" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + commons_lang3_version = "3.17.0" + {{/useReflectionEqualsHashCode}} } dependencies { @@ -94,9 +104,15 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" implementation "org.openapitools:jackson-databind-nullable:0.2.1" implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + {{#useBeanValidation}} + implementation "jakarta.validation:jakarta.validation-api:$beanvalidation_version" + {{/useBeanValidation}} {{#hasFormParamsInSpec}} implementation "org.apache.httpcomponents:httpmime:$httpmime_version" {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + implementation "org.apache.commons:commons-lang3:$commons_lang3_version" + {{/useReflectionEqualsHashCode}} testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version" } diff --git a/sdks/java-v1/templates/libraries/native/model.mustache b/sdks/java-v1/templates/libraries/native/model.mustache index cd2a85a22..b3beca8d3 100644 --- a/sdks/java-v1/templates/libraries/native/model.mustache +++ b/sdks/java-v1/templates/libraries/native/model.mustache @@ -47,8 +47,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/native/oneof_model.mustache b/sdks/java-v1/templates/libraries/native/oneof_model.mustache index 8aa2ef073..cbb4a6d63 100644 --- a/sdks/java-v1/templates/libraries/native/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/native/oneof_model.mustache @@ -18,6 +18,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.deser.std.StdDeserializer; import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import {{invokerPackage}}.ApiClient; import {{invokerPackage}}.JSON; {{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}} @@ -274,7 +275,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for ({{{items.dataType}}} _item : ({{{dataType}}})getActualInstance()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -284,7 +285,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (int i = 0; i < (({{{dataType}}})getActualInstance()).size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(getActualInstance().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(getActualInstance().get(i))))); } } {{/uniqueItems}} @@ -322,7 +323,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf(_item)))); } i++; } @@ -334,7 +335,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im if (getActualInstance().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(i))))); } } } @@ -349,7 +350,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im for (String _key : (({{{dataType}}})getActualInstance()).keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - getActualInstance().get(_key), URLEncoder.encode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + getActualInstance().get(_key), ApiClient.urlEncode(String.valueOf((({{{dataType}}})getActualInstance()).get(_key))))); } } {{/items.isPrimitiveType}} @@ -367,7 +368,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{^isMap}} {{#isPrimitiveType}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -378,7 +379,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{/isModel}} {{^isModel}} if (getActualInstance() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getActualInstance()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(String.valueOf(getActualInstance())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pojo.mustache b/sdks/java-v1/templates/libraries/native/pojo.mustache index 1250a71ec..5413d1cdc 100644 --- a/sdks/java-v1/templates/libraries/native/pojo.mustache +++ b/sdks/java-v1/templates/libraries/native/pojo.mustache @@ -75,6 +75,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isContainer}} {{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{>nullable_var_annotations}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -104,7 +105,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens )); {{/vendorExtensions.x-enum-as-string}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -188,17 +189,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -244,7 +235,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-enum-as-string}} if (!{{{nameInSnakeCase}}}_VALUES.contains({{name}})) { throw new IllegalArgumentException({{name}} + " is invalid. Possible values for {{name}}: " + String.join(", ", {{{nameInSnakeCase}}}_VALUES)); @@ -266,7 +257,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#allVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -395,7 +386,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for ({{{items.dataType}}} _item : {{getter}}()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -405,7 +396,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (int i = 0; i < {{getter}}().size(); i++) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } {{/uniqueItems}} @@ -443,7 +434,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if (_item != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString(_item), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString(_item)))); } i++; } @@ -455,7 +446,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens if ({{getter}}().get(i) != null) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), - URLEncoder.encode(ApiClient.valueToString({{getter}}().get(i)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(i))))); } } } @@ -470,7 +461,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens for (String _key : {{getter}}().keySet()) { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), - {{getter}}().get(_key), URLEncoder.encode(ApiClient.valueToString({{getter}}().get(_key)), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + {{getter}}().get(_key), ApiClient.urlEncode(ApiClient.valueToString({{getter}}().get(_key))))); } } {{/items.isModel}} @@ -488,7 +479,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isMap}} {{#isPrimitiveType}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isPrimitiveType}} {{^isPrimitiveType}} @@ -499,7 +490,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/isModel}} {{^isModel}} if ({{getter}}() != null) { - joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(ApiClient.valueToString({{{getter}}}()), StandardCharsets.UTF_8).replaceAll("\\+", "%20"))); + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString({{{getter}}}())))); } {{/isModel}} {{/isPrimitiveType}} diff --git a/sdks/java-v1/templates/libraries/native/pom.mustache b/sdks/java-v1/templates/libraries/native/pom.mustache index 8ed827791..0ccfa8418 100644 --- a/sdks/java-v1/templates/libraries/native/pom.mustache +++ b/sdks/java-v1/templates/libraries/native/pom.mustache @@ -271,6 +271,14 @@ ${httpmime-version} {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} @@ -295,16 +303,18 @@ 0.2.6 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#hasFormParamsInSpec}} 4.5.14 {{/hasFormParamsInSpec}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 5.10.2 2.27.2 diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache index c5e7ae225..519b37ed2 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/ApiClient.mustache @@ -47,9 +47,11 @@ import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; @@ -987,7 +989,7 @@ public class ApiClient { } {{/dynamicOperations}} - /** + /** * Formats the specified free-form query parameters to a list of {@code Pair} objects. * * @param value The free-form query parameters. @@ -1001,6 +1003,7 @@ public class ApiClient { return params; } + @SuppressWarnings("unchecked") final Map valuesMap = (Map) value; for (Map.Entry entry : valuesMap.entrySet()) { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache index 6cf7ec789..eee7773c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/JSON.mustache @@ -28,9 +28,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache index 8dbdf2451..de3afa6c1 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/README.mustache @@ -90,7 +90,7 @@ import {{{invokerPackage}}}.ApiClient; import {{{invokerPackage}}}.ApiException; import {{{invokerPackage}}}.Configuration;{{#hasAuthMethods}} import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}} -import {{{invokerPackage}}}.models.*; +import {{{modelPackage}}}.*; import {{{package}}}.{{{classname}}}; public class Example { diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache index 18447fc12..564c1bb36 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/anyof_model.mustache @@ -283,7 +283,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -291,13 +291,13 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{dataType}}} get{{#isArray}}{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}{{/isArray}}{{^isArray}}{{{dataType}}}{{/isArray}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/anyOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache index 96757ed64..2dd79633e 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api.mustache @@ -26,14 +26,14 @@ import io.swagger.v3.oas.models.parameters.Parameter; import java.io.IOException; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} -import jakarta.validation.ConstraintViolation; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; -import jakarta.validation.executable.ExecutableValidator; +import {{javaxPackage}}.validation.ConstraintViolation; +import {{javaxPackage}}.validation.Validation; +import {{javaxPackage}}.validation.ValidatorFactory; +import {{javaxPackage}}.validation.executable.ExecutableValidator; import java.util.Set; import java.lang.reflect.Method; import java.lang.reflect.Type; @@ -98,7 +98,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -180,12 +181,6 @@ public class {{classname}} { {{/isQueryParam}} {{/constantParams}} - {{#headerParams}} - if ({{paramName}} != null) { - localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); - } - - {{/headerParams}} {{#constantParams}} {{#isHeaderParam}} // Set client side default value of Header Param "{{baseName}}". @@ -230,6 +225,15 @@ public class {{classname}} { if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } + {{^dynamicOperations}} + {{#headerParams}} + + if ({{paramName}} != null) { + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); + } + + {{/headerParams}} + {{/dynamicOperations}} String[] localVarAuthNames = new String[] { {{#withAWSV4Signature}}"AWS4Auth"{{/withAWSV4Signature}}{{#authMethods}}{{#-first}}{{#withAWSV4Signature}}, {{/withAWSV4Signature}}{{/-first}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; return localVarApiClient.buildCall(basePath, localVarPath, {{^dynamicOperations}}"{{httpMethod}}"{{/dynamicOperations}}{{#dynamicOperations}}apiOperation.getMethod(){{/dynamicOperations}}, localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); @@ -287,7 +291,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -327,7 +332,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -395,7 +401,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -455,7 +462,8 @@ public class {{classname}} { * @throws ApiException If fail to serialize the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -479,7 +487,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -511,7 +520,8 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -543,7 +553,8 @@ public class {{classname}} { * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} @@ -569,7 +580,8 @@ public class {{classname}} { * @return API{{operationId}}Request {{#responses.0}} * @http.response.details -
Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}
+
+ {{#responses}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache index 29f682678..b56bdf4db 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/api_test.mustache @@ -17,8 +17,8 @@ import java.io.InputStream; {{/supportStreaming}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache index eb67fc112..1b527257a 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.gradle.mustache @@ -126,7 +126,7 @@ dependencies { {{#hasOAuthMethods}} implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' {{/hasOAuthMethods}} - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' {{#joda}} implementation 'joda-time:joda-time:2.9.9' {{/joda}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache index 2045b8474..54bd804c4 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/build.sbt.mustache @@ -13,7 +13,7 @@ lazy val root = (project in file(".")). "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.12.0", + "org.apache.commons" % "commons-lang3" % "3.17.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", {{#openApiNullable}} "org.openapitools" % "jackson-databind-nullable" % "0.2.6", diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache index c82b0fbe2..3a1cca8d7 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/model.mustache @@ -21,8 +21,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache index 31c63263e..731b36d57 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/oneof_model.mustache @@ -361,7 +361,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im {{#composedSchemas}} {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} + {{^vendorExtensions.x-duplicated-data-type-ignoring-erasure}} /** * Get the actual instance of `{{{dataType}}}`. If the actual instance is not `{{{dataType}}}`, * the ClassCastException will be thrown. @@ -372,10 +372,10 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } - {{/vendorExtensions.x-duplicated-data-type}} + + {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} {{/composedSchemas}} - /** * Validates the JSON Element and throws an exception if issues found * diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache index 0a32ef099..3d76d23b0 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pojo.mustache @@ -70,6 +70,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} + {{>nullable_var_annotations}} {{#isDiscriminator}}protected{{/isDiscriminator}}{{^isDiscriminator}}private{{/isDiscriminator}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/vars}} @@ -80,6 +81,11 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{/parcelableModel}} {{/parent}} {{#discriminator}} + {{#discriminator.isEnum}} +{{#readWriteVars}}{{#isDiscriminator}}{{#defaultValue}} + this.{{name}} = {{defaultValue}}; +{{/defaultValue}}{{/isDiscriminator}}{{/readWriteVars}} + {{/discriminator.isEnum}} {{^discriminator.isEnum}} this.{{{discriminatorName}}} = this.getClass().getSimpleName(); {{/discriminator.isEnum}} @@ -106,7 +112,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; return this; } @@ -153,17 +159,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#useBeanValidation}} {{>beanValidation}} {{/useBeanValidation}} @@ -183,7 +179,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} {{/vendorExtensions.x-setter-extra-annotation}}{{#deprecated}} @Deprecated -{{/deprecated}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/deprecated}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { this.{{name}} = {{name}}; } {{/isReadOnly}} diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache index def53f2fc..5e7bd9b86 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/pom.mustache @@ -414,7 +414,7 @@ {{/swagger2AnnotationLibrary}} 4.12.02.10.1 - 3.14.0 + 3.17.0 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} @@ -423,16 +423,15 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#performBeanValidation}} 3.0.3 {{/performBeanValidation}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.31.10.02.1.6 diff --git a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache index 8919eda30..3d875d66b 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/JacksonObjectMapper.mustache @@ -27,7 +27,7 @@ public class JacksonObjectMapper extends Jackson2Mapper { ObjectMapper mapper = new ObjectMapper(); mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/rest-assured/api.mustache b/sdks/java-v1/templates/libraries/rest-assured/api.mustache index 5ae6e5057..1eae54272 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api.mustache @@ -33,8 +33,8 @@ import io.swagger.v3.oas.annotations.security.*; {{/swagger2AnnotationLibrary}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.lang.reflect.Type; @@ -146,7 +146,7 @@ public class {{classname}} { public static class {{operationIdCamelCase}}Oper implements Oper { public static final Method REQ_METHOD = {{httpMethod}}; - public static final String REQ_URI = "{{path}}"; + public static final String REQ_URI = "{{{path}}}"; private RequestSpecBuilder reqSpec; private ResponseSpecBuilder respSpec; @@ -155,15 +155,15 @@ public class {{classname}} { this.reqSpec = reqSpec; {{#vendorExtensions}} {{#x-content-type}} - reqSpec.setContentType("{{x-content-type}}"); + reqSpec.setContentType("{{{x-content-type}}}"); {{/x-content-type}} - reqSpec.setAccept("{{#x-accepts}}{{.}}{{^-last}},{{/-last}}{{/x-accepts}}"); + reqSpec.setAccept("{{#x-accepts}}{{{.}}}{{^-last}},{{/-last}}{{/x-accepts}}"); {{/vendorExtensions}} this.respSpec = new ResponseSpecBuilder(); } /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @param type * @return type @@ -175,7 +175,7 @@ public class {{classname}} { {{#returnType}} /** - * {{httpMethod}} {{path}} + * {{httpMethod}} {{{path}}} * @param handler handler * @return {{returnType}} */ diff --git a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache index d7d9dae2b..adcbd8085 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/api_test.mustache @@ -20,8 +20,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import static io.restassured.config.ObjectMapperConfig.objectMapperConfig; diff --git a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache index 396dd69c2..1655d52c2 100644 --- a/sdks/java-v1/templates/libraries/rest-assured/pom.mustache +++ b/sdks/java-v1/templates/libraries/rest-assured/pom.mustache @@ -358,13 +358,12 @@ {{/jackson}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 3.6.0 5.10.3 diff --git a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache index 14b1af4af..e5a4bd8fc 100644 --- a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache @@ -44,6 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.TimeZone; +import java.util.function.Supplier; import {{javaxPackage}}.annotation.Nullable; @@ -87,29 +88,26 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public ApiClient() { - this.dateFormat = createDefaultDateFormat(); - this.objectMapper = createDefaultObjectMapper(this.dateFormat); - this.restClient = buildRestClient(this.objectMapper); - this.init(); + this(null); } public ApiClient(RestClient restClient) { - this(Optional.ofNullable(restClient).orElseGet(ApiClient::buildRestClient), createDefaultDateFormat()); + this(restClient, createDefaultDateFormat()); } public ApiClient(ObjectMapper mapper, DateFormat format) { - this(buildRestClient(mapper.copy()), format); + this(null, mapper, format); } public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) { - this(Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(mapper.copy())), format); + this.objectMapper = mapper.copy(); + this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); + this.dateFormat = format; + this.init(); } private ApiClient(RestClient restClient, DateFormat format) { - this.restClient = restClient; - this.dateFormat = format; - this.objectMapper = createDefaultObjectMapper(format); - this.init(); + this(restClient, createDefaultObjectMapper(format), format); } public static DateFormat createDefaultDateFormat() { @@ -125,7 +123,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); @@ -159,9 +157,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{/withXml}} Consumer>> messageConverters = converters -> { - converters.add(new MappingJackson2HttpMessageConverter(mapper)); + converters.add(0, new MappingJackson2HttpMessageConverter(mapper)); {{#withXml}} - converters.add(new MappingJackson2XmlHttpMessageConverter(xmlMapper)); + converters.add(0, new MappingJackson2XmlHttpMessageConverter(xmlMapper)); {{/withXml}} }; @@ -243,6 +241,21 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { throw new RuntimeException("No Bearer authentication configured!"); } + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier the token supplier function + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. * @param username the username @@ -753,4 +766,4 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { return collectionFormat.collectionToString(values); } -} \ No newline at end of file +} diff --git a/sdks/java-v1/templates/libraries/restclient/api.mustache b/sdks/java-v1/templates/libraries/restclient/api.mustache index 1475fc0f4..0fff00ec8 100644 --- a/sdks/java-v1/templates/libraries/restclient/api.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api.mustache @@ -11,6 +11,11 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -47,6 +52,91 @@ public class {{classname}} { } {{#operation}} +{{#singleRequestParameter}} +{{#hasParams}} +{{^hasSingleParam}} + + {{^staticRequest}} + public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}){} + {{/staticRequest}} + {{#staticRequest}} + public static class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + {{/staticRequest}} + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return {{.}} +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + {{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object +{{#returnType}} * @return ResponseEntity<{{.}}> +{{/returnType}} * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public {{#returnType}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} +{{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} +{{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws RestClientResponseException if an error occurs while attempting to invoke the API +{{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation +{{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws RestClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + +{{/hasSingleParam}} +{{/hasParams}} +{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v1/templates/libraries/restclient/api_test.mustache b/sdks/java-v1/templates/libraries/restclient/api_test.mustache index dc3408341..e54a4ccc2 100644 --- a/sdks/java-v1/templates/libraries/restclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api_test.mustache @@ -4,8 +4,8 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} -import org.junit.Test; -import org.junit.Ignore; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.util.ArrayList; import java.util.HashMap; @@ -13,10 +13,15 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; + +{{/useBeanValidation}} /** * API tests for {{classname}} */ -@Ignore +@Disabled public class {{classname}}Test { private final {{classname}} api = new {{classname}}(); diff --git a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache index 1e1e6247c..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/restclient/auth/OAuth.mustache @@ -2,25 +2,49 @@ package {{invokerPackage}}.auth; +import java.util.Optional; +import java.util.function.Supplier; import org.springframework.http.HttpHeaders; import org.springframework.util.MultiValueMap; +/** + * Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization. + */ {{>generatedAnnotation}} public class OAuth implements Authentication { - private String accessToken; + private Supplier tokenSupplier; + /** + * Returns the bearer token used for Authorization. + * + * @return The bearer token + */ public String getAccessToken() { - return accessToken; + return tokenSupplier.get(); } + /** + * Sets the bearer access token used for Authorization. + * + * @param accessToken The bearer token to send in the Authorization header + */ public void setAccessToken(String accessToken) { - this.accessToken = accessToken; + setAccessToken(() -> accessToken); + } + + /** + * Sets the supplier of bearer tokens used for Authorization. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setAccessToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; } @Override public void applyToParams(MultiValueMap queryParams, HttpHeaders headerParams, MultiValueMap cookieParams) { - if (accessToken != null) { - headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken); - } + Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken -> + headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken) + ); } } diff --git a/sdks/java-v1/templates/libraries/restclient/pom.mustache b/sdks/java-v1/templates/libraries/restclient/pom.mustache index d3f6ab650..f926d47b4 100644 --- a/sdks/java-v1/templates/libraries/restclient/pom.mustache +++ b/sdks/java-v1/templates/libraries/restclient/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -337,12 +337,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -362,13 +356,10 @@ {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache index b57283048..e4097fc85 100644 --- a/sdks/java-v1/templates/libraries/resteasy/JSON.mustache +++ b/sdks/java-v1/templates/libraries/resteasy/JSON.mustache @@ -20,7 +20,7 @@ public class JSON implements ContextResolver { public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * 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 the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/api.mustache b/sdks/java-v1/templates/libraries/resttemplate/api.mustache index aa1a98fd3..6cf513730 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api.mustache @@ -14,8 +14,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; diff --git a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache index 04a19f1f1..e1a213c02 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/api_test.mustache @@ -16,8 +16,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache index 1e8204285..1b7ad33a3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/auth/OAuth.mustache @@ -26,7 +26,7 @@ public class OAuth implements Authentication { /** * Sets the bearer access token used for Authorization. * - * @param bearerToken The bearer token to send in the Authorization header + * @param accessToken The bearer token to send in the Authorization header */ public void setAccessToken(String accessToken) { setAccessToken(() -> accessToken); diff --git a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache index a900fc806..edd170cd3 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/build.gradle.mustache @@ -123,10 +123,12 @@ ext { {{#useJakartaEe}} spring_web_version = "6.1.5" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" {{/useJakartaEe}} {{^useJakartaEe}} - spring_web_version = "5.3.33" + spring_web_version = "6.1.13" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" {{/useJakartaEe}} jodatime_version = "2.9.9" junit_version = "5.10.2" @@ -145,7 +147,12 @@ dependencies { implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + {{^useJakartaEe}} implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + {{/useJakartaEe}} + {{#useJakartaEe}} + implementation "com.fasterxml.jackson.jakarta.rs:jackson-jakarta-rs-json-provider:$jackson_version" + {{/useJakartaEe}} {{#openApiNullable}} implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" {{/openApiNullable}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/model.mustache b/sdks/java-v1/templates/libraries/resttemplate/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache new file mode 100644 index 000000000..192b7014c --- /dev/null +++ b/sdks/java-v1/templates/libraries/resttemplate/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/resttemplate/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache index 250417d78..90de86cba 100644 --- a/sdks/java-v1/templates/libraries/resttemplate/pom.mustache +++ b/sdks/java-v1/templates/libraries/resttemplate/pom.mustache @@ -73,7 +73,7 @@ -Xms512m -Xmx1500m methods - pertest + false true @@ -352,12 +352,6 @@ ${junit-version} test - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - UTF-8 @@ -367,33 +361,27 @@ {{#swagger2AnnotationLibrary}} 2.2.15 {{/swagger2AnnotationLibrary}} - {{#useJakartaEe}} - 6.1.5 - {{/useJakartaEe}} - {{^useJakartaEe}} - 5.3.33 - {{/useJakartaEe}} 2.17.1 2.17.1 {{#openApiNullable}} 0.2.6 {{/openApiNullable}} {{#useJakartaEe}} + 6.1.14 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} + 5.3.33 1.3.5 + 2.0.2 {{/useJakartaEe}} {{#joda}} 2.9.9 {{/joda}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} {{#performBeanValidation}} 5.4.3.Final {{/performBeanValidation}} 5.10.2 - 1.10.0 diff --git a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache index 077e8d692..c05159d4e 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/ApiClient.mustache @@ -46,7 +46,9 @@ import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.text.DateFormat; +{{#jsr310}} import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.LinkedHashMap; import java.util.Map; import java.util.HashMap; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache index 2ff8b1cb7..2e986485f 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON.mustache @@ -30,9 +30,11 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; +{{#jsr310}} import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +{{/jsr310}} import java.util.Date; import java.util.Locale; import java.util.Map; diff --git a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache index 525fe5d13..697e398e4 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/JSON_jackson.mustache @@ -32,7 +32,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) diff --git a/sdks/java-v1/templates/libraries/retrofit2/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/api.mustache index dd521a5fc..0b0105515 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api.mustache @@ -35,8 +35,8 @@ import java.util.Map; import java.util.Set; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#operations}} diff --git a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache index dab62f328..b84e6b173 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/api_test.mustache @@ -15,8 +15,8 @@ import java.util.List; import java.util.Map; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache index e78bd985a..7f7b9e2b0 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/play26/api.mustache @@ -18,8 +18,8 @@ import okhttp3.MultipartBody; {{/imports}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import java.util.ArrayList; diff --git a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache index b02a5fb2e..7f5d6b892 100644 --- a/sdks/java-v1/templates/libraries/retrofit2/pom.mustache +++ b/sdks/java-v1/templates/libraries/retrofit2/pom.mustache @@ -405,13 +405,12 @@ {{/joda}} {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 1.0.1 5.10.3 diff --git a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache index 6607107ab..1a90c571b 100644 --- a/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/vertx/ApiClient.mustache @@ -81,7 +81,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { // Build object mapper this.objectMapper = new ObjectMapper(); this.objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + this.objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); this.objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); this.objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); this.objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); diff --git a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache index 9072a8859..ce696128e 100644 --- a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache @@ -143,7 +143,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(dateFormat); mapper.registerModule(new JavaTimeModule()); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); mapper.registerModule(jnm); diff --git a/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache new file mode 100644 index 000000000..8e7182792 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/additional_properties.mustache @@ -0,0 +1,45 @@ +{{#additionalPropertiesType}} + /** + * 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 the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public {{classname}} putAdditionalProperty(String key, {{{.}}} value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public {{{.}}} getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } +{{/additionalPropertiesType}} diff --git a/sdks/java-v1/templates/libraries/webclient/api.mustache b/sdks/java-v1/templates/libraries/webclient/api.mustache index 65600dbfc..0a412fb37 100644 --- a/sdks/java-v1/templates/libraries/webclient/api.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api.mustache @@ -12,8 +12,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; @@ -53,7 +53,81 @@ public class {{classname}} { this.apiClient = apiClient; } - {{#operation}} + {{#operation}}{{#singleRequestParameter}}{{#hasParams}}{{^hasSingleParam}} + public {{#staticRequest}}static {{/staticRequest}}class {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request { + {{#allParams}} + private {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}; + {{/allParams}} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request() {} + + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) { + {{#allParams}} + this.{{paramName}} = {{paramName}}; + {{/allParams}} + } + + {{#allParams}} + public {{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}() { + return this.{{paramName}}; + } + public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request {{paramName}}({{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.AbstractResource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}) { + this.{{paramName}} = {{paramName}}; + return this; + } + + {{/allParams}} + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return {{.}} + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#returnType}}{{#vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}{{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Flux<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnBaseType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnBaseType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{^returnType}}{{#vendorExtensions.x-webclient-blocking}}void{{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}Mono{{/vendorExtensions.x-webclient-blocking}} {{/returnType}}{{operationId}}({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + {{^returnType}}{{^vendorExtensions.x-webclient-blocking}}return {{/vendorExtensions.x-webclient-blocking}}{{/returnType}}{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + {{#returnType}} * @return ResponseEntity<{{.}}> + {{/returnType}} * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public {{#vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}ResponseEntity<{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{returnType}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{returnType}}}{{/isResponseFile}}>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}ResponseEntity{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{^vendorExtensions.x-webclient-blocking}}{{#returnType}}{{#vendorExtensions.x-webclient-return-except-list-of-string}}Mono>>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{^vendorExtensions.x-webclient-return-except-list-of-string}}Mono>{{/vendorExtensions.x-webclient-return-except-list-of-string}}{{/returnType}}{{^returnType}}Mono>{{/returnType}} {{/vendorExtensions.x-webclient-blocking}}{{operationId}}WithHttpInfo({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithHttpInfo({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + /** + * {{summary}} + * {{notes}} + {{#responses}} *

{{code}}{{#message}} - {{.}}{{/message}} + {{/responses}} * @param requestParameters The {{operationId}} request parameters as object + * @return ResponseSpec + * @throws WebClientResponseException if an error occurs while attempting to invoke the API + {{#externalDocs}} + * {{description}} + * @see {{summary}} Documentation + {{/externalDocs}} + */ + public ResponseSpec {{operationId}}WithResponseSpec({{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}Request requestParameters) throws WebClientResponseException { + return this.{{operationId}}WithResponseSpec({{#allParams}}requestParameters.{{paramName}}(){{^-last}}, {{/-last}}{{/allParams}}); + } + + {{/hasSingleParam}}{{/hasParams}}{{/singleRequestParameter}} /** * {{summary}} * {{notes}} diff --git a/sdks/java-v1/templates/libraries/webclient/api_test.mustache b/sdks/java-v1/templates/libraries/webclient/api_test.mustache index c5d568617..e0a960d12 100644 --- a/sdks/java-v1/templates/libraries/webclient/api_test.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api_test.mustache @@ -15,8 +15,8 @@ import java.util.Map; import java.util.stream.Collectors; {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} /** diff --git a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache index 597411638..be194ab23 100644 --- a/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/webclient/build.gradle.mustache @@ -133,12 +133,14 @@ ext { {{#useJakartaEe}} spring_boot_version = "3.0.12" jakarta_annotation_version = "2.1.1" + beanvalidation_version = "3.0.2" reactor_version = "3.5.12" reactor_netty_version = "1.1.13" {{/useJakartaEe}} {{^useJakartaEe}} spring_boot_version = "2.7.17" jakarta_annotation_version = "1.3.5" + beanvalidation_version = "2.0.2" reactor_version = "3.4.34" reactor_netty_version = "1.0.39" {{/useJakartaEe}} diff --git a/sdks/java-v1/templates/libraries/webclient/model.mustache b/sdks/java-v1/templates/libraries/webclient/model.mustache new file mode 100644 index 000000000..108748f60 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/model.mustache @@ -0,0 +1,78 @@ +{{>licenseInfo}} + +package {{package}}; + +{{#useReflectionEqualsHashCode}} +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +{{/useReflectionEqualsHashCode}} +{{#models}} +{{#model}} +{{#additionalPropertiesType}} +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +{{/additionalPropertiesType}} +{{/model}} +{{/models}} +import java.util.Objects; +import java.util.Arrays; +{{#imports}} +import {{import}}; +{{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} +{{#jackson}} +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; +{{#withXml}} +import com.fasterxml.jackson.dataformat.xml.annotation.*; +{{/withXml}} +{{#vendorExtensions.x-has-readonly-properties}} +import com.fasterxml.jackson.annotation.JsonCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jackson}} +{{#withXml}} +import {{javaxPackage}}.xml.bind.annotation.*; +import {{javaxPackage}}.xml.bind.annotation.adapters.*; +import io.github.threetenjaxb.core.*; +{{/withXml}} +{{#jsonb}} +import java.lang.reflect.Type; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeDeserializer; +import {{javaxPackage}}.json.bind.annotation.JsonbTypeSerializer; +import {{javaxPackage}}.json.bind.serializer.DeserializationContext; +import {{javaxPackage}}.json.bind.serializer.JsonbDeserializer; +import {{javaxPackage}}.json.bind.serializer.JsonbSerializer; +import {{javaxPackage}}.json.bind.serializer.SerializationContext; +import {{javaxPackage}}.json.stream.JsonGenerator; +import {{javaxPackage}}.json.stream.JsonParser; +import {{javaxPackage}}.json.bind.annotation.JsonbProperty; +{{#vendorExtensions.x-has-readonly-properties}} +import {{javaxPackage}}.json.bind.annotation.JsonbCreator; +{{/vendorExtensions.x-has-readonly-properties}} +{{/jsonb}} +{{#parcelableModel}} +import android.os.Parcelable; +import android.os.Parcel; +{{/parcelableModel}} +{{#useBeanValidation}} +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; +{{/useBeanValidation}} +{{#performBeanValidation}} +import org.hibernate.validator.constraints.*; +{{/performBeanValidation}} +{{#supportUrlQuery}} +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.StringJoiner; +{{/supportUrlQuery}} + +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#vendorExtensions.x-is-one-of-interface}}{{>oneof_interface}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{>pojo}}{{/vendorExtensions.x-is-one-of-interface}}{{/isEnum}} +{{/model}} +{{/models}} diff --git a/sdks/java-v1/templates/libraries/webclient/pojo.mustache b/sdks/java-v1/templates/libraries/webclient/pojo.mustache new file mode 100644 index 000000000..2b9423b77 --- /dev/null +++ b/sdks/java-v1/templates/libraries/webclient/pojo.mustache @@ -0,0 +1,620 @@ +/** + * {{description}}{{^description}}{{classname}}{{/description}}{{#isDeprecated}} + * @deprecated{{/isDeprecated}} + */{{#isDeprecated}} +@Deprecated{{/isDeprecated}} +{{#swagger1AnnotationLibrary}} +{{#description}} +@ApiModel(description = "{{{.}}}") +{{/description}} +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} +{{#description}} +@Schema(description = "{{{.}}}") +{{/description}} +{{/swagger2AnnotationLibrary}} +{{#jackson}} +@JsonPropertyOrder({ +{{#vars}} + {{classname}}.JSON_PROPERTY_{{nameInSnakeCase}}{{^-last}},{{/-last}} +{{/vars}} +}) +{{#isClassnameSanitized}} +{{^hasDiscriminatorWithNonEmptyMapping}} +@JsonTypeName("{{name}}") +{{/hasDiscriminatorWithNonEmptyMapping}} +{{/isClassnameSanitized}} +{{/jackson}} +{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} +{{#vendorExtensions.x-class-extra-annotation}} +{{{vendorExtensions.x-class-extra-annotation}}} +{{/vendorExtensions.x-class-extra-annotation}} +public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtensions.x-implements}}{{#-first}}implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{#-last}} {{/-last}}{{/vendorExtensions.x-implements}}{ +{{#serializableModel}} + private static final long serialVersionUID = 1L; + +{{/serializableModel}} + {{#vars}} + {{#isEnum}} + {{^isContainer}} +{{>modelInnerEnum}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} +{{>modelInnerEnum}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{#gson}} + public static final String SERIALIZED_NAME_{{nameInSnakeCase}} = "{{baseName}}"; + {{/gson}} + {{#jackson}} + public static final String JSON_PROPERTY_{{nameInSnakeCase}} = "{{baseName}}"; + {{/jackson}} + {{#withXml}} + @Xml{{#isXmlAttribute}}Attribute{{/isXmlAttribute}}{{^isXmlAttribute}}Element{{/isXmlAttribute}}(name = "{{items.xmlName}}{{^items.xmlName}}{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}{{/items.xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{#isXmlWrapped}} + @XmlElementWrapper(name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}"{{#xmlNamespace}}, namespace = "{{.}}"{{/xmlNamespace}}) + {{/isXmlWrapped}} + {{^isXmlAttribute}} + {{#isDateTime}} + @XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class) + {{/isDateTime}} + {{/isXmlAttribute}} + {{/withXml}} + {{#gson}} + @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) + {{/gson}} + {{>nullable_var_annotations}} + {{#vendorExtensions.x-field-extra-annotation}} + {{{vendorExtensions.x-field-extra-annotation}}} + {{/vendorExtensions.x-field-extra-annotation}} + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>undefined(); + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} JsonNullable<{{{datatypeWithEnum}}}> {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{#isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{^isContainer}} + {{#hasChildren}}protected{{/hasChildren}}{{^hasChildren}}private{{/hasChildren}} {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; + {{/isContainer}} + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{/vars}} + public {{classname}}() { + {{#parent}} + {{#parcelableModel}} + super();{{/parcelableModel}} + {{/parent}} + {{#gson}} + {{#discriminator}} + {{#discriminator.isEnum}} + this.{{{discriminatorName}}} = this.getClass().getSimpleName(); + {{/discriminator.isEnum}} + {{/discriminator}} + {{/gson}} + } + {{#vendorExtensions.x-has-readonly-properties}} + {{^withXml}} + /** + * Constructor with only readonly parameters{{#generateConstructorWithAllArgs}}{{^vendorExtensions.x-java-all-args-constructor}} and all parameters{{/vendorExtensions.x-java-all-args-constructor}}{{/generateConstructorWithAllArgs}} + */ + {{#jsonb}}@JsonbCreator{{/jsonb}}{{#jackson}}@JsonCreator{{/jackson}} + public {{classname}}( + {{#readOnlyVars}} + {{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}} + {{/readOnlyVars}} + ) { + this(); + {{#readOnlyVars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; + {{/readOnlyVars}} + } + {{/withXml}} + {{/vendorExtensions.x-has-readonly-properties}} +{{#vendorExtensions.x-java-all-args-constructor}} + + /** + * Constructor with all args parameters + */ + public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#jsonb}}@JsonbProperty(value = "{{baseName}}"{{^required}}, nullable = true{{/required}}){{/jsonb}}{{#jackson}}@JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}){{/jackson}} {{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) { +{{#parent}} + super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}}); +{{/parent}} + {{#vars}} + this.{{name}} = {{#vendorExtensions.x-is-jackson-optional-nullable}}{{name}} == null ? JsonNullable.<{{{datatypeWithEnum}}}>undefined() : JsonNullable.of({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{name}}{{/vendorExtensions.x-is-jackson-optional-nullable}}; +{{/vars}} + } +{{/vendorExtensions.x-java-all-args-constructor}} + +{{#vars}} + {{^isReadOnly}} + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + {{#isArray}} + + public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().add({{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new {{#uniqueItems}}LinkedHashSet{{/uniqueItems}}{{^uniqueItems}}ArrayList{{/uniqueItems}}<>(){{/defaultValue}}; + } + this.{{name}}.add({{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isArray}} + {{#isMap}} + + public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + if (this.{{name}} == null || !this.{{name}}.isPresent()) { + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}); + } + try { + this.{{name}}.get().put(key, {{name}}Item); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + {{^required}} + if (this.{{name}} == null) { + this.{{name}} = {{{defaultValue}}}{{^defaultValue}}new HashMap<>(){{/defaultValue}}; + } + {{/required}} + this.{{name}}.put(key, {{name}}Item); + return this; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isMap}} + + {{/isReadOnly}} + /** + {{#description}} + * {{.}} + {{/description}} + {{^description}} + * Get {{name}} + {{/description}} + {{#minimum}} + * minimum: {{.}} + {{/minimum}} + {{#maximum}} + * maximum: {{.}} + {{/maximum}} + * @return {{name}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{>nullable_var_annotations}} +{{#jsonb}} + @JsonbProperty("{{baseName}}") +{{/jsonb}} +{{#useBeanValidation}} +{{>beanValidation}} +{{/useBeanValidation}} +{{#swagger1AnnotationLibrary}} + @ApiModelProperty({{#example}}example = "{{{.}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") +{{/swagger1AnnotationLibrary}} +{{#swagger2AnnotationLibrary}} + @Schema({{#example}}example = "{{{.}}}", {{/example}}requiredMode = {{#required}}Schema.RequiredMode.REQUIRED{{/required}}{{^required}}Schema.RequiredMode.NOT_REQUIRED{{/required}}, description = "{{{description}}}") +{{/swagger2AnnotationLibrary}} +{{#vendorExtensions.x-extra-annotation}} + {{{vendorExtensions.x-extra-annotation}}} +{{/vendorExtensions.x-extra-annotation}} +{{#vendorExtensions.x-is-jackson-optional-nullable}} + {{!unannotated, Jackson would pick this up automatically and add it *in addition* to the _JsonNullable getter field}} + @JsonIgnore +{{/vendorExtensions.x-is-jackson-optional-nullable}} +{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#jackson}}{{> jackson_annotations}}{{/jackson}}{{/vendorExtensions.x-is-jackson-optional-nullable}} + public {{{datatypeWithEnum}}} {{getter}}() { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + {{#isReadOnly}}{{! A readonly attribute doesn't have setter => jackson will set null directly if explicitly returned by API, so make sure we have an empty JsonNullable}} + if ({{name}} == null) { + {{name}} = JsonNullable.<{{{datatypeWithEnum}}}>{{#defaultValue}}of({{{.}}}){{/defaultValue}}{{^defaultValue}}undefined(){{/defaultValue}}; + } + {{/isReadOnly}} + return {{name}}.orElse(null); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + return {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + + {{#vendorExtensions.x-is-jackson-optional-nullable}} +{{> jackson_annotations}} + public JsonNullable<{{{datatypeWithEnum}}}> {{getter}}_JsonNullable() { + return {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}} + @JsonProperty(JSON_PROPERTY_{{nameInSnakeCase}}) + {{#isReadOnly}}private{{/isReadOnly}}{{^isReadOnly}}public{{/isReadOnly}} void {{setter}}_JsonNullable(JsonNullable<{{{datatypeWithEnum}}}> {{name}}) { + {{! For getters/setters that have name differing from attribute name, we must include setter (albeit private) for jackson to be able to set the attribute}} + this.{{name}} = {{name}}; + } + {{/vendorExtensions.x-is-jackson-optional-nullable}} + + {{^isReadOnly}} +{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{name}} = {{name}}; + {{/vendorExtensions.x-is-jackson-optional-nullable}} + } + {{/isReadOnly}} + + {{/vars}} +{{>libraries/webclient/additional_properties}} + {{#parent}} + {{#readWriteVars}} + {{#isOverridden}} + @Override + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { + {{#vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + {{^vendorExtensions.x-is-jackson-optional-nullable}} + this.{{setter}}({{name}}); + {{/vendorExtensions.x-is-jackson-optional-nullable}} + return this; + } + + {{/isOverridden}} + {{/readWriteVars}} + {{/parent}} + @Override + public boolean equals(Object o) { + {{#useReflectionEqualsHashCode}} + return EqualsBuilder.reflectionEquals(this, o, false, null, true); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + }{{#hasVars}} + {{classname}} {{classVarName}} = ({{classname}}) o; + return {{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}equalsNullable(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}} && + {{/-last}}{{/vars}}{{#additionalPropertiesType}} && + Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} && + super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} + return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public int hashCode() { + {{#useReflectionEqualsHashCode}} + return HashCodeBuilder.reflectionHashCode(this); + {{/useReflectionEqualsHashCode}} + {{^useReflectionEqualsHashCode}} + return Objects.hash({{#vars}}{{#vendorExtensions.x-is-jackson-optional-nullable}}hashCodeNullable({{name}}){{/vendorExtensions.x-is-jackson-optional-nullable}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{^-last}}, {{/-last}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}}); + {{/useReflectionEqualsHashCode}} + }{{#vendorExtensions.x-jackson-optional-nullable-helpers}} + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + }{{/vendorExtensions.x-jackson-optional-nullable-helpers}} + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class {{classname}} {\n"); + {{#parent}} + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + {{/parent}} + {{#vars}} + sb.append(" {{name}}: ").append({{#isPassword}}"*"{{/isPassword}}{{^isPassword}}toIndentedString({{name}}){{/isPassword}}).append("\n"); + {{/vars}} + {{#additionalPropertiesType}} + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + {{/additionalPropertiesType}} + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +{{#supportUrlQuery}} + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + {{#allVars}} + // add `{{baseName}}` to the URL query string + {{#isArray}} + {{#items.isPrimitiveType}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/uniqueItems}} + {{/items.isPrimitiveType}} + {{^items.isPrimitiveType}} + {{#items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + joiner.add(_item.toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + i++; + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + joiner.add({{getter}}().get(i).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{^items.isModel}} + {{#uniqueItems}} + if ({{getter}}() != null) { + int i = 0; + for ({{{items.dataType}}} _item : {{getter}}()) { + if (_item != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf(_item), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + i++; + } + } + {{/uniqueItems}} + {{^uniqueItems}} + if ({{getter}}() != null) { + for (int i = 0; i < {{getter}}().size(); i++) { + if ({{getter}}().get(i) != null) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode(String.valueOf({{getter}}().get(i)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + } + {{/uniqueItems}} + {{/items.isModel}} + {{/items.isPrimitiveType}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{^items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + try { + joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix), + {{getter}}().get(_key), URLEncoder.encode(String.valueOf({{getter}}().get(_key)), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + } + {{/items.isModel}} + {{#items.isModel}} + if ({{getter}}() != null) { + for (String _key : {{getter}}().keySet()) { + if ({{getter}}().get(_key) != null) { + joiner.add({{getter}}().get(_key).toUrlQueryString(String.format("%s{{baseName}}%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix)))); + } + } + } + {{/items.isModel}} + {{/isMap}} + {{^isMap}} + {{#isPrimitiveType}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isPrimitiveType}} + {{^isPrimitiveType}} + {{#isModel}} + if ({{getter}}() != null) { + joiner.add({{getter}}().toUrlQueryString(prefix + "{{{baseName}}}" + suffix)); + } + {{/isModel}} + {{^isModel}} + if ({{getter}}() != null) { + try { + joiner.add(String.format("%s{{{baseName}}}%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf({{{getter}}}()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + {{/isModel}} + {{/isPrimitiveType}} + {{/isMap}} + {{/isArray}} + + {{/allVars}} + return joiner.toString(); + } +{{/supportUrlQuery}} +{{#parcelableModel}} + + public void writeToParcel(Parcel out, int flags) { +{{#model}} +{{#isArray}} + out.writeList(this); +{{/isArray}} +{{^isArray}} +{{#parent}} + super.writeToParcel(out, flags); +{{/parent}} +{{#vars}} + out.writeValue({{name}}); +{{/vars}} +{{/isArray}} +{{/model}} + } + + {{classname}}(Parcel in) { +{{#isArray}} + in.readTypedList(this, {{arrayModelType}}.CREATOR); +{{/isArray}} +{{^isArray}} +{{#parent}} + super(in); +{{/parent}} +{{#vars}} +{{#isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); +{{/isPrimitiveType}} +{{^isPrimitiveType}} + {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); +{{/isPrimitiveType}} +{{/vars}} +{{/isArray}} + } + + public int describeContents() { + return 0; + } + + public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() { + public {{classname}} createFromParcel(Parcel in) { +{{#model}} +{{#isArray}} + {{classname}} result = new {{classname}}(); + result.addAll(in.readArrayList({{arrayModelType}}.class.getClassLoader())); + return result; +{{/isArray}} +{{^isArray}} + return new {{classname}}(in); +{{/isArray}} +{{/model}} + } + public {{classname}}[] newArray(int size) { + return new {{classname}}[size]; + } + }; +{{/parcelableModel}} +{{#generateBuilders}} + + {{>javaBuilder}} +{{/generateBuilders}} + +} diff --git a/sdks/java-v1/templates/model.mustache b/sdks/java-v1/templates/model.mustache index b50416793..55e6678d2 100644 --- a/sdks/java-v1/templates/model.mustache +++ b/sdks/java-v1/templates/model.mustache @@ -49,8 +49,8 @@ import android.os.Parcelable; import android.os.Parcel; {{/parcelableModel}} {{#useBeanValidation}} -import jakarta.validation.constraints.*; -import jakarta.validation.Valid; +import {{javaxPackage}}.validation.constraints.*; +import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; diff --git a/sdks/java-v1/templates/modelInnerEnum.mustache b/sdks/java-v1/templates/modelInnerEnum.mustache index 0096d8407..f87524099 100644 --- a/sdks/java-v1/templates/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/modelInnerEnum.mustache @@ -23,7 +23,7 @@ {{#withXml}} @XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) {{/withXml}} - {{{name}}}({{{value}}}){{^-last}}, + {{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}}, {{/-last}}{{#-last}};{{/-last}} {{/enumVars}} {{/allowableValues}} diff --git a/sdks/java-v1/templates/nullable_var_annotations.mustache b/sdks/java-v1/templates/nullable_var_annotations.mustache new file mode 100644 index 000000000..7dbaf4029 --- /dev/null +++ b/sdks/java-v1/templates/nullable_var_annotations.mustache @@ -0,0 +1 @@ +{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}} \ No newline at end of file diff --git a/sdks/java-v1/templates/pojo.mustache b/sdks/java-v1/templates/pojo.mustache index 05be7e5c5..09482dd66 100644 --- a/sdks/java-v1/templates/pojo.mustache +++ b/sdks/java-v1/templates/pojo.mustache @@ -65,6 +65,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#gson}} @SerializedName(SERIALIZED_NAME_{{nameInSnakeCase}}) {{/gson}} + {{>nullable_var_annotations}} {{#vendorExtensions.x-field-extra-annotation}} {{{vendorExtensions.x-field-extra-annotation}}} {{/vendorExtensions.x-field-extra-annotation}} @@ -134,7 +135,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#vars}} {{^isReadOnly}} - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}} {{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}} return this; @@ -210,17 +211,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#deprecated}} @Deprecated {{/deprecated}} -{{#required}} -{{#isNullable}} - @{{javaxPackage}}.annotation.Nullable -{{/isNullable}} -{{^isNullable}} - @{{javaxPackage}}.annotation.Nonnull -{{/isNullable}} -{{/required}} -{{^required}} - @{{javaxPackage}}.annotation.Nullable -{{/required}} + {{>nullable_var_annotations}} {{#jsonb}} @JsonbProperty("{{baseName}}") {{/jsonb}} @@ -270,7 +261,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{^isReadOnly}} {{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{/vendorExtensions.x-setter-extra-annotation}}{{#jackson}}{{^vendorExtensions.x-is-jackson-optional-nullable}}{{> jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}} public void {{setter}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -285,7 +276,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#readWriteVars}} {{#isOverridden}} @Override - public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { + public {{classname}} {{name}}({{>nullable_var_annotations}} {{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{setter}}(JsonNullable.<{{{datatypeWithEnum}}}>of({{name}})); {{/vendorExtensions.x-is-jackson-optional-nullable}} @@ -404,7 +395,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens {{#uniqueItems}} if ({{getter}}() != null) { int i = 0; - for ({{{items.dataType}}} _item : {{getter}}()) { + for ({{{items.datatypeWithEnum}}} _item : {{getter}}()) { try { joiner.add(String.format("%s{{baseName}}%s%s=%s", prefix, suffix, "".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, i, containerSuffix), diff --git a/sdks/java-v1/templates/pom.mustache b/sdks/java-v1/templates/pom.mustache index b733ab9bb..f4a5e5ed0 100644 --- a/sdks/java-v1/templates/pom.mustache +++ b/sdks/java-v1/templates/pom.mustache @@ -341,6 +341,15 @@ ${jakarta-annotation-version} provided + {{#useReflectionEqualsHashCode}} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + {{/useReflectionEqualsHashCode}} + org.junit.jupiter @@ -368,13 +377,15 @@ 2.17.1 {{#useJakartaEe}} 2.1.1 + 3.0.2 {{/useJakartaEe}} {{^useJakartaEe}} 1.3.5 + 2.0.2 {{/useJakartaEe}} -{{#useBeanValidation}} - 3.0.2 -{{/useBeanValidation}} + {{#useReflectionEqualsHashCode}} + 3.17.0 + {{/useReflectionEqualsHashCode}} 1.0.0 5.10.2 1.10.0 diff --git a/sdks/java-v1/templates/typeInfoAnnotation.mustache b/sdks/java-v1/templates/typeInfoAnnotation.mustache index c21efb490..07f77c75c 100644 --- a/sdks/java-v1/templates/typeInfoAnnotation.mustache +++ b/sdks/java-v1/templates/typeInfoAnnotation.mustache @@ -26,3 +26,9 @@ {{/-last}} {{/discriminator.mappedModels}} {{/jackson}} +{{#jsonbPolymorphism}} +@JsonbTypeInfo(key = "{{{discriminator.propertyBaseName}}}"{{#discriminator.mappedModels}}{{#-first}}, value = { +{{/-first}} + @JsonbSubtype(alias = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}", type = {{modelName}}.class), +{{#-last}} +}{{/-last}}{{/discriminator.mappedModels}}){{/jsonbPolymorphism}} \ No newline at end of file From e255f18b939d4ebf4abb5449c20504c4ff4e66d3 Mon Sep 17 00:00:00 2001 From: Monica Auriemma Date: Fri, 21 Mar 2025 17:54:46 -0400 Subject: [PATCH 3/6] few more updates --- sdks/java-v1/docs/SubFormFieldRuleAction.md | 4 ++-- sdks/java-v1/run-build | 2 +- sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java | 2 +- .../src/main/java/com/dropbox/sign/ApiException.java | 2 +- .../src/main/java/com/dropbox/sign/Configuration.java | 2 +- .../src/main/java/com/dropbox/sign/EventCallbackHelper.java | 2 +- sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java | 2 +- .../src/main/java/com/dropbox/sign/JavaTimeFormatter.java | 2 +- sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java | 2 +- .../src/main/java/com/dropbox/sign/RFC3339DateFormat.java | 2 +- .../src/main/java/com/dropbox/sign/ServerConfiguration.java | 2 +- .../src/main/java/com/dropbox/sign/ServerVariable.java | 2 +- sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java | 2 +- .../src/main/java/com/dropbox/sign/api/AccountApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/ApiAppApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/BulkSendJobApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/EmbeddedApi.java | 2 +- sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/FaxLineApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/OAuthApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/ReportApi.java | 2 +- .../main/java/com/dropbox/sign/api/SignatureRequestApi.java | 2 +- .../java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java | 2 +- .../src/main/java/com/dropbox/sign/api/TemplateApi.java | 2 +- .../main/java/com/dropbox/sign/api/UnclaimedDraftApi.java | 2 +- .../src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java | 2 +- .../src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java | 2 +- .../src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java | 2 +- .../java/com/dropbox/sign/model/AbstractOpenApiSchema.java | 2 +- .../java/com/dropbox/sign/model/AccountCreateRequest.java | 2 +- .../java/com/dropbox/sign/model/AccountCreateResponse.java | 2 +- .../java/com/dropbox/sign/model/AccountGetResponse.java | 2 +- .../main/java/com/dropbox/sign/model/AccountResponse.java | 2 +- .../java/com/dropbox/sign/model/AccountResponseQuotas.java | 2 +- .../java/com/dropbox/sign/model/AccountResponseUsage.java | 2 +- .../java/com/dropbox/sign/model/AccountUpdateRequest.java | 2 +- .../java/com/dropbox/sign/model/AccountVerifyRequest.java | 2 +- .../java/com/dropbox/sign/model/AccountVerifyResponse.java | 2 +- .../dropbox/sign/model/AccountVerifyResponseAccount.java | 2 +- .../java/com/dropbox/sign/model/ApiAppCreateRequest.java | 2 +- .../main/java/com/dropbox/sign/model/ApiAppGetResponse.java | 2 +- .../java/com/dropbox/sign/model/ApiAppListResponse.java | 2 +- .../main/java/com/dropbox/sign/model/ApiAppResponse.java | 2 +- .../java/com/dropbox/sign/model/ApiAppResponseOAuth.java | 2 +- .../java/com/dropbox/sign/model/ApiAppResponseOptions.java | 2 +- .../com/dropbox/sign/model/ApiAppResponseOwnerAccount.java | 2 +- .../sign/model/ApiAppResponseWhiteLabelingOptions.java | 2 +- .../java/com/dropbox/sign/model/ApiAppUpdateRequest.java | 2 +- .../java/com/dropbox/sign/model/BulkSendJobGetResponse.java | 2 +- .../sign/model/BulkSendJobGetResponseSignatureRequests.java | 2 +- .../com/dropbox/sign/model/BulkSendJobListResponse.java | 2 +- .../java/com/dropbox/sign/model/BulkSendJobResponse.java | 2 +- .../com/dropbox/sign/model/BulkSendJobSendResponse.java | 2 +- .../java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java | 2 +- .../com/dropbox/sign/model/EmbeddedEditUrlResponse.java | 2 +- .../dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java | 2 +- .../com/dropbox/sign/model/EmbeddedSignUrlResponse.java | 2 +- .../dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java | 2 +- .../src/main/java/com/dropbox/sign/model/ErrorResponse.java | 2 +- .../java/com/dropbox/sign/model/ErrorResponseError.java | 2 +- .../java/com/dropbox/sign/model/EventCallbackRequest.java | 2 +- .../com/dropbox/sign/model/EventCallbackRequestEvent.java | 2 +- .../sign/model/EventCallbackRequestEventMetadata.java | 2 +- .../main/java/com/dropbox/sign/model/FaxGetResponse.java | 2 +- .../java/com/dropbox/sign/model/FaxLineAddUserRequest.java | 2 +- .../com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java | 2 +- .../java/com/dropbox/sign/model/FaxLineCreateRequest.java | 2 +- .../java/com/dropbox/sign/model/FaxLineDeleteRequest.java | 2 +- .../java/com/dropbox/sign/model/FaxLineListResponse.java | 2 +- .../com/dropbox/sign/model/FaxLineRemoveUserRequest.java | 2 +- .../main/java/com/dropbox/sign/model/FaxLineResponse.java | 2 +- .../java/com/dropbox/sign/model/FaxLineResponseFaxLine.java | 2 +- .../main/java/com/dropbox/sign/model/FaxListResponse.java | 2 +- .../src/main/java/com/dropbox/sign/model/FaxResponse.java | 2 +- .../com/dropbox/sign/model/FaxResponseTransmission.java | 2 +- .../main/java/com/dropbox/sign/model/FaxSendRequest.java | 2 +- .../src/main/java/com/dropbox/sign/model/FileResponse.java | 2 +- .../java/com/dropbox/sign/model/FileResponseDataUri.java | 2 +- .../main/java/com/dropbox/sign/model/ListInfoResponse.java | 2 +- .../com/dropbox/sign/model/OAuthTokenGenerateRequest.java | 2 +- .../com/dropbox/sign/model/OAuthTokenRefreshRequest.java | 2 +- .../java/com/dropbox/sign/model/OAuthTokenResponse.java | 2 +- .../java/com/dropbox/sign/model/ReportCreateRequest.java | 2 +- .../java/com/dropbox/sign/model/ReportCreateResponse.java | 2 +- .../main/java/com/dropbox/sign/model/ReportResponse.java | 2 +- ...gnatureRequestBulkCreateEmbeddedWithTemplateRequest.java | 2 +- .../model/SignatureRequestBulkSendWithTemplateRequest.java | 2 +- .../sign/model/SignatureRequestCreateEmbeddedRequest.java | 2 +- .../SignatureRequestCreateEmbeddedWithTemplateRequest.java | 2 +- .../sign/model/SignatureRequestEditEmbeddedRequest.java | 2 +- .../SignatureRequestEditEmbeddedWithTemplateRequest.java | 2 +- .../com/dropbox/sign/model/SignatureRequestEditRequest.java | 2 +- .../sign/model/SignatureRequestEditWithTemplateRequest.java | 2 +- .../com/dropbox/sign/model/SignatureRequestGetResponse.java | 2 +- .../dropbox/sign/model/SignatureRequestListResponse.java | 2 +- .../dropbox/sign/model/SignatureRequestRemindRequest.java | 2 +- .../com/dropbox/sign/model/SignatureRequestResponse.java | 2 +- .../sign/model/SignatureRequestResponseAttachment.java | 2 +- .../sign/model/SignatureRequestResponseCustomFieldBase.java | 2 +- .../model/SignatureRequestResponseCustomFieldCheckbox.java | 2 +- .../sign/model/SignatureRequestResponseCustomFieldText.java | 2 +- .../sign/model/SignatureRequestResponseDataBase.java | 2 +- .../model/SignatureRequestResponseDataValueCheckbox.java | 2 +- .../SignatureRequestResponseDataValueCheckboxMerge.java | 2 +- .../model/SignatureRequestResponseDataValueDateSigned.java | 2 +- .../model/SignatureRequestResponseDataValueDropdown.java | 2 +- .../model/SignatureRequestResponseDataValueInitials.java | 2 +- .../sign/model/SignatureRequestResponseDataValueRadio.java | 2 +- .../model/SignatureRequestResponseDataValueSignature.java | 2 +- .../sign/model/SignatureRequestResponseDataValueText.java | 2 +- .../model/SignatureRequestResponseDataValueTextMerge.java | 2 +- .../sign/model/SignatureRequestResponseSignatures.java | 2 +- .../com/dropbox/sign/model/SignatureRequestSendRequest.java | 2 +- .../sign/model/SignatureRequestSendWithTemplateRequest.java | 2 +- .../dropbox/sign/model/SignatureRequestUpdateRequest.java | 2 +- .../src/main/java/com/dropbox/sign/model/SubAttachment.java | 2 +- .../main/java/com/dropbox/sign/model/SubBulkSignerList.java | 2 +- .../dropbox/sign/model/SubBulkSignerListCustomField.java | 2 +- .../java-v1/src/main/java/com/dropbox/sign/model/SubCC.java | 2 +- .../main/java/com/dropbox/sign/model/SubCustomField.java | 2 +- .../main/java/com/dropbox/sign/model/SubEditorOptions.java | 2 +- .../main/java/com/dropbox/sign/model/SubFieldOptions.java | 2 +- .../main/java/com/dropbox/sign/model/SubFormFieldGroup.java | 2 +- .../main/java/com/dropbox/sign/model/SubFormFieldRule.java | 2 +- .../java/com/dropbox/sign/model/SubFormFieldRuleAction.java | 6 +++--- .../com/dropbox/sign/model/SubFormFieldRuleTrigger.java | 2 +- .../dropbox/sign/model/SubFormFieldsPerDocumentBase.java | 2 +- .../sign/model/SubFormFieldsPerDocumentCheckbox.java | 2 +- .../sign/model/SubFormFieldsPerDocumentCheckboxMerge.java | 2 +- .../sign/model/SubFormFieldsPerDocumentDateSigned.java | 2 +- .../sign/model/SubFormFieldsPerDocumentDropdown.java | 2 +- .../sign/model/SubFormFieldsPerDocumentHyperlink.java | 2 +- .../sign/model/SubFormFieldsPerDocumentInitials.java | 2 +- .../dropbox/sign/model/SubFormFieldsPerDocumentRadio.java | 2 +- .../sign/model/SubFormFieldsPerDocumentSignature.java | 2 +- .../dropbox/sign/model/SubFormFieldsPerDocumentText.java | 2 +- .../sign/model/SubFormFieldsPerDocumentTextMerge.java | 2 +- .../src/main/java/com/dropbox/sign/model/SubMergeField.java | 2 +- .../src/main/java/com/dropbox/sign/model/SubOAuth.java | 2 +- .../src/main/java/com/dropbox/sign/model/SubOptions.java | 2 +- .../sign/model/SubSignatureRequestGroupedSigners.java | 2 +- .../com/dropbox/sign/model/SubSignatureRequestSigner.java | 2 +- .../sign/model/SubSignatureRequestTemplateSigner.java | 2 +- .../main/java/com/dropbox/sign/model/SubSigningOptions.java | 2 +- .../main/java/com/dropbox/sign/model/SubTeamResponse.java | 2 +- .../main/java/com/dropbox/sign/model/SubTemplateRole.java | 2 +- .../com/dropbox/sign/model/SubUnclaimedDraftSigner.java | 2 +- .../dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java | 2 +- .../com/dropbox/sign/model/SubWhiteLabelingOptions.java | 2 +- .../java/com/dropbox/sign/model/TeamAddMemberRequest.java | 2 +- .../main/java/com/dropbox/sign/model/TeamCreateRequest.java | 2 +- .../java/com/dropbox/sign/model/TeamGetInfoResponse.java | 2 +- .../main/java/com/dropbox/sign/model/TeamGetResponse.java | 2 +- .../main/java/com/dropbox/sign/model/TeamInfoResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamInviteResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamInvitesResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamMemberResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamMembersResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamParentResponse.java | 2 +- .../com/dropbox/sign/model/TeamRemoveMemberRequest.java | 2 +- .../src/main/java/com/dropbox/sign/model/TeamResponse.java | 2 +- .../java/com/dropbox/sign/model/TeamSubTeamsResponse.java | 2 +- .../main/java/com/dropbox/sign/model/TeamUpdateRequest.java | 2 +- .../java/com/dropbox/sign/model/TemplateAddUserRequest.java | 2 +- .../sign/model/TemplateCreateEmbeddedDraftRequest.java | 2 +- .../sign/model/TemplateCreateEmbeddedDraftResponse.java | 2 +- .../model/TemplateCreateEmbeddedDraftResponseTemplate.java | 2 +- .../java/com/dropbox/sign/model/TemplateCreateRequest.java | 2 +- .../java/com/dropbox/sign/model/TemplateCreateResponse.java | 2 +- .../dropbox/sign/model/TemplateCreateResponseTemplate.java | 2 +- .../java/com/dropbox/sign/model/TemplateEditResponse.java | 2 +- .../java/com/dropbox/sign/model/TemplateGetResponse.java | 2 +- .../java/com/dropbox/sign/model/TemplateListResponse.java | 2 +- .../com/dropbox/sign/model/TemplateRemoveUserRequest.java | 2 +- .../main/java/com/dropbox/sign/model/TemplateResponse.java | 2 +- .../com/dropbox/sign/model/TemplateResponseAccount.java | 2 +- .../dropbox/sign/model/TemplateResponseAccountQuota.java | 2 +- .../java/com/dropbox/sign/model/TemplateResponseCCRole.java | 2 +- .../com/dropbox/sign/model/TemplateResponseDocument.java | 2 +- .../sign/model/TemplateResponseDocumentCustomFieldBase.java | 2 +- .../model/TemplateResponseDocumentCustomFieldCheckbox.java | 2 +- .../sign/model/TemplateResponseDocumentCustomFieldText.java | 2 +- .../sign/model/TemplateResponseDocumentFieldGroup.java | 2 +- .../sign/model/TemplateResponseDocumentFieldGroupRule.java | 2 +- .../sign/model/TemplateResponseDocumentFormFieldBase.java | 2 +- .../model/TemplateResponseDocumentFormFieldCheckbox.java | 2 +- .../model/TemplateResponseDocumentFormFieldDateSigned.java | 2 +- .../model/TemplateResponseDocumentFormFieldDropdown.java | 2 +- .../model/TemplateResponseDocumentFormFieldHyperlink.java | 2 +- .../model/TemplateResponseDocumentFormFieldInitials.java | 2 +- .../sign/model/TemplateResponseDocumentFormFieldRadio.java | 2 +- .../model/TemplateResponseDocumentFormFieldSignature.java | 2 +- .../sign/model/TemplateResponseDocumentFormFieldText.java | 2 +- .../sign/model/TemplateResponseDocumentStaticFieldBase.java | 2 +- .../model/TemplateResponseDocumentStaticFieldCheckbox.java | 2 +- .../TemplateResponseDocumentStaticFieldDateSigned.java | 2 +- .../model/TemplateResponseDocumentStaticFieldDropdown.java | 2 +- .../model/TemplateResponseDocumentStaticFieldHyperlink.java | 2 +- .../model/TemplateResponseDocumentStaticFieldInitials.java | 2 +- .../model/TemplateResponseDocumentStaticFieldRadio.java | 2 +- .../model/TemplateResponseDocumentStaticFieldSignature.java | 2 +- .../sign/model/TemplateResponseDocumentStaticFieldText.java | 2 +- .../sign/model/TemplateResponseFieldAvgTextLength.java | 2 +- .../com/dropbox/sign/model/TemplateResponseSignerRole.java | 2 +- .../com/dropbox/sign/model/TemplateUpdateFilesRequest.java | 2 +- .../com/dropbox/sign/model/TemplateUpdateFilesResponse.java | 2 +- .../sign/model/TemplateUpdateFilesResponseTemplate.java | 2 +- .../sign/model/UnclaimedDraftCreateEmbeddedRequest.java | 2 +- .../UnclaimedDraftCreateEmbeddedWithTemplateRequest.java | 2 +- .../com/dropbox/sign/model/UnclaimedDraftCreateRequest.java | 2 +- .../dropbox/sign/model/UnclaimedDraftCreateResponse.java | 2 +- .../sign/model/UnclaimedDraftEditAndResendRequest.java | 2 +- .../java/com/dropbox/sign/model/UnclaimedDraftResponse.java | 2 +- .../main/java/com/dropbox/sign/model/WarningResponse.java | 2 +- 214 files changed, 217 insertions(+), 217 deletions(-) diff --git a/sdks/java-v1/docs/SubFormFieldRuleAction.md b/sdks/java-v1/docs/SubFormFieldRuleAction.md index 6a2d43481..16928736e 100644 --- a/sdks/java-v1/docs/SubFormFieldRuleAction.md +++ b/sdks/java-v1/docs/SubFormFieldRuleAction.md @@ -19,8 +19,8 @@ | Name | Value | ---- | ----- -| FIELD_VISIBILITY | "change-field-visibility" | -| GROUP_VISIBILITY | "change-group-visibility" | +| CHANGE_FIELD_VISIBILITY | "change-field-visibility" | +| CHANGE_GROUP_VISIBILITY | "change-group-visibility" | diff --git a/sdks/java-v1/run-build b/sdks/java-v1/run-build index ce4f11eff..6a103f861 100755 --- a/sdks/java-v1/run-build +++ b/sdks/java-v1/run-build @@ -18,7 +18,7 @@ rm -f "${DIR}/src/main/java/com/dropbox/sign/model/"*.java docker run --rm \ -v "${DIR}/:/local" \ - openapitools/openapi-generator-cli:v7.8.0 generate \ + openapitools/openapi-generator-cli:v7.12.0 generate \ -i "/local/openapi-sdk.yaml" \ -c "/local/openapi-config.yaml" \ -t "/local/templates" \ diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index c342ae753..dbfef4dcc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java @@ -71,7 +71,7 @@ /** ApiClient class. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiClient extends JavaTimeFormatter { private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java index 28ae24fc6..27476dab3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java @@ -19,7 +19,7 @@ /** API Exception */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java index 006cc7e54..5e694cee9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class Configuration { public static final String VERSION = "1.8-dev"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java index aa9ef43a8..8d65b8708 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java @@ -19,7 +19,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class EventCallbackHelper { public static final String EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java index 5bcb4733e..c171040d9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java @@ -27,7 +27,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class JSON implements ContextResolver { private ObjectMapper mapper; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java index caf886acd..806b9b146 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java @@ -23,7 +23,7 @@ */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class JavaTimeFormatter { private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java index d653856fe..0f3d10c47 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java @@ -14,7 +14,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class Pair { private String name = ""; private String value = ""; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java index ae19756ea..3334a5843 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java @@ -23,7 +23,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class RFC3339DateFormat extends DateFormat { private static final long serialVersionUID = 1L; private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java index dca021db6..8d3d8b18c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java @@ -17,7 +17,7 @@ /** Representing a Server configuration. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ServerConfiguration { public String URL; public String description; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java index 4a32ae659..4af52f41e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java @@ -17,7 +17,7 @@ /** Representing a Server Variable for server URL template substitution. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java index 00a83e83e..bcc8a0371 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java @@ -17,7 +17,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java index c8df3c5c3..8af822627 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class AccountApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java index 744623194..d0666ebd0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java @@ -18,7 +18,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiAppApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java index e3a9d63a9..77eaa0a7c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java @@ -16,7 +16,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class BulkSendJobApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java index c842371ea..57d058f9e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java @@ -15,7 +15,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class EmbeddedApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java index f6c01884b..f8454702c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -18,7 +18,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class FaxApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java index 8c9130c39..d412a3c6f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -21,7 +21,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class FaxLineApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java index bd4ac286b..3246b587d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -14,7 +14,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class OAuthApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java index 21d7bd53d..a4cec6b52 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java @@ -13,7 +13,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ReportApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java index 6ddd0408f..5be27cb1b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java @@ -32,7 +32,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class SignatureRequestApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java index 836ebaaa8..9760330ac 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -23,7 +23,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class TeamApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java index 39d38b449..e5c8e5743 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -27,7 +27,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class TemplateApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java index f0690a427..085a76759 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java @@ -16,7 +16,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class UnclaimedDraftApi { private ApiClient apiClient; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java index b066e1383..9f8742a3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java index d8c229c88..9fd1f753b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java @@ -22,7 +22,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class HttpBasicAuth implements Authentication { private String username; private String password; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java index 22500f2d5..a77c13eda 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java @@ -20,7 +20,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java index 0081f2ada..4e340e3f1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java @@ -20,7 +20,7 @@ /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java index 025c6c173..9d881c79f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateRequest.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java index 1b129dcce..328622b72 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountCreateResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountCreateResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java index f2125e568..c63b7c4b9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountGetResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountGetResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java index 2ab7fc80f..02ee9cf83 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponse.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java index 74342dba2..9385b863c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseQuotas.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponseQuotas { public static final String JSON_PROPERTY_API_SIGNATURE_REQUESTS_LEFT = diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java index c7565e0fb..7906498fe 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountResponseUsage.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({AccountResponseUsage.JSON_PROPERTY_FAX_PAGES_SENT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountResponseUsage { public static final String JSON_PROPERTY_FAX_PAGES_SENT = "fax_pages_sent"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java index 88c5ffa95..547051d2a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountUpdateRequest.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountUpdateRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java index 9b5bbef29..d484b5052 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyRequest.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({AccountVerifyRequest.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java index 6661fbcd0..d5b7c64bb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponse { public static final String JSON_PROPERTY_ACCOUNT = "account"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java index 5857a695d..e8002ca39 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AccountVerifyResponseAccount.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({AccountVerifyResponseAccount.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class AccountVerifyResponseAccount { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java index b225f3216..40e1c9482 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppCreateRequest.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppCreateRequest { public static final String JSON_PROPERTY_DOMAINS = "domains"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java index 370fb0132..54ce2c4bb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppGetResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppGetResponse { public static final String JSON_PROPERTY_API_APP = "api_app"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java index f5b9cbc24..8a50aef37 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppListResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppListResponse { public static final String JSON_PROPERTY_API_APPS = "api_apps"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java index ef568f522..913a1e2c3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponse.java @@ -40,7 +40,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponse { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java index 2f9493ee7..daf3f0826 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOAuth.java @@ -37,7 +37,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java index 911b248e2..ace145fa9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOptions.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({ApiAppResponseOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java index 85836bfe4..de840b202 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseOwnerAccount.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseOwnerAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java index 3c244d725..ae9441e24 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppResponseWhiteLabelingOptions.java @@ -42,7 +42,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppResponseWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java index 32a2808af..a27dfcd8c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ApiAppUpdateRequest.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ApiAppUpdateRequest { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java index c9c00b4bc..80ade2f0d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponse.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java index 770ac450d..dc04b97e4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobGetResponseSignatureRequests.java @@ -55,7 +55,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobGetResponseSignatureRequests { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java index d30b8eed5..a47d9a259 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobListResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobListResponse { public static final String JSON_PROPERTY_BULK_SEND_JOBS = "bulk_send_jobs"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java index 1e27b3600..442e2b628 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobResponse.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB_ID = "bulk_send_job_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java index fe37ac6d1..b59c28092 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/BulkSendJobSendResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class BulkSendJobSendResponse { public static final String JSON_PROPERTY_BULK_SEND_JOB = "bulk_send_job"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java index 74b68937b..e46d30980 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlRequest.java @@ -40,7 +40,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlRequest { public static final String JSON_PROPERTY_ALLOW_EDIT_CCS = "allow_edit_ccs"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java index acb587506..30bd517e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java index 440ff0b90..92ea6cbe0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedEditUrlResponseEmbedded.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedEditUrlResponseEmbedded { public static final String JSON_PROPERTY_EDIT_URL = "edit_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java index 9b0e926ec..a49ec4993 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponse { public static final String JSON_PROPERTY_EMBEDDED = "embedded"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java index 0a9da321d..cb4820ae6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EmbeddedSignUrlResponseEmbedded.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EmbeddedSignUrlResponseEmbedded { public static final String JSON_PROPERTY_SIGN_URL = "sign_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java index 97f61b196..e8d26b220 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({ErrorResponse.JSON_PROPERTY_ERROR}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponse { public static final String JSON_PROPERTY_ERROR = "error"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java index a7d4159f8..e9624c65f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ErrorResponseError.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ErrorResponseError { public static final String JSON_PROPERTY_ERROR_MSG = "error_msg"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java index f54dcee41..a7c7f100e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequest.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequest { public static final String JSON_PROPERTY_EVENT = "event"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java index 45ac7f7e9..a3e999816 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEvent.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEvent { public static final String JSON_PROPERTY_EVENT_TIME = "event_time"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java index 4cd66b3b7..453c6a291 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/EventCallbackRequestEventMetadata.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class EventCallbackRequestEventMetadata { public static final String JSON_PROPERTY_RELATED_SIGNATURE_ID = "related_signature_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java index 16faa1949..8d018468f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxGetResponse.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({FaxGetResponse.JSON_PROPERTY_FAX, FaxGetResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxGetResponse { public static final String JSON_PROPERTY_FAX = "fax"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java index 2bc7393da..c8163b3a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAddUserRequest.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAddUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java index 138d78b20..bdf27b0cc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetResponse.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({FaxLineAreaCodeGetResponse.JSON_PROPERTY_AREA_CODES}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineAreaCodeGetResponse { public static final String JSON_PROPERTY_AREA_CODES = "area_codes"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java index f2eb940ce..66c469623 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineCreateRequest.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineCreateRequest { public static final String JSON_PROPERTY_AREA_CODE = "area_code"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java index c47676161..37873d146 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineDeleteRequest.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({FaxLineDeleteRequest.JSON_PROPERTY_NUMBER}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineDeleteRequest { public static final String JSON_PROPERTY_NUMBER = "number"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java index 02501b6ff..9aaf96bdb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineListResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineListResponse { public static final String JSON_PROPERTY_LIST_INFO = "list_info"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java index cbdb91d20..9faabb1bf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineRemoveUserRequest.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineRemoveUserRequest { public static final String JSON_PROPERTY_NUMBER = "number"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java index aca241687..c982b16ec 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({FaxLineResponse.JSON_PROPERTY_FAX_LINE, FaxLineResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponse { public static final String JSON_PROPERTY_FAX_LINE = "fax_line"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java index 82402835e..79e0d943e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineResponseFaxLine.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxLineResponseFaxLine { public static final String JSON_PROPERTY_NUMBER = "number"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java index 59a749c52..a8f6296b9 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxListResponse.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({FaxListResponse.JSON_PROPERTY_FAXES, FaxListResponse.JSON_PROPERTY_LIST_INFO}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxListResponse { public static final String JSON_PROPERTY_FAXES = "faxes"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java index c53ed6b74..7ef24b5cc 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponse.java @@ -41,7 +41,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponse { public static final String JSON_PROPERTY_FAX_ID = "fax_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java index 6fa41a8ad..133bde289 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxResponseTransmission.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxResponseTransmission { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java index 2fe670e32..27975b0d3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxSendRequest.java @@ -40,7 +40,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FaxSendRequest { public static final String JSON_PROPERTY_RECIPIENT = "recipient"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java index 2f0a9ea7f..c03740895 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({FileResponse.JSON_PROPERTY_FILE_URL, FileResponse.JSON_PROPERTY_EXPIRES_AT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponse { public static final String JSON_PROPERTY_FILE_URL = "file_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java index 79e1b746e..2a27822eb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FileResponseDataUri.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({FileResponseDataUri.JSON_PROPERTY_DATA_URI}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class FileResponseDataUri { public static final String JSON_PROPERTY_DATA_URI = "data_uri"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java index 7abef2125..3ed8ddfe5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ListInfoResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ListInfoResponse { public static final String JSON_PROPERTY_NUM_PAGES = "num_pages"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java index 202678823..5ef1cb685 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenGenerateRequest.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenGenerateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java index 2937a0ed5..d8226d6a7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenRefreshRequest.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenRefreshRequest { public static final String JSON_PROPERTY_GRANT_TYPE = "grant_type"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java index fd8b913e7..278d62579 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/OAuthTokenResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class OAuthTokenResponse { public static final String JSON_PROPERTY_ACCESS_TOKEN = "access_token"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java index b90622925..c5c3fd88f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateRequest.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateRequest { public static final String JSON_PROPERTY_END_DATE = "end_date"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java index 1fa1b6eb0..70af485a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportCreateResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportCreateResponse { public static final String JSON_PROPERTY_REPORT = "report"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java index 2dbe1a4ae..29d5b88cf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/ReportResponse.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class ReportResponse { public static final String JSON_PROPERTY_SUCCESS = "success"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java index bb206691a..fda33d504 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.java @@ -44,7 +44,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java index ac1835d80..67ab53ea1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestBulkSendWithTemplateRequest.java @@ -44,7 +44,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestBulkSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java index e398cbc71..8e1987c37 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedRequest.java @@ -55,7 +55,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java index 8987a4fa4..a6b8c00ec 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestCreateEmbeddedWithTemplateRequest.java @@ -46,7 +46,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java index dd8558709..752946426 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedRequest.java @@ -55,7 +55,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java index 1b6451f95..6cd3dbed4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditEmbeddedWithTemplateRequest.java @@ -46,7 +46,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java index de69319d1..0173d32e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditRequest.java @@ -56,7 +56,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditRequest { public static final String JSON_PROPERTY_FILES = "files"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java index e040fc5ac..c49c66ff3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestEditWithTemplateRequest.java @@ -47,7 +47,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestEditWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java index 23372e5a7..713db0586 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestGetResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestGetResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST = "signature_request"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java index 40bb45487..2829c0ded 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestListResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestListResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUESTS = "signature_requests"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java index d901ff369..ee3fae591 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestRemindRequest.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestRemindRequest { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java index 5052cce35..85da7fb61 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponse.java @@ -55,7 +55,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponse { public static final String JSON_PROPERTY_TEST_MODE = "test_mode"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java index c058d5a49..8c0486a26 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseAttachment.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseAttachment { public static final String JSON_PROPERTY_ID = "id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java index 4f0189830..4eb96aa4d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldBase.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java index 1d8ae63fc..8e0952e3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java index 05e0a0558..bb882571a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldText.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java index 9b3706e89..e50d2024f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataBase.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java index bccb89037..aa196e173 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java index 5e0cafff8..99139c870 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueCheckboxMerge.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java index b0d08ded3..038a3cc60 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDateSigned.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java index 8ed6df0da..e702df116 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueDropdown.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java index 70f32ab10..bd936ff8d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueInitials.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java index 66577d120..58eb6518c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueRadio.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java index cc690b8db..e08d208d0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueSignature.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java index 06d24c3ac..ea517a79b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueText.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java index 0fcf5bb37..0c3deed89 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataValueTextMerge.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java index 0817b0f07..ede6ebb32 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseSignatures.java @@ -47,7 +47,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestResponseSignatures { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java index 593bd0e84..252b39102 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendRequest.java @@ -57,7 +57,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendRequest { public static final String JSON_PROPERTY_FILES = "files"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java index d3031cab5..eba4b1488 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestSendWithTemplateRequest.java @@ -48,7 +48,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestSendWithTemplateRequest { public static final String JSON_PROPERTY_TEMPLATE_IDS = "template_ids"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java index 7aba8c6ca..ee3251b41 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestUpdateRequest.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SignatureRequestUpdateRequest { public static final String JSON_PROPERTY_SIGNATURE_ID = "signature_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java index 2f6d42bed..d9f3ad2e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubAttachment.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubAttachment { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java index f82e75ec7..d08a75d1e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerList.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerList { public static final String JSON_PROPERTY_CUSTOM_FIELDS = "custom_fields"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java index e05fe039e..40145d4ed 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubBulkSignerListCustomField.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubBulkSignerListCustomField { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java index b34200891..f9b550b7e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCC.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({SubCC.JSON_PROPERTY_ROLE, SubCC.JSON_PROPERTY_EMAIL_ADDRESS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubCC { public static final String JSON_PROPERTY_ROLE = "role"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java index ea29f97bc..4cd3a8dc2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubCustomField.java @@ -41,7 +41,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubCustomField { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java index 1f7b46bfa..d93127b44 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubEditorOptions.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubEditorOptions { public static final String JSON_PROPERTY_ALLOW_EDIT_SIGNERS = "allow_edit_signers"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java index fc13b344f..b739c2d42 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFieldOptions.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({SubFieldOptions.JSON_PROPERTY_DATE_FORMAT}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFieldOptions { /** diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java index a43f8bbf0..11338d70a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldGroup.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldGroup { public static final String JSON_PROPERTY_GROUP_ID = "group_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java index c2c72d71a..a32b6eb6c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRule.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRule { public static final String JSON_PROPERTY_ID = "id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java index a5186ec16..bda2de249 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleAction { public static final String JSON_PROPERTY_HIDDEN = "hidden"; @@ -42,9 +42,9 @@ public class SubFormFieldRuleAction { /** Gets or Sets type */ public enum TypeEnum { - FIELD_VISIBILITY(String.valueOf("change-field-visibility")), + CHANGE_FIELD_VISIBILITY(String.valueOf("change-field-visibility")), - GROUP_VISIBILITY(String.valueOf("change-group-visibility")); + CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")); private String value; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java index 114e7d810..d421a5926 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleTrigger.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubFormFieldRuleTrigger { public static final String JSON_PROPERTY_ID = "id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java index 98f14fc21..34bfc8529 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentBase.java @@ -57,7 +57,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java index 5b951c747..edfc9ed9d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckbox.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java index 81087ff09..d414d0c74 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentCheckboxMerge.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentCheckboxMerge.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java index 59236b57d..afb25159e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDateSigned.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java index 265d23c66..035f0e7f3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentDropdown.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java index a269b6f59..0a1af8390 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentHyperlink.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java index 55027194e..d00c7e281 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentInitials.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentInitials.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java index e1ecbb851..e72b7f9b2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentRadio.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java index 7786f29c6..71370c6d2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentSignature.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({SubFormFieldsPerDocumentSignature.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java index bb266b107..00d47ecb5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentText.java @@ -42,7 +42,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java index d402eb058..d4bf984d5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTextMerge.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java index 4a103e412..d4f7fba9f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubMergeField.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({SubMergeField.JSON_PROPERTY_NAME, SubMergeField.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubMergeField { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java index 26e6fccd7..1d7220b38 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOAuth.java @@ -31,7 +31,7 @@ @JsonPropertyOrder({SubOAuth.JSON_PROPERTY_CALLBACK_URL, SubOAuth.JSON_PROPERTY_SCOPES}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubOAuth { public static final String JSON_PROPERTY_CALLBACK_URL = "callback_url"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java index a651efadf..dca71d2ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubOptions.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({SubOptions.JSON_PROPERTY_CAN_INSERT_EVERYWHERE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubOptions { public static final String JSON_PROPERTY_CAN_INSERT_EVERYWHERE = "can_insert_everywhere"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java index 7ec7f0d77..b67ccb989 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestGroupedSigners.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestGroupedSigners { public static final String JSON_PROPERTY_GROUP = "group"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java index 2c3604017..6bfe0c6eb 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestSigner.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestSigner { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java index d9782dc3f..a43dfa702 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSignatureRequestTemplateSigner.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSignatureRequestTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java index 1b87e61c7..0dea6a670 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubSigningOptions.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubSigningOptions { /** The default type shown (limited to the listed types) */ diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java index 512878e62..34ff420c4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTeamResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({SubTeamResponse.JSON_PROPERTY_TEAM_ID, SubTeamResponse.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubTeamResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java index dba1d74cc..d1d482e85 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubTemplateRole.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({SubTemplateRole.JSON_PROPERTY_NAME, SubTemplateRole.JSON_PROPERTY_ORDER}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubTemplateRole { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java index c6c5a251c..e7761bd14 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftSigner.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftSigner { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java index afc82b889..337c82ff8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubUnclaimedDraftTemplateSigner.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubUnclaimedDraftTemplateSigner { public static final String JSON_PROPERTY_ROLE = "role"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java index e96eb6adb..aaa5e980f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubWhiteLabelingOptions.java @@ -49,7 +49,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class SubWhiteLabelingOptions { public static final String JSON_PROPERTY_HEADER_BACKGROUND_COLOR = "header_background_color"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java index 8da0558c1..0c25c96b8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamAddMemberRequest.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamAddMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java index c3c469b6d..2766e1d20 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamCreateRequest.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TeamCreateRequest.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamCreateRequest { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java index dbd34bf71..b26c99715 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetInfoResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetInfoResponse { public static final String JSON_PROPERTY_TEAM = "team"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java index 47c93ca31..2bee16d9e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamGetResponse.java @@ -29,7 +29,7 @@ @JsonPropertyOrder({TeamGetResponse.JSON_PROPERTY_TEAM, TeamGetResponse.JSON_PROPERTY_WARNINGS}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamGetResponse { public static final String JSON_PROPERTY_TEAM = "team"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java index dafe4e8f7..09b1f9c66 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInfoResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInfoResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java index 1f42adfd2..05bcf91b5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInviteResponse.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInviteResponse { public static final String JSON_PROPERTY_EMAIL_ADDRESS = "email_address"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java index fc093ba9d..0fee37e1f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamInvitesResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamInvitesResponse { public static final String JSON_PROPERTY_TEAM_INVITES = "team_invites"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java index 40a369512..ce80c5eb7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMemberResponse.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMemberResponse { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java index 67321fdbb..8dd4d104c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamMembersResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamMembersResponse { public static final String JSON_PROPERTY_TEAM_MEMBERS = "team_members"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java index 2fb15e6dc..9c8125e4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamParentResponse.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamParentResponse { public static final String JSON_PROPERTY_TEAM_ID = "team_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java index b54af7c85..f78b47e7b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamRemoveMemberRequest.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamRemoveMemberRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java index a4ff43879..6fcc0fd87 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamResponse.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamResponse { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java index 2d61251d4..c0570de58 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamSubTeamsResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamSubTeamsResponse { public static final String JSON_PROPERTY_SUB_TEAMS = "sub_teams"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java index d520b06a6..91242a042 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TeamUpdateRequest.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TeamUpdateRequest.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TeamUpdateRequest { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java index cbe6d7bf8..ea66fbbd0 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateAddUserRequest.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateAddUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java index e1ae6f15d..0061bf657 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftRequest.java @@ -56,7 +56,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java index 6dfdd57a5..d9ab41602 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java index e04563ecd..1f11a454b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateEmbeddedDraftResponseTemplate.java @@ -37,7 +37,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateEmbeddedDraftResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java index 2ee1f8bc5..8e3815a5b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateRequest.java @@ -49,7 +49,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateRequest { public static final String JSON_PROPERTY_FORM_FIELDS_PER_DOCUMENT = "form_fields_per_document"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java index fd4eb3c84..511bb2391 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java index a016373aa..5368e41b3 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateCreateResponseTemplate.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TemplateCreateResponseTemplate.JSON_PROPERTY_TEMPLATE_ID}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateCreateResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java index a92f547b4..095b796a1 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateEditResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TemplateEditResponse.JSON_PROPERTY_TEMPLATE_ID}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateEditResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java index 8879e556c..f1e79244d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateGetResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateGetResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java index 831758364..624836a79 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateListResponse.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateListResponse { public static final String JSON_PROPERTY_TEMPLATES = "templates"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java index 2fba7071b..401a1a8d8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateRemoveUserRequest.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateRemoveUserRequest { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java index 2dd5cca72..794722520 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponse.java @@ -46,7 +46,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponse { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java index 7b2866158..1f8cdbab4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccount.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccount { public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java index 0ed63af67..edad6110e 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseAccountQuota.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseAccountQuota { public static final String JSON_PROPERTY_TEMPLATES_LEFT = "templates_left"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java index 2e5099354..00f72e343 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseCCRole.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TemplateResponseCCRole.JSON_PROPERTY_NAME}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseCCRole { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java index 060805fa2..3cabbf112 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocument.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocument { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java index 5391a638e..f1190eac4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldBase.java @@ -40,7 +40,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java index cabb602e8..ffde88fb2 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldCheckbox.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentCustomFieldCheckbox.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java index 5cb60680e..1540bbba5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentCustomFieldText.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java index 3a2f86851..d7e2969d5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroup.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroup { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java index e1f8781ed..ea499db4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFieldGroupRule.java @@ -33,7 +33,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseDocumentFieldGroupRule { public static final String JSON_PROPERTY_REQUIREMENT = "requirement"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java index b4fc890d7..9ab25a45b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldBase.java @@ -39,7 +39,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java index 3928910b9..2e7cc69cf 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldCheckbox.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java index fa11c083c..80cfc712f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDateSigned.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java index 68a068a70..109b3413f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldDropdown.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java index e05215a84..d1d89de56 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldHyperlink.java @@ -35,7 +35,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java index fcf15b814..6e0f78592 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldInitials.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java index 8a54089dd..0ff1b8a4b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldRadio.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java index 08e6f6c5b..53e1b3776 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldSignature.java @@ -31,7 +31,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java index 3b7b4680e..353bd8941 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentFormFieldText.java @@ -38,7 +38,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java index 170b98234..6a2ae2ce6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldBase.java @@ -42,7 +42,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java index c1425d209..97294dd19 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldCheckbox.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldCheckbox.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java index fbe47e5fc..3a42fbb7b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDateSigned.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldDateSigned.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java index 4c9a3f845..ba9fc8e2d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldDropdown.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldDropdown.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java index 22042094d..29052c92c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldHyperlink.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldHyperlink.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java index 2f6728825..bd5c5f0e5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldInitials.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldInitials.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java index 15bd66274..3b0590111 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldRadio.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldRadio.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java index 29ff17534..cd319353d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldSignature.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldSignature.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java index e50e0f0ca..ca3d5682c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseDocumentStaticFieldText.java @@ -28,7 +28,7 @@ @JsonPropertyOrder({TemplateResponseDocumentStaticFieldText.JSON_PROPERTY_TYPE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties( allowSetters = true, // allows the type to be set during deserialization ignoreUnknown = true) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java index 654d2786d..9c0fca40a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseFieldAvgTextLength.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseFieldAvgTextLength { public static final String JSON_PROPERTY_NUM_LINES = "num_lines"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java index 2493cef0c..b313ab8d8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateResponseSignerRole.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateResponseSignerRole { public static final String JSON_PROPERTY_NAME = "name"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java index 898248851..d1720e7ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesRequest.java @@ -37,7 +37,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java index 373a3a764..be84c8a80 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponse.java @@ -27,7 +27,7 @@ @JsonPropertyOrder({TemplateUpdateFilesResponse.JSON_PROPERTY_TEMPLATE}) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponse { public static final String JSON_PROPERTY_TEMPLATE = "template"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java index 21b0b2a13..26fa213ca 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/TemplateUpdateFilesResponseTemplate.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class TemplateUpdateFilesResponseTemplate { public static final String JSON_PROPERTY_TEMPLATE_ID = "template_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java index 1a26b5607..4b758039a 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedRequest.java @@ -69,7 +69,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java index a201ebbda..94848f92d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateEmbeddedWithTemplateRequest.java @@ -61,7 +61,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateEmbeddedWithTemplateRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java index b6b7d70f1..0b0b6b61b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateRequest.java @@ -57,7 +57,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateRequest { /** diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java index 255069122..f93c402e8 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftCreateResponse.java @@ -32,7 +32,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftCreateResponse { public static final String JSON_PROPERTY_UNCLAIMED_DRAFT = "unclaimed_draft"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java index bed8e5ff9..adf4c94e6 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftEditAndResendRequest.java @@ -36,7 +36,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftEditAndResendRequest { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java index 58675bc4d..cf497fce5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/UnclaimedDraftResponse.java @@ -34,7 +34,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class UnclaimedDraftResponse { public static final String JSON_PROPERTY_SIGNATURE_REQUEST_ID = "signature_request_id"; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java index 2cdf9165a..df3fc0502 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/WarningResponse.java @@ -30,7 +30,7 @@ }) @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.8.0") + comments = "Generator version: 7.12.0") @JsonIgnoreProperties(ignoreUnknown = true) public class WarningResponse { public static final String JSON_PROPERTY_WARNING_MSG = "warning_msg"; From f35e22b3f8519ee5955c022827250f7ff4d6f0fc Mon Sep 17 00:00:00 2001 From: Monica Auriemma Date: Fri, 21 Mar 2025 18:26:54 -0400 Subject: [PATCH 4/6] more updates --- sdks/java-v1/docs/AccountApi.md | 345 +++ sdks/java-v1/docs/AccountCreateRequest.md | 17 + sdks/java-v1/docs/AccountCreateResponse.md | 16 + sdks/java-v1/docs/AccountGetResponse.md | 15 + sdks/java-v1/docs/AccountResponse.md | 24 + sdks/java-v1/docs/AccountResponseQuotas.md | 19 + sdks/java-v1/docs/AccountResponseUsage.md | 14 + sdks/java-v1/docs/AccountUpdateRequest.md | 16 + sdks/java-v1/docs/AccountVerifyRequest.md | 14 + sdks/java-v1/docs/AccountVerifyResponse.md | 15 + .../docs/AccountVerifyResponseAccount.md | 14 + sdks/java-v1/docs/ApiAppApi.md | 461 ++++ sdks/java-v1/docs/ApiAppCreateRequest.md | 20 + sdks/java-v1/docs/ApiAppGetResponse.md | 15 + sdks/java-v1/docs/ApiAppListResponse.md | 16 + sdks/java-v1/docs/ApiAppResponse.md | 23 + sdks/java-v1/docs/ApiAppResponseOAuth.md | 17 + sdks/java-v1/docs/ApiAppResponseOptions.md | 14 + .../docs/ApiAppResponseOwnerAccount.md | 15 + .../ApiAppResponseWhiteLabelingOptions.md | 27 + sdks/java-v1/docs/ApiAppUpdateRequest.md | 20 + sdks/java-v1/docs/BulkSendJobApi.md | 178 ++ sdks/java-v1/docs/BulkSendJobGetResponse.md | 17 + ...BulkSendJobGetResponseSignatureRequests.md | 38 + sdks/java-v1/docs/BulkSendJobListResponse.md | 16 + sdks/java-v1/docs/BulkSendJobResponse.md | 17 + sdks/java-v1/docs/BulkSendJobSendResponse.md | 15 + sdks/java-v1/docs/EmbeddedApi.md | 182 ++ sdks/java-v1/docs/EmbeddedEditUrlRequest.md | 23 + sdks/java-v1/docs/EmbeddedEditUrlResponse.md | 15 + .../docs/EmbeddedEditUrlResponseEmbedded.md | 15 + sdks/java-v1/docs/EmbeddedSignUrlResponse.md | 15 + .../docs/EmbeddedSignUrlResponseEmbedded.md | 15 + sdks/java-v1/docs/ErrorResponse.md | 14 + sdks/java-v1/docs/ErrorResponseError.md | 16 + sdks/java-v1/docs/EventCallbackRequest.md | 17 + .../java-v1/docs/EventCallbackRequestEvent.md | 47 + .../docs/EventCallbackRequestEventMetadata.md | 17 + sdks/java-v1/docs/FaxApi.md | 424 ++++ sdks/java-v1/docs/FaxGetResponse.md | 15 + sdks/java-v1/docs/FaxLineAddUserRequest.md | 16 + sdks/java-v1/docs/FaxLineApi.md | 600 +++++ .../docs/FaxLineAreaCodeGetCountryEnum.md | 15 + .../docs/FaxLineAreaCodeGetProvinceEnum.md | 35 + .../docs/FaxLineAreaCodeGetResponse.md | 14 + .../docs/FaxLineAreaCodeGetStateEnum.md | 111 + sdks/java-v1/docs/FaxLineCreateRequest.md | 27 + sdks/java-v1/docs/FaxLineDeleteRequest.md | 14 + sdks/java-v1/docs/FaxLineListResponse.md | 16 + sdks/java-v1/docs/FaxLineRemoveUserRequest.md | 16 + sdks/java-v1/docs/FaxLineResponse.md | 15 + sdks/java-v1/docs/FaxLineResponseFaxLine.md | 17 + sdks/java-v1/docs/FaxListResponse.md | 15 + sdks/java-v1/docs/FaxResponse.md | 24 + sdks/java-v1/docs/FaxResponseTransmission.md | 31 + sdks/java-v1/docs/FaxSendRequest.md | 22 + sdks/java-v1/docs/FileResponse.md | 15 + sdks/java-v1/docs/FileResponseDataUri.md | 14 + sdks/java-v1/docs/ListInfoResponse.md | 17 + sdks/java-v1/docs/OAuthApi.md | 179 ++ .../java-v1/docs/OAuthTokenGenerateRequest.md | 18 + sdks/java-v1/docs/OAuthTokenRefreshRequest.md | 17 + sdks/java-v1/docs/OAuthTokenResponse.md | 18 + sdks/java-v1/docs/ReportApi.md | 99 + sdks/java-v1/docs/ReportCreateRequest.md | 25 + sdks/java-v1/docs/ReportCreateResponse.md | 15 + sdks/java-v1/docs/ReportResponse.md | 26 + sdks/java-v1/docs/SignatureRequestApi.md | 2155 +++++++++++++++++ ...stBulkCreateEmbeddedWithTemplateRequest.md | 26 + ...atureRequestBulkSendWithTemplateRequest.md | 26 + .../SignatureRequestCreateEmbeddedRequest.md | 37 + ...equestCreateEmbeddedWithTemplateRequest.md | 28 + .../SignatureRequestEditEmbeddedRequest.md | 37 + ...eRequestEditEmbeddedWithTemplateRequest.md | 28 + .../docs/SignatureRequestEditRequest.md | 38 + ...SignatureRequestEditWithTemplateRequest.md | 29 + .../docs/SignatureRequestGetResponse.md | 15 + .../docs/SignatureRequestListResponse.md | 16 + .../docs/SignatureRequestRemindRequest.md | 15 + sdks/java-v1/docs/SignatureRequestResponse.md | 38 + .../SignatureRequestResponseAttachment.md | 19 + ...SignatureRequestResponseCustomFieldBase.md | 21 + ...atureRequestResponseCustomFieldCheckbox.md | 15 + ...SignatureRequestResponseCustomFieldText.md | 15 + ...atureRequestResponseCustomFieldTypeEnum.md | 13 + .../docs/SignatureRequestResponseDataBase.md | 18 + .../SignatureRequestResponseDataTypeEnum.md | 27 + ...gnatureRequestResponseDataValueCheckbox.md | 15 + ...reRequestResponseDataValueCheckboxMerge.md | 15 + ...atureRequestResponseDataValueDateSigned.md | 15 + ...gnatureRequestResponseDataValueDropdown.md | 15 + ...gnatureRequestResponseDataValueInitials.md | 16 + .../SignatureRequestResponseDataValueRadio.md | 15 + ...natureRequestResponseDataValueSignature.md | 16 + .../SignatureRequestResponseDataValueText.md | 15 + ...natureRequestResponseDataValueTextMerge.md | 15 + .../SignatureRequestResponseSignatures.md | 32 + .../docs/SignatureRequestSendRequest.md | 39 + ...SignatureRequestSendWithTemplateRequest.md | 30 + .../docs/SignatureRequestUpdateRequest.md | 17 + sdks/java-v1/docs/SubAttachment.md | 17 + sdks/java-v1/docs/SubBulkSignerList.md | 15 + .../docs/SubBulkSignerListCustomField.md | 15 + sdks/java-v1/docs/SubCC.md | 15 + sdks/java-v1/docs/SubCustomField.md | 21 + sdks/java-v1/docs/SubEditorOptions.md | 15 + sdks/java-v1/docs/SubFieldOptions.md | 27 + sdks/java-v1/docs/SubFormFieldGroup.md | 16 + sdks/java-v1/docs/SubFormFieldRule.md | 17 + sdks/java-v1/docs/SubFormFieldRuleAction.md | 26 + sdks/java-v1/docs/SubFormFieldRuleTrigger.md | 29 + .../docs/SubFormFieldsPerDocumentBase.md | 37 + .../docs/SubFormFieldsPerDocumentCheckbox.md | 16 + .../SubFormFieldsPerDocumentCheckboxMerge.md | 14 + .../SubFormFieldsPerDocumentDateSigned.md | 39 + .../docs/SubFormFieldsPerDocumentDropdown.md | 41 + .../docs/SubFormFieldsPerDocumentFontEnum.md | 41 + .../docs/SubFormFieldsPerDocumentHyperlink.md | 41 + .../docs/SubFormFieldsPerDocumentInitials.md | 14 + .../docs/SubFormFieldsPerDocumentRadio.md | 16 + .../docs/SubFormFieldsPerDocumentSignature.md | 14 + .../docs/SubFormFieldsPerDocumentText.md | 64 + .../docs/SubFormFieldsPerDocumentTextMerge.md | 39 + .../docs/SubFormFieldsPerDocumentTypeEnum.md | 29 + sdks/java-v1/docs/SubMergeField.md | 24 + sdks/java-v1/docs/SubOAuth.md | 30 + sdks/java-v1/docs/SubOptions.md | 14 + .../docs/SubSignatureRequestGroupedSigners.md | 16 + .../java-v1/docs/SubSignatureRequestSigner.md | 28 + .../docs/SubSignatureRequestTemplateSigner.md | 28 + sdks/java-v1/docs/SubSigningOptions.md | 31 + sdks/java-v1/docs/SubTeamResponse.md | 15 + sdks/java-v1/docs/SubTemplateRole.md | 15 + sdks/java-v1/docs/SubUnclaimedDraftSigner.md | 16 + .../docs/SubUnclaimedDraftTemplateSigner.md | 16 + sdks/java-v1/docs/SubWhiteLabelingOptions.md | 39 + sdks/java-v1/docs/TeamAddMemberRequest.md | 27 + sdks/java-v1/docs/TeamApi.md | 837 +++++++ sdks/java-v1/docs/TeamCreateRequest.md | 14 + sdks/java-v1/docs/TeamGetInfoResponse.md | 15 + sdks/java-v1/docs/TeamGetResponse.md | 15 + sdks/java-v1/docs/TeamInfoResponse.md | 18 + sdks/java-v1/docs/TeamInviteResponse.md | 19 + sdks/java-v1/docs/TeamInvitesResponse.md | 15 + sdks/java-v1/docs/TeamMemberResponse.md | 16 + sdks/java-v1/docs/TeamMembersResponse.md | 16 + sdks/java-v1/docs/TeamParentResponse.md | 15 + sdks/java-v1/docs/TeamRemoveMemberRequest.md | 29 + sdks/java-v1/docs/TeamResponse.md | 17 + sdks/java-v1/docs/TeamSubTeamsResponse.md | 16 + sdks/java-v1/docs/TeamUpdateRequest.md | 14 + sdks/java-v1/docs/TemplateAddUserRequest.md | 16 + sdks/java-v1/docs/TemplateApi.md | 1077 ++++++++ .../TemplateCreateEmbeddedDraftRequest.md | 38 + .../TemplateCreateEmbeddedDraftResponse.md | 15 + ...lateCreateEmbeddedDraftResponseTemplate.md | 17 + sdks/java-v1/docs/TemplateCreateRequest.md | 31 + sdks/java-v1/docs/TemplateCreateResponse.md | 15 + .../docs/TemplateCreateResponseTemplate.md | 14 + sdks/java-v1/docs/TemplateEditResponse.md | 14 + sdks/java-v1/docs/TemplateGetResponse.md | 15 + sdks/java-v1/docs/TemplateListResponse.md | 16 + .../java-v1/docs/TemplateRemoveUserRequest.md | 15 + sdks/java-v1/docs/TemplateResponse.md | 29 + sdks/java-v1/docs/TemplateResponseAccount.md | 19 + .../docs/TemplateResponseAccountQuota.md | 17 + sdks/java-v1/docs/TemplateResponseCCRole.md | 14 + sdks/java-v1/docs/TemplateResponseDocument.md | 19 + ...TemplateResponseDocumentCustomFieldBase.md | 23 + ...lateResponseDocumentCustomFieldCheckbox.md | 14 + ...TemplateResponseDocumentCustomFieldText.md | 18 + .../TemplateResponseDocumentFieldGroup.md | 15 + .../TemplateResponseDocumentFieldGroupRule.md | 15 + .../TemplateResponseDocumentFormFieldBase.md | 22 + ...mplateResponseDocumentFormFieldCheckbox.md | 15 + ...lateResponseDocumentFormFieldDateSigned.md | 15 + ...mplateResponseDocumentFormFieldDropdown.md | 15 + ...plateResponseDocumentFormFieldHyperlink.md | 19 + ...mplateResponseDocumentFormFieldInitials.md | 15 + .../TemplateResponseDocumentFormFieldRadio.md | 15 + ...plateResponseDocumentFormFieldSignature.md | 15 + .../TemplateResponseDocumentFormFieldText.md | 37 + ...TemplateResponseDocumentStaticFieldBase.md | 23 + ...lateResponseDocumentStaticFieldCheckbox.md | 14 + ...teResponseDocumentStaticFieldDateSigned.md | 14 + ...lateResponseDocumentStaticFieldDropdown.md | 14 + ...ateResponseDocumentStaticFieldHyperlink.md | 14 + ...lateResponseDocumentStaticFieldInitials.md | 14 + ...emplateResponseDocumentStaticFieldRadio.md | 14 + ...ateResponseDocumentStaticFieldSignature.md | 14 + ...TemplateResponseDocumentStaticFieldText.md | 14 + .../TemplateResponseFieldAvgTextLength.md | 15 + .../docs/TemplateResponseSignerRole.md | 15 + .../docs/TemplateUpdateFilesRequest.md | 19 + .../docs/TemplateUpdateFilesResponse.md | 14 + .../TemplateUpdateFilesResponseTemplate.md | 15 + sdks/java-v1/docs/UnclaimedDraftApi.md | 400 +++ .../UnclaimedDraftCreateEmbeddedRequest.md | 58 + ...dDraftCreateEmbeddedWithTemplateRequest.md | 43 + .../docs/UnclaimedDraftCreateRequest.md | 46 + .../docs/UnclaimedDraftCreateResponse.md | 15 + .../UnclaimedDraftEditAndResendRequest.md | 21 + sdks/java-v1/docs/UnclaimedDraftResponse.md | 19 + sdks/java-v1/docs/WarningResponse.md | 15 + sdks/java-v1/pom.xml | 2 +- sdks/java-v1/src/main/AndroidManifest.xml | 3 + .../main/java/com/dropbox/sign/ApiClient.java | 2 +- .../java/com/dropbox/sign/ApiException.java | 128 + .../java/com/dropbox/sign/ApiResponse.java | 73 + .../java/com/dropbox/sign/Configuration.java | 2 +- .../com/dropbox/sign/EventCallbackHelper.java | 63 + .../src/main/java/com/dropbox/sign/JSON.java | 261 ++ .../com/dropbox/sign/JavaTimeFormatter.java | 72 + .../src/main/java/com/dropbox/sign/Pair.java | 58 + .../com/dropbox/sign/RFC3339DateFormat.java | 58 + .../com/dropbox/sign/ServerConfiguration.java | 79 + .../java/com/dropbox/sign/ServerVariable.java | 37 + .../java/com/dropbox/sign/StringUtil.java | 83 + .../com/dropbox/sign/auth/ApiKeyAuth.java | 86 + .../com/dropbox/sign/auth/Authentication.java | 37 + .../com/dropbox/sign/auth/HttpBasicAuth.java | 64 + .../com/dropbox/sign/auth/HttpBearerAuth.java | 73 + .../sign/model/AbstractOpenApiSchema.java | 147 ++ .../model/FaxLineAreaCodeGetCountryEnum.java | 51 + .../model/FaxLineAreaCodeGetProvinceEnum.java | 71 + .../model/FaxLineAreaCodeGetStateEnum.java | 147 ++ ...ureRequestResponseCustomFieldTypeEnum.java | 50 + .../SignatureRequestResponseDataTypeEnum.java | 64 + .../SubFormFieldsPerDocumentFontEnum.java | 77 + .../SubFormFieldsPerDocumentTypeEnum.java | 65 + .../RFC3339InstantDeserializer.mustache | 89 - .../templates/RFC3339JavaTimeModule.mustache | 20 - .../libraries/jersey2/ApiClient.mustache | 4 - .../templates/libraries/jersey2/JSON.mustache | 9 +- .../libraries/jersey2/build.gradle.mustache | 3 - .../libraries/jersey2/oneof_model.mustache | 6 - .../templates/libraries/jersey2/pojo.mustache | 3 - .../templates/libraries/native/api.mustache | 17 - .../libraries/restclient/ApiClient.mustache | 5 - 239 files changed, 12824 insertions(+), 157 deletions(-) create mode 100644 sdks/java-v1/docs/AccountApi.md create mode 100644 sdks/java-v1/docs/AccountCreateRequest.md create mode 100644 sdks/java-v1/docs/AccountCreateResponse.md create mode 100644 sdks/java-v1/docs/AccountGetResponse.md create mode 100644 sdks/java-v1/docs/AccountResponse.md create mode 100644 sdks/java-v1/docs/AccountResponseQuotas.md create mode 100644 sdks/java-v1/docs/AccountResponseUsage.md create mode 100644 sdks/java-v1/docs/AccountUpdateRequest.md create mode 100644 sdks/java-v1/docs/AccountVerifyRequest.md create mode 100644 sdks/java-v1/docs/AccountVerifyResponse.md create mode 100644 sdks/java-v1/docs/AccountVerifyResponseAccount.md create mode 100644 sdks/java-v1/docs/ApiAppApi.md create mode 100644 sdks/java-v1/docs/ApiAppCreateRequest.md create mode 100644 sdks/java-v1/docs/ApiAppGetResponse.md create mode 100644 sdks/java-v1/docs/ApiAppListResponse.md create mode 100644 sdks/java-v1/docs/ApiAppResponse.md create mode 100644 sdks/java-v1/docs/ApiAppResponseOAuth.md create mode 100644 sdks/java-v1/docs/ApiAppResponseOptions.md create mode 100644 sdks/java-v1/docs/ApiAppResponseOwnerAccount.md create mode 100644 sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md create mode 100644 sdks/java-v1/docs/ApiAppUpdateRequest.md create mode 100644 sdks/java-v1/docs/BulkSendJobApi.md create mode 100644 sdks/java-v1/docs/BulkSendJobGetResponse.md create mode 100644 sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md create mode 100644 sdks/java-v1/docs/BulkSendJobListResponse.md create mode 100644 sdks/java-v1/docs/BulkSendJobResponse.md create mode 100644 sdks/java-v1/docs/BulkSendJobSendResponse.md create mode 100644 sdks/java-v1/docs/EmbeddedApi.md create mode 100644 sdks/java-v1/docs/EmbeddedEditUrlRequest.md create mode 100644 sdks/java-v1/docs/EmbeddedEditUrlResponse.md create mode 100644 sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md create mode 100644 sdks/java-v1/docs/EmbeddedSignUrlResponse.md create mode 100644 sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md create mode 100644 sdks/java-v1/docs/ErrorResponse.md create mode 100644 sdks/java-v1/docs/ErrorResponseError.md create mode 100644 sdks/java-v1/docs/EventCallbackRequest.md create mode 100644 sdks/java-v1/docs/EventCallbackRequestEvent.md create mode 100644 sdks/java-v1/docs/EventCallbackRequestEventMetadata.md create mode 100644 sdks/java-v1/docs/FaxApi.md create mode 100644 sdks/java-v1/docs/FaxGetResponse.md create mode 100644 sdks/java-v1/docs/FaxLineAddUserRequest.md create mode 100644 sdks/java-v1/docs/FaxLineApi.md create mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md create mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md create mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md create mode 100644 sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md create mode 100644 sdks/java-v1/docs/FaxLineCreateRequest.md create mode 100644 sdks/java-v1/docs/FaxLineDeleteRequest.md create mode 100644 sdks/java-v1/docs/FaxLineListResponse.md create mode 100644 sdks/java-v1/docs/FaxLineRemoveUserRequest.md create mode 100644 sdks/java-v1/docs/FaxLineResponse.md create mode 100644 sdks/java-v1/docs/FaxLineResponseFaxLine.md create mode 100644 sdks/java-v1/docs/FaxListResponse.md create mode 100644 sdks/java-v1/docs/FaxResponse.md create mode 100644 sdks/java-v1/docs/FaxResponseTransmission.md create mode 100644 sdks/java-v1/docs/FaxSendRequest.md create mode 100644 sdks/java-v1/docs/FileResponse.md create mode 100644 sdks/java-v1/docs/FileResponseDataUri.md create mode 100644 sdks/java-v1/docs/ListInfoResponse.md create mode 100644 sdks/java-v1/docs/OAuthApi.md create mode 100644 sdks/java-v1/docs/OAuthTokenGenerateRequest.md create mode 100644 sdks/java-v1/docs/OAuthTokenRefreshRequest.md create mode 100644 sdks/java-v1/docs/OAuthTokenResponse.md create mode 100644 sdks/java-v1/docs/ReportApi.md create mode 100644 sdks/java-v1/docs/ReportCreateRequest.md create mode 100644 sdks/java-v1/docs/ReportCreateResponse.md create mode 100644 sdks/java-v1/docs/ReportResponse.md create mode 100644 sdks/java-v1/docs/SignatureRequestApi.md create mode 100644 sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestEditRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestGetResponse.md create mode 100644 sdks/java-v1/docs/SignatureRequestListResponse.md create mode 100644 sdks/java-v1/docs/SignatureRequestRemindRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponse.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseAttachment.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataBase.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueText.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md create mode 100644 sdks/java-v1/docs/SignatureRequestResponseSignatures.md create mode 100644 sdks/java-v1/docs/SignatureRequestSendRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/SignatureRequestUpdateRequest.md create mode 100644 sdks/java-v1/docs/SubAttachment.md create mode 100644 sdks/java-v1/docs/SubBulkSignerList.md create mode 100644 sdks/java-v1/docs/SubBulkSignerListCustomField.md create mode 100644 sdks/java-v1/docs/SubCC.md create mode 100644 sdks/java-v1/docs/SubCustomField.md create mode 100644 sdks/java-v1/docs/SubEditorOptions.md create mode 100644 sdks/java-v1/docs/SubFieldOptions.md create mode 100644 sdks/java-v1/docs/SubFormFieldGroup.md create mode 100644 sdks/java-v1/docs/SubFormFieldRule.md create mode 100644 sdks/java-v1/docs/SubFormFieldRuleAction.md create mode 100644 sdks/java-v1/docs/SubFormFieldRuleTrigger.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentText.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md create mode 100644 sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md create mode 100644 sdks/java-v1/docs/SubMergeField.md create mode 100644 sdks/java-v1/docs/SubOAuth.md create mode 100644 sdks/java-v1/docs/SubOptions.md create mode 100644 sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md create mode 100644 sdks/java-v1/docs/SubSignatureRequestSigner.md create mode 100644 sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md create mode 100644 sdks/java-v1/docs/SubSigningOptions.md create mode 100644 sdks/java-v1/docs/SubTeamResponse.md create mode 100644 sdks/java-v1/docs/SubTemplateRole.md create mode 100644 sdks/java-v1/docs/SubUnclaimedDraftSigner.md create mode 100644 sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md create mode 100644 sdks/java-v1/docs/SubWhiteLabelingOptions.md create mode 100644 sdks/java-v1/docs/TeamAddMemberRequest.md create mode 100644 sdks/java-v1/docs/TeamApi.md create mode 100644 sdks/java-v1/docs/TeamCreateRequest.md create mode 100644 sdks/java-v1/docs/TeamGetInfoResponse.md create mode 100644 sdks/java-v1/docs/TeamGetResponse.md create mode 100644 sdks/java-v1/docs/TeamInfoResponse.md create mode 100644 sdks/java-v1/docs/TeamInviteResponse.md create mode 100644 sdks/java-v1/docs/TeamInvitesResponse.md create mode 100644 sdks/java-v1/docs/TeamMemberResponse.md create mode 100644 sdks/java-v1/docs/TeamMembersResponse.md create mode 100644 sdks/java-v1/docs/TeamParentResponse.md create mode 100644 sdks/java-v1/docs/TeamRemoveMemberRequest.md create mode 100644 sdks/java-v1/docs/TeamResponse.md create mode 100644 sdks/java-v1/docs/TeamSubTeamsResponse.md create mode 100644 sdks/java-v1/docs/TeamUpdateRequest.md create mode 100644 sdks/java-v1/docs/TemplateAddUserRequest.md create mode 100644 sdks/java-v1/docs/TemplateApi.md create mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md create mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md create mode 100644 sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md create mode 100644 sdks/java-v1/docs/TemplateCreateRequest.md create mode 100644 sdks/java-v1/docs/TemplateCreateResponse.md create mode 100644 sdks/java-v1/docs/TemplateCreateResponseTemplate.md create mode 100644 sdks/java-v1/docs/TemplateEditResponse.md create mode 100644 sdks/java-v1/docs/TemplateGetResponse.md create mode 100644 sdks/java-v1/docs/TemplateListResponse.md create mode 100644 sdks/java-v1/docs/TemplateRemoveUserRequest.md create mode 100644 sdks/java-v1/docs/TemplateResponse.md create mode 100644 sdks/java-v1/docs/TemplateResponseAccount.md create mode 100644 sdks/java-v1/docs/TemplateResponseAccountQuota.md create mode 100644 sdks/java-v1/docs/TemplateResponseCCRole.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocument.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md create mode 100644 sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md create mode 100644 sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md create mode 100644 sdks/java-v1/docs/TemplateResponseSignerRole.md create mode 100644 sdks/java-v1/docs/TemplateUpdateFilesRequest.md create mode 100644 sdks/java-v1/docs/TemplateUpdateFilesResponse.md create mode 100644 sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftApi.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateRequest.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftCreateResponse.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md create mode 100644 sdks/java-v1/docs/UnclaimedDraftResponse.md create mode 100644 sdks/java-v1/docs/WarningResponse.md create mode 100644 sdks/java-v1/src/main/AndroidManifest.xml create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java create mode 100644 sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java delete mode 100644 sdks/java-v1/templates/RFC3339InstantDeserializer.mustache delete mode 100644 sdks/java-v1/templates/RFC3339JavaTimeModule.mustache diff --git a/sdks/java-v1/docs/AccountApi.md b/sdks/java-v1/docs/AccountApi.md new file mode 100644 index 000000000..cd7c9244f --- /dev/null +++ b/sdks/java-v1/docs/AccountApi.md @@ -0,0 +1,345 @@ +# AccountApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**accountCreate**](AccountApi.md#accountCreate) | **POST** /account/create | Create Account +[**accountGet**](AccountApi.md#accountGet) | **GET** /account | Get Account +[**accountUpdate**](AccountApi.md#accountUpdate) | **PUT** /account | Update Account +[**accountVerify**](AccountApi.md#accountVerify) | **POST** /account/verify | Verify Account + + + +## accountCreate + +> AccountCreateResponse accountCreate(accountCreateRequest) + +Create Account + +Creates a new Dropbox Sign Account that is associated with the specified `email_address`. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var accountCreateRequest = new AccountCreateRequest(); + accountCreateRequest.emailAddress("newuser@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountCreate( + accountCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountCreateRequest** | [**AccountCreateRequest**](AccountCreateRequest.md)| | + +### Return type + +[**AccountCreateResponse**](AccountCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## accountGet + +> AccountGetResponse accountGet(accountId, emailAddress) + +Get Account + +Returns the properties and settings of your Account. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new AccountApi(config).accountGet(); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountGet"); + 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**| `account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account. | [optional] + **emailAddress** | **String**| `account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account. | [optional] + +### Return type + +[**AccountGetResponse**](AccountGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## accountUpdate + +> AccountGetResponse accountUpdate(accountUpdateRequest) + +Update Account + +Updates the properties and settings of your Account. Currently only allows for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var accountUpdateRequest = new AccountUpdateRequest(); + accountUpdateRequest.callbackUrl("https://www.example.com/callback"); + accountUpdateRequest.locale("en-US"); + + try + { + var response = new AccountApi(config).accountUpdate( + accountUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountUpdateRequest** | [**AccountUpdateRequest**](AccountUpdateRequest.md)| | + +### Return type + +[**AccountGetResponse**](AccountGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## accountVerify + +> AccountVerifyResponse accountVerify(accountVerifyRequest) + +Verify Account + +Verifies whether an Dropbox Sign Account exists for the given email address. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class AccountVerifyExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var accountVerifyRequest = new AccountVerifyRequest(); + accountVerifyRequest.emailAddress("some_user@dropboxsign.com"); + + try + { + var response = new AccountApi(config).accountVerify( + accountVerifyRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling AccountApi#accountVerify"); + 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 | +|------------- | ------------- | ------------- | -------------| + **accountVerifyRequest** | [**AccountVerifyRequest**](AccountVerifyRequest.md)| | + +### Return type + +[**AccountVerifyResponse**](AccountVerifyResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/AccountCreateRequest.md b/sdks/java-v1/docs/AccountCreateRequest.md new file mode 100644 index 000000000..9c75292a7 --- /dev/null +++ b/sdks/java-v1/docs/AccountCreateRequest.md @@ -0,0 +1,17 @@ + + +# AccountCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress`*_required_ | ```String``` | The email address which will be associated with the new Account. | | +| `clientId` | ```String``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | +| `clientSecret` | ```String``` | Used when creating a new account with OAuth authorization.

See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization) | | +| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | + + + diff --git a/sdks/java-v1/docs/AccountCreateResponse.md b/sdks/java-v1/docs/AccountCreateResponse.md new file mode 100644 index 000000000..7e09def2b --- /dev/null +++ b/sdks/java-v1/docs/AccountCreateResponse.md @@ -0,0 +1,16 @@ + + +# AccountCreateResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `account`*_required_ | [```AccountResponse```](AccountResponse.md) | | | +| `oauthData` | [```OAuthTokenResponse```](OAuthTokenResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/AccountGetResponse.md b/sdks/java-v1/docs/AccountGetResponse.md new file mode 100644 index 000000000..f5ed78b06 --- /dev/null +++ b/sdks/java-v1/docs/AccountGetResponse.md @@ -0,0 +1,15 @@ + + +# AccountGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `account`*_required_ | [```AccountResponse```](AccountResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/AccountResponse.md b/sdks/java-v1/docs/AccountResponse.md new file mode 100644 index 000000000..5b73aa02d --- /dev/null +++ b/sdks/java-v1/docs/AccountResponse.md @@ -0,0 +1,24 @@ + + +# AccountResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The ID of the Account | | +| `emailAddress` | ```String``` | The email address associated with the Account. | | +| `isLocked` | ```Boolean``` | Returns `true` if the user has been locked out of their account by a team admin. | | +| `isPaidHs` | ```Boolean``` | Returns `true` if the user has a paid Dropbox Sign account. | | +| `isPaidHf` | ```Boolean``` | Returns `true` if the user has a paid HelloFax account. | | +| `quotas` | [```AccountResponseQuotas```](AccountResponseQuotas.md) | | | +| `callbackUrl` | ```String``` | The URL that Dropbox Sign events will `POST` to. | | +| `roleCode` | ```String``` | The membership role for the team. | | +| `teamId` | ```String``` | The id of the team account belongs to. | | +| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | +| `usage` | [```AccountResponseUsage```](AccountResponseUsage.md) | | | + + + diff --git a/sdks/java-v1/docs/AccountResponseQuotas.md b/sdks/java-v1/docs/AccountResponseQuotas.md new file mode 100644 index 000000000..e7510a8d7 --- /dev/null +++ b/sdks/java-v1/docs/AccountResponseQuotas.md @@ -0,0 +1,19 @@ + + +# AccountResponseQuotas + +Details concerning remaining monthly quotas. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiSignatureRequestsLeft` | ```Integer``` | API signature requests remaining. | | +| `documentsLeft` | ```Integer``` | Signature requests remaining. | | +| `templatesTotal` | ```Integer``` | Total API templates allowed. | | +| `templatesLeft` | ```Integer``` | API templates remaining. | | +| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | +| `numFaxPagesLeft` | ```Integer``` | Number of fax pages left | | + + + diff --git a/sdks/java-v1/docs/AccountResponseUsage.md b/sdks/java-v1/docs/AccountResponseUsage.md new file mode 100644 index 000000000..1cdb76629 --- /dev/null +++ b/sdks/java-v1/docs/AccountResponseUsage.md @@ -0,0 +1,14 @@ + + +# AccountResponseUsage + +Details concerning monthly usage + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxPagesSent` | ```Integer``` | Number of fax pages sent | | + + + diff --git a/sdks/java-v1/docs/AccountUpdateRequest.md b/sdks/java-v1/docs/AccountUpdateRequest.md new file mode 100644 index 000000000..43121c890 --- /dev/null +++ b/sdks/java-v1/docs/AccountUpdateRequest.md @@ -0,0 +1,16 @@ + + +# AccountUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The ID of the Account | | +| `callbackUrl` | ```String``` | The URL that Dropbox Sign should POST events to. | | +| `locale` | ```String``` | The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values. | | + + + diff --git a/sdks/java-v1/docs/AccountVerifyRequest.md b/sdks/java-v1/docs/AccountVerifyRequest.md new file mode 100644 index 000000000..d14a8eb2b --- /dev/null +++ b/sdks/java-v1/docs/AccountVerifyRequest.md @@ -0,0 +1,14 @@ + + +# AccountVerifyRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress`*_required_ | ```String``` | Email address to run the verification for. | | + + + diff --git a/sdks/java-v1/docs/AccountVerifyResponse.md b/sdks/java-v1/docs/AccountVerifyResponse.md new file mode 100644 index 000000000..8868f15b2 --- /dev/null +++ b/sdks/java-v1/docs/AccountVerifyResponse.md @@ -0,0 +1,15 @@ + + +# AccountVerifyResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `account` | [```AccountVerifyResponseAccount```](AccountVerifyResponseAccount.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/AccountVerifyResponseAccount.md b/sdks/java-v1/docs/AccountVerifyResponseAccount.md new file mode 100644 index 000000000..f83f9f0eb --- /dev/null +++ b/sdks/java-v1/docs/AccountVerifyResponseAccount.md @@ -0,0 +1,14 @@ + + +# AccountVerifyResponseAccount + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress` | ```String``` | The email address associated with the Account. | | + + + diff --git a/sdks/java-v1/docs/ApiAppApi.md b/sdks/java-v1/docs/ApiAppApi.md new file mode 100644 index 000000000..672878e86 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppApi.md @@ -0,0 +1,461 @@ +# ApiAppApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**apiAppCreate**](ApiAppApi.md#apiAppCreate) | **POST** /api_app | Create API App +[**apiAppDelete**](ApiAppApi.md#apiAppDelete) | **DELETE** /api_app/{client_id} | Delete API App +[**apiAppGet**](ApiAppApi.md#apiAppGet) | **GET** /api_app/{client_id} | Get API App +[**apiAppList**](ApiAppApi.md#apiAppList) | **GET** /api_app/list | List API Apps +[**apiAppUpdate**](ApiAppApi.md#apiAppUpdate) | **PUT** /api_app/{client_id} | Update API App + + + +## apiAppCreate + +> ApiAppGetResponse apiAppCreate(apiAppCreateRequest) + +Create API App + +Creates a new API App. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppCreateRequest = new ApiAppCreateRequest(); + apiAppCreateRequest.name("My Production App"); + apiAppCreateRequest.domains(List.of ( + "example.com" + )); + apiAppCreateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppCreateRequest.oauth(oauth); + apiAppCreateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppCreate( + apiAppCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **apiAppCreateRequest** | [**ApiAppCreateRequest**](ApiAppCreateRequest.md)| | + +### Return type + +[**ApiAppGetResponse**](ApiAppGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## apiAppDelete + +> apiAppDelete(clientId) + +Delete API App + +Deletes an API App. Can only be invoked for apps you own. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + new ApiAppApi(config).apiAppDelete( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppDelete"); + 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 | +|------------- | ------------- | ------------- | -------------| + **clientId** | **String**| The client id of the API App to delete. | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## apiAppGet + +> ApiAppGetResponse apiAppGet(clientId) + +Get API App + +Returns an object with information about an API App. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppGet( + "0dd3b823a682527788c4e40cb7b6f7e9" // clientId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **clientId** | **String**| The client id of the API App to retrieve. | + +### Return type + +[**ApiAppGetResponse**](ApiAppGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## apiAppList + +> ApiAppListResponse apiAppList(page, pageSize) + +List API Apps + +Returns a list of API Apps that are accessible by you. If you are on a team with an Admin or Developer role, this list will include apps owned by teammates. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new ApiAppApi(config).apiAppList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppList"); + 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 | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Which page number of the API App List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + +### Return type + +[**ApiAppListResponse**](ApiAppListResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## apiAppUpdate + +> ApiAppGetResponse apiAppUpdate(clientId, apiAppUpdateRequest) + +Update API App + +Updates an existing API App. Can only be invoked for apps you own. Only the fields you provide will be updated. If you wish to clear an existing optional field, provide an empty string. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ApiAppUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var oauth = new SubOAuth(); + oauth.callbackUrl("https://example.com/oauth"); + oauth.scopes(List.of ( + SubOAuth.ScopesEnum.BASIC_ACCOUNT_INFO, + SubOAuth.ScopesEnum.REQUEST_SIGNATURE + )); + + var whiteLabelingOptions = new SubWhiteLabelingOptions(); + whiteLabelingOptions.primaryButtonColor("#00b3e6"); + whiteLabelingOptions.primaryButtonTextColor("#ffffff"); + + var apiAppUpdateRequest = new ApiAppUpdateRequest(); + apiAppUpdateRequest.callbackUrl("https://example.com/dropboxsign"); + apiAppUpdateRequest.name("New Name"); + apiAppUpdateRequest.domains(List.of ( + "example.com" + )); + apiAppUpdateRequest.customLogoFile(new File("CustomLogoFile.png")); + apiAppUpdateRequest.oauth(oauth); + apiAppUpdateRequest.whiteLabelingOptions(whiteLabelingOptions); + + try + { + var response = new ApiAppApi(config).apiAppUpdate( + "0dd3b823a682527788c4e40cb7b6f7e9", // clientId + apiAppUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ApiAppApi#apiAppUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **clientId** | **String**| The client id of the API App to update. | + **apiAppUpdateRequest** | [**ApiAppUpdateRequest**](ApiAppUpdateRequest.md)| | + +### Return type + +[**ApiAppGetResponse**](ApiAppGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/ApiAppCreateRequest.md b/sdks/java-v1/docs/ApiAppCreateRequest.md new file mode 100644 index 000000000..b787bc7c0 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppCreateRequest.md @@ -0,0 +1,20 @@ + + +# ApiAppCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `domains`*_required_ | ```List``` | The domain names the ApiApp will be associated with. | | +| `name`*_required_ | ```String``` | The name you want to assign to the ApiApp. | | +| `callbackUrl` | ```String``` | The URL at which the ApiApp should receive event callbacks. | | +| `customLogoFile` | ```File``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | | | +| `options` | [```SubOptions```](SubOptions.md) | | | +| `whiteLabelingOptions` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | + + + diff --git a/sdks/java-v1/docs/ApiAppGetResponse.md b/sdks/java-v1/docs/ApiAppGetResponse.md new file mode 100644 index 000000000..98e2f98d6 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppGetResponse.md @@ -0,0 +1,15 @@ + + +# ApiAppGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiApp`*_required_ | [```ApiAppResponse```](ApiAppResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/ApiAppListResponse.md b/sdks/java-v1/docs/ApiAppListResponse.md new file mode 100644 index 000000000..14c287f97 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppListResponse.md @@ -0,0 +1,16 @@ + + +# ApiAppListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiApps`*_required_ | [```List```](ApiAppResponse.md) | Contains information about API Apps. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/ApiAppResponse.md b/sdks/java-v1/docs/ApiAppResponse.md new file mode 100644 index 000000000..afe95c850 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppResponse.md @@ -0,0 +1,23 @@ + + +# ApiAppResponse + +Contains information about an API App. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `callbackUrl` | ```String``` | The app's callback URL (for events) | | +| `clientId` | ```String``` | The app's client id | | +| `createdAt` | ```Integer``` | The time that the app was created | | +| `domains` | ```List``` | The domain name(s) associated with the app | | +| `name` | ```String``` | The name of the app | | +| `isApproved` | ```Boolean``` | Boolean to indicate if the app has been approved | | +| `oauth` | [```ApiAppResponseOAuth```](ApiAppResponseOAuth.md) | | | +| `options` | [```ApiAppResponseOptions```](ApiAppResponseOptions.md) | | | +| `ownerAccount` | [```ApiAppResponseOwnerAccount```](ApiAppResponseOwnerAccount.md) | | | +| `whiteLabelingOptions` | [```ApiAppResponseWhiteLabelingOptions```](ApiAppResponseWhiteLabelingOptions.md) | | | + + + diff --git a/sdks/java-v1/docs/ApiAppResponseOAuth.md b/sdks/java-v1/docs/ApiAppResponseOAuth.md new file mode 100644 index 000000000..c2f705c7a --- /dev/null +++ b/sdks/java-v1/docs/ApiAppResponseOAuth.md @@ -0,0 +1,17 @@ + + +# ApiAppResponseOAuth + +An object describing the app's OAuth properties, or null if OAuth is not configured for the app. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `callbackUrl` | ```String``` | The app's OAuth callback URL. | | +| `secret` | ```String``` | The app's OAuth secret, or null if the app does not belong to user. | | +| `scopes` | ```List``` | Array of OAuth scopes used by the app. | | +| `chargesUsers` | ```Boolean``` | Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests. | | + + + diff --git a/sdks/java-v1/docs/ApiAppResponseOptions.md b/sdks/java-v1/docs/ApiAppResponseOptions.md new file mode 100644 index 000000000..07979f387 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppResponseOptions.md @@ -0,0 +1,14 @@ + + +# ApiAppResponseOptions + +An object with options that override account settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `canInsertEverywhere` | ```Boolean``` | Boolean denoting if signers can "Insert Everywhere" in one click while signing a document | | + + + diff --git a/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md b/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md new file mode 100644 index 000000000..b4d6d4249 --- /dev/null +++ b/sdks/java-v1/docs/ApiAppResponseOwnerAccount.md @@ -0,0 +1,15 @@ + + +# ApiAppResponseOwnerAccount + +An object describing the app's owner + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The owner account's ID | | +| `emailAddress` | ```String``` | The owner account's email address | | + + + diff --git a/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md b/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md new file mode 100644 index 000000000..be6d022fd --- /dev/null +++ b/sdks/java-v1/docs/ApiAppResponseWhiteLabelingOptions.md @@ -0,0 +1,27 @@ + + +# ApiAppResponseWhiteLabelingOptions + +An object with options to customize the app's signer page + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `headerBackgroundColor` | ```String``` | | | +| `legalVersion` | ```String``` | | | +| `linkColor` | ```String``` | | | +| `pageBackgroundColor` | ```String``` | | | +| `primaryButtonColor` | ```String``` | | | +| `primaryButtonColorHover` | ```String``` | | | +| `primaryButtonTextColor` | ```String``` | | | +| `primaryButtonTextColorHover` | ```String``` | | | +| `secondaryButtonColor` | ```String``` | | | +| `secondaryButtonColorHover` | ```String``` | | | +| `secondaryButtonTextColor` | ```String``` | | | +| `secondaryButtonTextColorHover` | ```String``` | | | +| `textColor1` | ```String``` | | | +| `textColor2` | ```String``` | | | + + + diff --git a/sdks/java-v1/docs/ApiAppUpdateRequest.md b/sdks/java-v1/docs/ApiAppUpdateRequest.md new file mode 100644 index 000000000..1c0efafdc --- /dev/null +++ b/sdks/java-v1/docs/ApiAppUpdateRequest.md @@ -0,0 +1,20 @@ + + +# ApiAppUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `callbackUrl` | ```String``` | The URL at which the API App should receive event callbacks. | | +| `customLogoFile` | ```File``` | An image file to use as a custom logo in embedded contexts. (Only applies to some API plans) | | +| `domains` | ```List``` | The domain names the ApiApp will be associated with. | | +| `name` | ```String``` | The name you want to assign to the ApiApp. | | +| `oauth` | [```SubOAuth```](SubOAuth.md) | | | +| `options` | [```SubOptions```](SubOptions.md) | | | +| `whiteLabelingOptions` | [```SubWhiteLabelingOptions```](SubWhiteLabelingOptions.md) | | | + + + diff --git a/sdks/java-v1/docs/BulkSendJobApi.md b/sdks/java-v1/docs/BulkSendJobApi.md new file mode 100644 index 000000000..742d55134 --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobApi.md @@ -0,0 +1,178 @@ +# BulkSendJobApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**bulkSendJobGet**](BulkSendJobApi.md#bulkSendJobGet) | **GET** /bulk_send_job/{bulk_send_job_id} | Get Bulk Send Job +[**bulkSendJobList**](BulkSendJobApi.md#bulkSendJobList) | **GET** /bulk_send_job/list | List Bulk Send Jobs + + + +## bulkSendJobGet + +> BulkSendJobGetResponse bulkSendJobGet(bulkSendJobId, page, pageSize) + +Get Bulk Send Job + +Returns the status of the BulkSendJob and its SignatureRequests specified by the `bulk_send_job_id` parameter. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobGet( + "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174", // bulkSendJobId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **bulkSendJobId** | **String**| The id of the BulkSendJob to retrieve. | + **page** | **Integer**| Which page number of the BulkSendJob list to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional] [default to 20] + +### Return type + +[**BulkSendJobGetResponse**](BulkSendJobGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## bulkSendJobList + +> BulkSendJobListResponse bulkSendJobList(page, pageSize) + +List Bulk Send Jobs + +Returns a list of BulkSendJob that you can access. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkSendJobListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new BulkSendJobApi(config).bulkSendJobList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling BulkSendJobApi#bulkSendJobList"); + 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 | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Which page number of the BulkSendJob List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is 20. | [optional] [default to 20] + +### Return type + +[**BulkSendJobListResponse**](BulkSendJobListResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/BulkSendJobGetResponse.md b/sdks/java-v1/docs/BulkSendJobGetResponse.md new file mode 100644 index 000000000..93395ee2d --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobGetResponse.md @@ -0,0 +1,17 @@ + + +# BulkSendJobGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `bulkSendJob`*_required_ | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `signatureRequests`*_required_ | [```List```](BulkSendJobGetResponseSignatureRequests.md) | Contains information about the Signature Requests sent in bulk. | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md b/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md new file mode 100644 index 000000000..09809ea86 --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobGetResponseSignatureRequests.md @@ -0,0 +1,38 @@ + + +# BulkSendJobGetResponseSignatureRequests + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `testMode` | ```Boolean``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | | +| `signatureRequestId` | ```String``` | The id of the SignatureRequest. | | +| `requesterEmailAddress` | ```String``` | The email address of the initiator of the SignatureRequest. | | +| `title` | ```String``` | The title the specified Account uses for the SignatureRequest. | | +| `originalTitle` | ```String``` | Default Label for account. | | +| `subject` | ```String``` | The subject in the email that was initially sent to the signers. | | +| `message` | ```String``` | The custom message in the email that was initially sent to the signers. | | +| `metadata` | ```Map``` | The metadata attached to the signature request. | | +| `createdAt` | ```Integer``` | Time the signature request was created. | | +| `expiresAt` | ```Integer``` | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | +| `isComplete` | ```Boolean``` | Whether or not the SignatureRequest has been fully executed by all signers. | | +| `isDeclined` | ```Boolean``` | Whether or not the SignatureRequest has been declined by a signer. | | +| `hasError` | ```Boolean``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | +| `filesUrl` | ```String``` | The URL where a copy of the request's documents can be downloaded. | | +| `signingUrl` | ```String``` | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | | +| `detailsUrl` | ```String``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | +| `ccEmailAddresses` | ```List``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | +| `signingRedirectUrl` | ```String``` | The URL you want the signer redirected to after they successfully sign. | | +| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | +| `templateIds` | ```List``` | Templates IDs used in this SignatureRequest (if any). | | +| `customFields` | [```List```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | +| `responseData` | [```List```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | +| `signatures` | [```List```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | +| `bulkSendJobId` | ```String``` | The id of the BulkSendJob. | | + + + diff --git a/sdks/java-v1/docs/BulkSendJobListResponse.md b/sdks/java-v1/docs/BulkSendJobListResponse.md new file mode 100644 index 000000000..e5eb2315d --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobListResponse.md @@ -0,0 +1,16 @@ + + +# BulkSendJobListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `bulkSendJobs`*_required_ | [```List```](BulkSendJobResponse.md) | Contains a list of BulkSendJobs that the API caller has access to. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/BulkSendJobResponse.md b/sdks/java-v1/docs/BulkSendJobResponse.md new file mode 100644 index 000000000..eb2278a34 --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobResponse.md @@ -0,0 +1,17 @@ + + +# BulkSendJobResponse + +Contains information about the BulkSendJob such as when it was created and how many signature requests are queued. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `bulkSendJobId` | ```String``` | The id of the BulkSendJob. | | +| `total` | ```Integer``` | The total amount of Signature Requests queued for sending. | | +| `isCreator` | ```Boolean``` | True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member. | | +| `createdAt` | ```Integer``` | Time that the BulkSendJob was created. | | + + + diff --git a/sdks/java-v1/docs/BulkSendJobSendResponse.md b/sdks/java-v1/docs/BulkSendJobSendResponse.md new file mode 100644 index 000000000..532b64b5b --- /dev/null +++ b/sdks/java-v1/docs/BulkSendJobSendResponse.md @@ -0,0 +1,15 @@ + + +# BulkSendJobSendResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `bulkSendJob`*_required_ | [```BulkSendJobResponse```](BulkSendJobResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/EmbeddedApi.md b/sdks/java-v1/docs/EmbeddedApi.md new file mode 100644 index 000000000..04700004d --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedApi.md @@ -0,0 +1,182 @@ +# EmbeddedApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**embeddedEditUrl**](EmbeddedApi.md#embeddedEditUrl) | **POST** /embedded/edit_url/{template_id} | Get Embedded Template Edit URL +[**embeddedSignUrl**](EmbeddedApi.md#embeddedSignUrl) | **GET** /embedded/sign_url/{signature_id} | Get Embedded Sign URL + + + +## embeddedEditUrl + +> EmbeddedEditUrlResponse embeddedEditUrl(templateId, embeddedEditUrlRequest) + +Get Embedded Template Edit URL + +Retrieves an embedded object containing a template url that can be opened in an iFrame. Note that only templates created via the embedded template process are available to be edited with this endpoint. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedEditUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var mergeFields = new ArrayList(List.of ()); + + var embeddedEditUrlRequest = new EmbeddedEditUrlRequest(); + embeddedEditUrlRequest.ccRoles(List.of ( + "" + )); + embeddedEditUrlRequest.mergeFields(mergeFields); + + try + { + var response = new EmbeddedApi(config).embeddedEditUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + embeddedEditUrlRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedEditUrl"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the template to edit. | + **embeddedEditUrlRequest** | [**EmbeddedEditUrlRequest**](EmbeddedEditUrlRequest.md)| | + +### Return type + +[**EmbeddedEditUrlResponse**](EmbeddedEditUrlResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## embeddedSignUrl + +> EmbeddedSignUrlResponse embeddedSignUrl(signatureId) + +Get Embedded Sign URL + +Retrieves an embedded object containing a signature url that can be opened in an iFrame. Note that templates created via the embedded template process will only be accessible through the API. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class EmbeddedSignUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new EmbeddedApi(config).embeddedSignUrl( + "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" // signatureId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling EmbeddedApi#embeddedSignUrl"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureId** | **String**| The id of the signature to get a signature url for. | + +### Return type + +[**EmbeddedSignUrlResponse**](EmbeddedSignUrlResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/EmbeddedEditUrlRequest.md b/sdks/java-v1/docs/EmbeddedEditUrlRequest.md new file mode 100644 index 000000000..4e2d8c2e9 --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedEditUrlRequest.md @@ -0,0 +1,23 @@ + + +# EmbeddedEditUrlRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `allowEditCcs` | ```Boolean``` | This allows the requester to enable/disable to add or change CC roles when editing the template. | | +| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request. | | +| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | +| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | +| `mergeFields` | [```List```](SubMergeField.md) | Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template.

Remove all merge fields on the template by passing an empty array `[]`. | | +| `previewOnly` | ```Boolean``` | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

**NOTE:** This parameter overwrites `show_preview=true` (if set). | | +| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `testMode` | ```Boolean``` | Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`. | | + + + diff --git a/sdks/java-v1/docs/EmbeddedEditUrlResponse.md b/sdks/java-v1/docs/EmbeddedEditUrlResponse.md new file mode 100644 index 000000000..959e0c75f --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedEditUrlResponse.md @@ -0,0 +1,15 @@ + + +# EmbeddedEditUrlResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `embedded`*_required_ | [```EmbeddedEditUrlResponseEmbedded```](EmbeddedEditUrlResponseEmbedded.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md b/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md new file mode 100644 index 000000000..78ad7026c --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedEditUrlResponseEmbedded.md @@ -0,0 +1,15 @@ + + +# EmbeddedEditUrlResponseEmbedded + +An embedded template object. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `editUrl` | ```String``` | A template url that can be opened in an iFrame. | | +| `expiresAt` | ```Integer``` | The specific time that the the `edit_url` link expires, in epoch. | | + + + diff --git a/sdks/java-v1/docs/EmbeddedSignUrlResponse.md b/sdks/java-v1/docs/EmbeddedSignUrlResponse.md new file mode 100644 index 000000000..6f39b97fe --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedSignUrlResponse.md @@ -0,0 +1,15 @@ + + +# EmbeddedSignUrlResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `embedded`*_required_ | [```EmbeddedSignUrlResponseEmbedded```](EmbeddedSignUrlResponseEmbedded.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md b/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md new file mode 100644 index 000000000..b2fd6c9df --- /dev/null +++ b/sdks/java-v1/docs/EmbeddedSignUrlResponseEmbedded.md @@ -0,0 +1,15 @@ + + +# EmbeddedSignUrlResponseEmbedded + +An object that contains necessary information to set up embedded signing. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signUrl` | ```String``` | A signature url that can be opened in an iFrame. | | +| `expiresAt` | ```Integer``` | The specific time that the the `sign_url` link expires, in epoch. | | + + + diff --git a/sdks/java-v1/docs/ErrorResponse.md b/sdks/java-v1/docs/ErrorResponse.md new file mode 100644 index 000000000..f1a560c3b --- /dev/null +++ b/sdks/java-v1/docs/ErrorResponse.md @@ -0,0 +1,14 @@ + + +# ErrorResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `error`*_required_ | [```ErrorResponseError```](ErrorResponseError.md) | | | + + + diff --git a/sdks/java-v1/docs/ErrorResponseError.md b/sdks/java-v1/docs/ErrorResponseError.md new file mode 100644 index 000000000..656aa5c7f --- /dev/null +++ b/sdks/java-v1/docs/ErrorResponseError.md @@ -0,0 +1,16 @@ + + +# ErrorResponseError + +Contains information about an error that occurred. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `errorMsg`*_required_ | ```String``` | Message describing an error. | | +| `errorName`*_required_ | ```String``` | Name of the error. | | +| `errorPath` | ```String``` | Path at which an error occurred. | | + + + diff --git a/sdks/java-v1/docs/EventCallbackRequest.md b/sdks/java-v1/docs/EventCallbackRequest.md new file mode 100644 index 000000000..73daf943e --- /dev/null +++ b/sdks/java-v1/docs/EventCallbackRequest.md @@ -0,0 +1,17 @@ + + +# EventCallbackRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `event`*_required_ | [```EventCallbackRequestEvent```](EventCallbackRequestEvent.md) | | | +| `account` | [```AccountResponse```](AccountResponse.md) | | | +| `signatureRequest` | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | +| `template` | [```TemplateResponse```](TemplateResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/EventCallbackRequestEvent.md b/sdks/java-v1/docs/EventCallbackRequestEvent.md new file mode 100644 index 000000000..19ab491c2 --- /dev/null +++ b/sdks/java-v1/docs/EventCallbackRequestEvent.md @@ -0,0 +1,47 @@ + + +# EventCallbackRequestEvent + +Basic information about the event that occurred. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `eventTime`*_required_ | ```String``` | Time the event was created (using Unix time). | | +| `eventType`*_required_ | [```EventTypeEnum```](#EventTypeEnum) | Type of callback event that was triggered. | | +| `eventHash`*_required_ | ```String``` | Generated hash used to verify source of event data. | | +| `eventMetadata` | [```EventCallbackRequestEventMetadata```](EventCallbackRequestEventMetadata.md) | | | + + + +## Enum: EventTypeEnum + +| Name | Value | +---- | ----- +| ACCOUNT_CONFIRMED | "account_confirmed" | +| UNKNOWN_ERROR | "unknown_error" | +| FILE_ERROR | "file_error" | +| SIGN_URL_INVALID | "sign_url_invalid" | +| SIGNATURE_REQUEST_VIEWED | "signature_request_viewed" | +| SIGNATURE_REQUEST_SIGNED | "signature_request_signed" | +| SIGNATURE_REQUEST_SENT | "signature_request_sent" | +| SIGNATURE_REQUEST_ALL_SIGNED | "signature_request_all_signed" | +| SIGNATURE_REQUEST_EMAIL_BOUNCE | "signature_request_email_bounce" | +| SIGNATURE_REQUEST_REMIND | "signature_request_remind" | +| SIGNATURE_REQUEST_INCOMPLETE_QES | "signature_request_incomplete_qes" | +| SIGNATURE_REQUEST_DESTROYED | "signature_request_destroyed" | +| SIGNATURE_REQUEST_CANCELED | "signature_request_canceled" | +| SIGNATURE_REQUEST_DOWNLOADABLE | "signature_request_downloadable" | +| SIGNATURE_REQUEST_DECLINED | "signature_request_declined" | +| SIGNATURE_REQUEST_REASSIGNED | "signature_request_reassigned" | +| SIGNATURE_REQUEST_INVALID | "signature_request_invalid" | +| SIGNATURE_REQUEST_PREPARED | "signature_request_prepared" | +| SIGNATURE_REQUEST_EXPIRED | "signature_request_expired" | +| TEMPLATE_CREATED | "template_created" | +| TEMPLATE_ERROR | "template_error" | +| CALLBACK_TEST | "callback_test" | +| SIGNATURE_REQUEST_SIGNER_REMOVED | "signature_request_signer_removed" | + + + diff --git a/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md b/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md new file mode 100644 index 000000000..13208c2d1 --- /dev/null +++ b/sdks/java-v1/docs/EventCallbackRequestEventMetadata.md @@ -0,0 +1,17 @@ + + +# EventCallbackRequestEventMetadata + +Specific metadata about the event. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `relatedSignatureId` | ```String``` | Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events. | | +| `reportedForAccountId` | ```String``` | Account ID the event was reported for. | | +| `reportedForAppId` | ```String``` | App ID the event was reported for. | | +| `eventMessage` | ```String``` | Message about a declined or failed (due to error) signature flow. | | + + + diff --git a/sdks/java-v1/docs/FaxApi.md b/sdks/java-v1/docs/FaxApi.md new file mode 100644 index 000000000..b092573e7 --- /dev/null +++ b/sdks/java-v1/docs/FaxApi.md @@ -0,0 +1,424 @@ +# FaxApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**faxDelete**](FaxApi.md#faxDelete) | **DELETE** /fax/{fax_id} | Delete Fax +[**faxFiles**](FaxApi.md#faxFiles) | **GET** /fax/files/{fax_id} | Download Fax Files +[**faxGet**](FaxApi.md#faxGet) | **GET** /fax/{fax_id} | Get Fax +[**faxList**](FaxApi.md#faxList) | **GET** /fax/list | Lists Faxes +[**faxSend**](FaxApi.md#faxSend) | **POST** /fax/send | Send Fax + + + +## faxDelete + +> faxDelete(faxId) + +Delete Fax + +Deletes the specified Fax from the system + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + new FaxApi(config).faxDelete( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxDelete"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxFiles + +> File faxFiles(faxId) + +Download Fax Files + +Downloads files associated with a Fax + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxFiles"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxGet + +> FaxGetResponse faxGet(faxId) + +Get Fax + +Returns information about a Fax + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // faxId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxId** | **String**| Fax ID | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxList + +> FaxListResponse faxList(page, pageSize) + +Lists Faxes + +Returns properties of multiple Faxes + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxApi(config).faxList( + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxList"); + 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 | +|------------- | ------------- | ------------- | -------------| + **page** | **Integer**| Which page number of the Fax List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + +### Return type + +[**FaxListResponse**](FaxListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxSend + +> FaxGetResponse faxSend(faxSendRequest) + +Send Fax + +Creates and sends a new Fax with the submitted file(s) + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var faxSendRequest = new FaxSendRequest(); + faxSendRequest.recipient("16690000001"); + faxSendRequest.sender("16690000000"); + faxSendRequest.testMode(true); + faxSendRequest.coverPageTo("Jill Fax"); + faxSendRequest.coverPageFrom("Faxer Faxerson"); + faxSendRequest.coverPageMessage("I'm sending you a fax!"); + faxSendRequest.title("This is what the fax is about!"); + faxSendRequest.files(List.of ( + new File("./example_fax.pdf") + )); + + try + { + var response = new FaxApi(config).faxSend( + faxSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxApi#faxSend"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxSendRequest** | [**FaxSendRequest**](FaxSendRequest.md)| | + +### Return type + +[**FaxGetResponse**](FaxGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/FaxGetResponse.md b/sdks/java-v1/docs/FaxGetResponse.md new file mode 100644 index 000000000..cc9dc6e57 --- /dev/null +++ b/sdks/java-v1/docs/FaxGetResponse.md @@ -0,0 +1,15 @@ + + +# FaxGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `fax`*_required_ | [```FaxResponse```](FaxResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/FaxLineAddUserRequest.md b/sdks/java-v1/docs/FaxLineAddUserRequest.md new file mode 100644 index 000000000..4023bd024 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAddUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineAddUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `number`*_required_ | ```String``` | The Fax Line number | | +| `accountId` | ```String``` | Account ID | | +| `emailAddress` | ```String``` | Email address | | + + + diff --git a/sdks/java-v1/docs/FaxLineApi.md b/sdks/java-v1/docs/FaxLineApi.md new file mode 100644 index 000000000..d1aafb013 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineApi.md @@ -0,0 +1,600 @@ +# FaxLineApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**faxLineAddUser**](FaxLineApi.md#faxLineAddUser) | **PUT** /fax_line/add_user | Add Fax Line User +[**faxLineAreaCodeGet**](FaxLineApi.md#faxLineAreaCodeGet) | **GET** /fax_line/area_codes | Get Available Fax Line Area Codes +[**faxLineCreate**](FaxLineApi.md#faxLineCreate) | **POST** /fax_line/create | Purchase Fax Line +[**faxLineDelete**](FaxLineApi.md#faxLineDelete) | **DELETE** /fax_line | Delete Fax Line +[**faxLineGet**](FaxLineApi.md#faxLineGet) | **GET** /fax_line | Get Fax Line +[**faxLineList**](FaxLineApi.md#faxLineList) | **GET** /fax_line/list | List Fax Lines +[**faxLineRemoveUser**](FaxLineApi.md#faxLineRemoveUser) | **PUT** /fax_line/remove_user | Remove Fax Line Access + + + +## faxLineAddUser + +> FaxLineResponse faxLineAddUser(faxLineAddUserRequest) + +Add Fax Line User + +Grants a user access to the specified Fax Line. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var faxLineAddUserRequest = new FaxLineAddUserRequest(); + faxLineAddUserRequest.number("[FAX_NUMBER]"); + faxLineAddUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineAddUser( + faxLineAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAddUser"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxLineAddUserRequest** | [**FaxLineAddUserRequest**](FaxLineAddUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineAreaCodeGet + +> FaxLineAreaCodeGetResponse faxLineAreaCodeGet(country, state, province, city) + +Get Available Fax Line Area Codes + +Returns a list of available area codes for a given state/province and city + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineAreaCodeGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineAreaCodeGet( + "US", // country + null, // state + null, // province + null // city + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **country** | **String**| Filter area codes by country | [enum: CA, US, UK] + **state** | **String**| Filter area codes by state | [optional] [enum: AK, AL, AR, AZ, CA, CO, CT, DC, DE, FL, GA, HI, IA, ID, IL, IN, KS, KY, LA, MA, MD, ME, MI, MN, MO, MS, MT, NC, ND, NE, NH, NJ, NM, NV, NY, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VA, VT, WA, WI, WV, WY] + **province** | **String**| Filter area codes by province | [optional] [enum: AB, BC, MB, NB, NL, NT, NS, NU, ON, PE, QC, SK, YT] + **city** | **String**| Filter area codes by city | [optional] + +### Return type + +[**FaxLineAreaCodeGetResponse**](FaxLineAreaCodeGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineCreate + +> FaxLineResponse faxLineCreate(faxLineCreateRequest) + +Purchase Fax Line + +Purchases a new Fax Line + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var faxLineCreateRequest = new FaxLineCreateRequest(); + faxLineCreateRequest.areaCode(209); + faxLineCreateRequest.country(FaxLineCreateRequest.CountryEnum.US); + + try + { + var response = new FaxLineApi(config).faxLineCreate( + faxLineCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxLineCreateRequest** | [**FaxLineCreateRequest**](FaxLineCreateRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineDelete + +> faxLineDelete(faxLineDeleteRequest) + +Delete Fax Line + +Deletes the specified Fax Line from the subscription. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var faxLineDeleteRequest = new FaxLineDeleteRequest(); + faxLineDeleteRequest.number("[FAX_NUMBER]"); + + try + { + new FaxLineApi(config).faxLineDelete( + faxLineDeleteRequest + ); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineDelete"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxLineDeleteRequest** | [**FaxLineDeleteRequest**](FaxLineDeleteRequest.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineGet + +> FaxLineResponse faxLineGet(number) + +Get Fax Line + +Returns the properties and settings of a Fax Line. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineGet( + "123-123-1234" // number + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **number** | **String**| The Fax Line number | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineList + +> FaxLineListResponse faxLineList(accountId, page, pageSize, showTeamLines) + +List Fax Lines + +Returns the properties and settings of multiple Fax Lines. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + var response = new FaxLineApi(config).faxLineList( + "ab55cd14a97219e36b5ff5fe23f2f9329b0c1e97", // accountId + 1, // page + 20, // pageSize + null // showTeamLines + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineList"); + 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**| Account ID | [optional] + **page** | **Integer**| Which page number of the Fax Line List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + **showTeamLines** | **Boolean**| Include Fax Lines belonging to team members in the list | [optional] + +### Return type + +[**FaxLineListResponse**](FaxLineListResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## faxLineRemoveUser + +> FaxLineResponse faxLineRemoveUser(faxLineRemoveUserRequest) + +Remove Fax Line Access + +Removes a user's access to the specified Fax Line + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class FaxLineRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var faxLineRemoveUserRequest = new FaxLineRemoveUserRequest(); + faxLineRemoveUserRequest.number("[FAX_NUMBER]"); + faxLineRemoveUserRequest.emailAddress("member@dropboxsign.com"); + + try + { + var response = new FaxLineApi(config).faxLineRemoveUser( + faxLineRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling FaxLineApi#faxLineRemoveUser"); + 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 | +|------------- | ------------- | ------------- | -------------| + **faxLineRemoveUserRequest** | [**FaxLineRemoveUserRequest**](FaxLineRemoveUserRequest.md)| | + +### Return type + +[**FaxLineResponse**](FaxLineResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md new file mode 100644 index 000000000..10275bc6c --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetCountryEnum.md @@ -0,0 +1,15 @@ + + +# FaxLineAreaCodeGetCountryEnum + +## Enum + + +* `CA` (value: `"CA"`) + +* `US` (value: `"US"`) + +* `UK` (value: `"UK"`) + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md new file mode 100644 index 000000000..13cf50078 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetProvinceEnum.md @@ -0,0 +1,35 @@ + + +# FaxLineAreaCodeGetProvinceEnum + +## Enum + + +* `AB` (value: `"AB"`) + +* `BC` (value: `"BC"`) + +* `MB` (value: `"MB"`) + +* `NB` (value: `"NB"`) + +* `NL` (value: `"NL"`) + +* `NT` (value: `"NT"`) + +* `NS` (value: `"NS"`) + +* `NU` (value: `"NU"`) + +* `ON` (value: `"ON"`) + +* `PE` (value: `"PE"`) + +* `QC` (value: `"QC"`) + +* `SK` (value: `"SK"`) + +* `YT` (value: `"YT"`) + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md b/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md new file mode 100644 index 000000000..002619333 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetResponse.md @@ -0,0 +1,14 @@ + + +# FaxLineAreaCodeGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `areaCodes`*_required_ | ```List``` | | | + + + diff --git a/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md b/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md new file mode 100644 index 000000000..577a48c63 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineAreaCodeGetStateEnum.md @@ -0,0 +1,111 @@ + + +# FaxLineAreaCodeGetStateEnum + +## Enum + + +* `AK` (value: `"AK"`) + +* `AL` (value: `"AL"`) + +* `AR` (value: `"AR"`) + +* `AZ` (value: `"AZ"`) + +* `CA` (value: `"CA"`) + +* `CO` (value: `"CO"`) + +* `CT` (value: `"CT"`) + +* `DC` (value: `"DC"`) + +* `DE` (value: `"DE"`) + +* `FL` (value: `"FL"`) + +* `GA` (value: `"GA"`) + +* `HI` (value: `"HI"`) + +* `IA` (value: `"IA"`) + +* `ID` (value: `"ID"`) + +* `IL` (value: `"IL"`) + +* `IN` (value: `"IN"`) + +* `KS` (value: `"KS"`) + +* `KY` (value: `"KY"`) + +* `LA` (value: `"LA"`) + +* `MA` (value: `"MA"`) + +* `MD` (value: `"MD"`) + +* `ME` (value: `"ME"`) + +* `MI` (value: `"MI"`) + +* `MN` (value: `"MN"`) + +* `MO` (value: `"MO"`) + +* `MS` (value: `"MS"`) + +* `MT` (value: `"MT"`) + +* `NC` (value: `"NC"`) + +* `ND` (value: `"ND"`) + +* `NE` (value: `"NE"`) + +* `NH` (value: `"NH"`) + +* `NJ` (value: `"NJ"`) + +* `NM` (value: `"NM"`) + +* `NV` (value: `"NV"`) + +* `NY` (value: `"NY"`) + +* `OH` (value: `"OH"`) + +* `OK` (value: `"OK"`) + +* `OR` (value: `"OR"`) + +* `PA` (value: `"PA"`) + +* `RI` (value: `"RI"`) + +* `SC` (value: `"SC"`) + +* `SD` (value: `"SD"`) + +* `TN` (value: `"TN"`) + +* `TX` (value: `"TX"`) + +* `UT` (value: `"UT"`) + +* `VA` (value: `"VA"`) + +* `VT` (value: `"VT"`) + +* `WA` (value: `"WA"`) + +* `WI` (value: `"WI"`) + +* `WV` (value: `"WV"`) + +* `WY` (value: `"WY"`) + + + diff --git a/sdks/java-v1/docs/FaxLineCreateRequest.md b/sdks/java-v1/docs/FaxLineCreateRequest.md new file mode 100644 index 000000000..7fd1be6bf --- /dev/null +++ b/sdks/java-v1/docs/FaxLineCreateRequest.md @@ -0,0 +1,27 @@ + + +# FaxLineCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `areaCode`*_required_ | ```Integer``` | Area code of the new Fax Line | | +| `country`*_required_ | [```CountryEnum```](#CountryEnum) | Country of the area code | | +| `city` | ```String``` | City of the area code | | +| `accountId` | ```String``` | Account ID of the account that will be assigned this new Fax Line | | + + + +## Enum: CountryEnum + +| Name | Value | +---- | ----- +| CA | "CA" | +| US | "US" | +| UK | "UK" | + + + diff --git a/sdks/java-v1/docs/FaxLineDeleteRequest.md b/sdks/java-v1/docs/FaxLineDeleteRequest.md new file mode 100644 index 000000000..4b45b339f --- /dev/null +++ b/sdks/java-v1/docs/FaxLineDeleteRequest.md @@ -0,0 +1,14 @@ + + +# FaxLineDeleteRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `number`*_required_ | ```String``` | The Fax Line number | | + + + diff --git a/sdks/java-v1/docs/FaxLineListResponse.md b/sdks/java-v1/docs/FaxLineListResponse.md new file mode 100644 index 000000000..69891dc2f --- /dev/null +++ b/sdks/java-v1/docs/FaxLineListResponse.md @@ -0,0 +1,16 @@ + + +# FaxLineListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `faxLines`*_required_ | [```List```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxLineRemoveUserRequest.md b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md new file mode 100644 index 000000000..8e55d572d --- /dev/null +++ b/sdks/java-v1/docs/FaxLineRemoveUserRequest.md @@ -0,0 +1,16 @@ + + +# FaxLineRemoveUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `number`*_required_ | ```String``` | The Fax Line number | | +| `accountId` | ```String``` | Account ID of the user to remove access | | +| `emailAddress` | ```String``` | Email address of the user to remove access | | + + + diff --git a/sdks/java-v1/docs/FaxLineResponse.md b/sdks/java-v1/docs/FaxLineResponse.md new file mode 100644 index 000000000..c5256bbc6 --- /dev/null +++ b/sdks/java-v1/docs/FaxLineResponse.md @@ -0,0 +1,15 @@ + + +# FaxLineResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxLine`*_required_ | [```FaxLineResponseFaxLine```](FaxLineResponseFaxLine.md) | | | +| `warnings` | [```WarningResponse```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxLineResponseFaxLine.md b/sdks/java-v1/docs/FaxLineResponseFaxLine.md new file mode 100644 index 000000000..daf0d206a --- /dev/null +++ b/sdks/java-v1/docs/FaxLineResponseFaxLine.md @@ -0,0 +1,17 @@ + + +# FaxLineResponseFaxLine + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `number` | ```String``` | Number | | +| `createdAt` | ```Integer``` | Created at | | +| `updatedAt` | ```Integer``` | Updated at | | +| `accounts` | [```List```](AccountResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxListResponse.md b/sdks/java-v1/docs/FaxListResponse.md new file mode 100644 index 000000000..f25379a27 --- /dev/null +++ b/sdks/java-v1/docs/FaxListResponse.md @@ -0,0 +1,15 @@ + + +# FaxListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxes`*_required_ | [```List```](FaxResponse.md) | | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/FaxResponse.md b/sdks/java-v1/docs/FaxResponse.md new file mode 100644 index 000000000..a1c857b48 --- /dev/null +++ b/sdks/java-v1/docs/FaxResponse.md @@ -0,0 +1,24 @@ + + +# FaxResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `faxId`*_required_ | ```String``` | Fax ID | | +| `title`*_required_ | ```String``` | Fax Title | | +| `originalTitle`*_required_ | ```String``` | Fax Original Title | | +| `metadata`*_required_ | ```Map``` | Fax Metadata | | +| `createdAt`*_required_ | ```Integer``` | Fax Created At Timestamp | | +| `sender`*_required_ | ```String``` | Fax Sender Email | | +| `filesUrl`*_required_ | ```String``` | Fax Files URL | | +| `transmissions`*_required_ | [```List```](FaxResponseTransmission.md) | Fax Transmissions List | | +| `subject` | ```String``` | Fax Subject | | +| `message` | ```String``` | Fax Message | | +| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | + + + diff --git a/sdks/java-v1/docs/FaxResponseTransmission.md b/sdks/java-v1/docs/FaxResponseTransmission.md new file mode 100644 index 000000000..535750b13 --- /dev/null +++ b/sdks/java-v1/docs/FaxResponseTransmission.md @@ -0,0 +1,31 @@ + + +# FaxResponseTransmission + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Fax Transmission Recipient | | +| `statusCode`*_required_ | [```StatusCodeEnum```](#StatusCodeEnum) | Fax Transmission Status Code | | +| `sentAt` | ```Integer``` | Fax Transmission Sent Timestamp | | + + + +## Enum: StatusCodeEnum + +| Name | Value | +---- | ----- +| SUCCESS | "success" | +| TRANSMITTING | "transmitting" | +| ERROR_COULD_NOT_FAX | "error_could_not_fax" | +| ERROR_UNKNOWN | "error_unknown" | +| ERROR_BUSY | "error_busy" | +| ERROR_NO_ANSWER | "error_no_answer" | +| ERROR_DISCONNECTED | "error_disconnected" | +| ERROR_BAD_DESTINATION | "error_bad_destination" | + + + diff --git a/sdks/java-v1/docs/FaxSendRequest.md b/sdks/java-v1/docs/FaxSendRequest.md new file mode 100644 index 000000000..65b105756 --- /dev/null +++ b/sdks/java-v1/docs/FaxSendRequest.md @@ -0,0 +1,22 @@ + + +# FaxSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `recipient`*_required_ | ```String``` | Recipient of the fax Can be a phone number in E.164 format or email address | | +| `sender` | ```String``` | Fax Send From Sender (used only with fax number) | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Fax download the file(s) to fax

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `testMode` | ```Boolean``` | API Test Mode Setting | | +| `coverPageTo` | ```String``` | Fax cover page recipient information | | +| `coverPageFrom` | ```String``` | Fax cover page sender information | | +| `coverPageMessage` | ```String``` | Fax Cover Page Message | | +| `title` | ```String``` | Fax Title | | + + + diff --git a/sdks/java-v1/docs/FileResponse.md b/sdks/java-v1/docs/FileResponse.md new file mode 100644 index 000000000..058a80ed5 --- /dev/null +++ b/sdks/java-v1/docs/FileResponse.md @@ -0,0 +1,15 @@ + + +# FileResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `fileUrl`*_required_ | ```String``` | URL to the file. | | +| `expiresAt`*_required_ | ```Integer``` | When the link expires. | | + + + diff --git a/sdks/java-v1/docs/FileResponseDataUri.md b/sdks/java-v1/docs/FileResponseDataUri.md new file mode 100644 index 000000000..65c0b7dbc --- /dev/null +++ b/sdks/java-v1/docs/FileResponseDataUri.md @@ -0,0 +1,14 @@ + + +# FileResponseDataUri + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `dataUri`*_required_ | ```String``` | File as base64 encoded string. | | + + + diff --git a/sdks/java-v1/docs/ListInfoResponse.md b/sdks/java-v1/docs/ListInfoResponse.md new file mode 100644 index 000000000..b9d464ec7 --- /dev/null +++ b/sdks/java-v1/docs/ListInfoResponse.md @@ -0,0 +1,17 @@ + + +# ListInfoResponse + +Contains pagination information about the data returned. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `numPages` | ```Integer``` | Total number of pages available. | | +| `numResults` | ```Integer``` | Total number of objects available. | | +| `page` | ```Integer``` | Number of the page being returned. | | +| `pageSize` | ```Integer``` | Objects returned per page. | | + + + diff --git a/sdks/java-v1/docs/OAuthApi.md b/sdks/java-v1/docs/OAuthApi.md new file mode 100644 index 000000000..ed9b039c2 --- /dev/null +++ b/sdks/java-v1/docs/OAuthApi.md @@ -0,0 +1,179 @@ +# OAuthApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**oauthTokenGenerate**](OAuthApi.md#oauthTokenGenerate) | **POST** /oauth/token | OAuth Token Generate +[**oauthTokenRefresh**](OAuthApi.md#oauthTokenRefresh) | **POST** /oauth/token?refresh | OAuth Token Refresh + + + +## oauthTokenGenerate + +> OAuthTokenResponse oauthTokenGenerate(oauthTokenGenerateRequest) + +OAuth Token Generate + +Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenGenerateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenGenerateRequest = new OAuthTokenGenerateRequest(); + oAuthTokenGenerateRequest.clientId("cc91c61d00f8bb2ece1428035716b"); + oAuthTokenGenerateRequest.clientSecret("1d14434088507ffa390e6f5528465"); + oAuthTokenGenerateRequest.code("1b0d28d90c86c141"); + oAuthTokenGenerateRequest.state("900e06e2"); + oAuthTokenGenerateRequest.grantType("authorization_code"); + + try + { + var response = new OAuthApi(config).oauthTokenGenerate( + oAuthTokenGenerateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenGenerate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **oauthTokenGenerateRequest** | [**OAuthTokenGenerateRequest**](OAuthTokenGenerateRequest.md)| | + +### Return type + +[**OAuthTokenResponse**](OAuthTokenResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## oauthTokenRefresh + +> OAuthTokenResponse oauthTokenRefresh(oauthTokenRefreshRequest) + +OAuth Token Refresh + +Access tokens are only valid for a given period of time (typically one hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see `expires_in`), along with a refresh token that can be used to acquire a new access token after the current one has expired. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class OauthTokenRefreshExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + + var oAuthTokenRefreshRequest = new OAuthTokenRefreshRequest(); + oAuthTokenRefreshRequest.grantType("refresh_token"); + oAuthTokenRefreshRequest.refreshToken("hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3"); + + try + { + var response = new OAuthApi(config).oauthTokenRefresh( + oAuthTokenRefreshRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling OAuthApi#oauthTokenRefresh"); + 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 | +|------------- | ------------- | ------------- | -------------| + **oauthTokenRefreshRequest** | [**OAuthTokenRefreshRequest**](OAuthTokenRefreshRequest.md)| | + +### Return type + +[**OAuthTokenResponse**](OAuthTokenResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/OAuthTokenGenerateRequest.md b/sdks/java-v1/docs/OAuthTokenGenerateRequest.md new file mode 100644 index 000000000..45ad0b08e --- /dev/null +++ b/sdks/java-v1/docs/OAuthTokenGenerateRequest.md @@ -0,0 +1,18 @@ + + +# OAuthTokenGenerateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | The client id of the app requesting authorization. | | +| `clientSecret`*_required_ | ```String``` | The secret token of your app. | | +| `code`*_required_ | ```String``` | The code passed to your callback when the user granted access. | | +| `grantType`*_required_ | ```String``` | When generating a new token use `authorization_code`. | | +| `state`*_required_ | ```String``` | Same as the state you specified earlier. | | + + + diff --git a/sdks/java-v1/docs/OAuthTokenRefreshRequest.md b/sdks/java-v1/docs/OAuthTokenRefreshRequest.md new file mode 100644 index 000000000..f0ce43061 --- /dev/null +++ b/sdks/java-v1/docs/OAuthTokenRefreshRequest.md @@ -0,0 +1,17 @@ + + +# OAuthTokenRefreshRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `grantType`*_required_ | ```String``` | When refreshing an existing token use `refresh_token`. | | +| `refreshToken`*_required_ | ```String``` | The token provided when you got the expired access token. | | +| `clientId` | ```String``` | The client ID for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | +| `clientSecret` | ```String``` | The client secret for your API app. Mandatory from August 1st, 2025. Until then, required if the "Client Credentials Required" setting is enabled for token refresh; optional if disabled. | | + + + diff --git a/sdks/java-v1/docs/OAuthTokenResponse.md b/sdks/java-v1/docs/OAuthTokenResponse.md new file mode 100644 index 000000000..86824ccb0 --- /dev/null +++ b/sdks/java-v1/docs/OAuthTokenResponse.md @@ -0,0 +1,18 @@ + + +# OAuthTokenResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accessToken` | ```String``` | | | +| `tokenType` | ```String``` | | | +| `refreshToken` | ```String``` | | | +| `expiresIn` | ```Integer``` | Number of seconds until the `access_token` expires. Uses epoch time. | | +| `state` | ```String``` | | | + + + diff --git a/sdks/java-v1/docs/ReportApi.md b/sdks/java-v1/docs/ReportApi.md new file mode 100644 index 000000000..1ef6af025 --- /dev/null +++ b/sdks/java-v1/docs/ReportApi.md @@ -0,0 +1,99 @@ +# ReportApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**reportCreate**](ReportApi.md#reportCreate) | **POST** /report/create | Create Report + + + +## reportCreate + +> ReportCreateResponse reportCreate(reportCreateRequest) + +Create Report + +Request the creation of one or more report(s). + +When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class ReportCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var reportCreateRequest = new ReportCreateRequest(); + reportCreateRequest.startDate("09/01/2020"); + reportCreateRequest.endDate("09/01/2020"); + reportCreateRequest.reportType(List.of ( + ReportCreateRequest.ReportTypeEnum.USER_ACTIVITY, + ReportCreateRequest.ReportTypeEnum.DOCUMENT_STATUS + )); + + try + { + var response = new ReportApi(config).reportCreate( + reportCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling ReportApi#reportCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **reportCreateRequest** | [**ReportCreateRequest**](ReportCreateRequest.md)| | + +### Return type + +[**ReportCreateResponse**](ReportCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/ReportCreateRequest.md b/sdks/java-v1/docs/ReportCreateRequest.md new file mode 100644 index 000000000..d2f4b67e2 --- /dev/null +++ b/sdks/java-v1/docs/ReportCreateRequest.md @@ -0,0 +1,25 @@ + + +# ReportCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `endDate`*_required_ | ```String``` | The (inclusive) end date for the report data in `MM/DD/YYYY` format. | | +| `reportType`*_required_ | [```List<ReportTypeEnum>```](#List<ReportTypeEnum>) | The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | | +| `startDate`*_required_ | ```String``` | The (inclusive) start date for the report data in `MM/DD/YYYY` format. | | + + + +## Enum: List<ReportTypeEnum> + +| Name | Value | +---- | ----- +| USER_ACTIVITY | "user_activity" | +| DOCUMENT_STATUS | "document_status" | + + + diff --git a/sdks/java-v1/docs/ReportCreateResponse.md b/sdks/java-v1/docs/ReportCreateResponse.md new file mode 100644 index 000000000..9fc8565de --- /dev/null +++ b/sdks/java-v1/docs/ReportCreateResponse.md @@ -0,0 +1,15 @@ + + +# ReportCreateResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `report`*_required_ | [```ReportResponse```](ReportResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/ReportResponse.md b/sdks/java-v1/docs/ReportResponse.md new file mode 100644 index 000000000..b48dde6f4 --- /dev/null +++ b/sdks/java-v1/docs/ReportResponse.md @@ -0,0 +1,26 @@ + + +# ReportResponse + +Contains information about the report request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `success` | ```String``` | A message indicating the requested operation's success | | +| `startDate` | ```String``` | The (inclusive) start date for the report data in MM/DD/YYYY format. | | +| `endDate` | ```String``` | The (inclusive) end date for the report data in MM/DD/YYYY format. | | +| `reportType` | [```List<ReportTypeEnum>```](#List<ReportTypeEnum>) | The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status). | | + + + +## Enum: List<ReportTypeEnum> + +| Name | Value | +---- | ----- +| USER_ACTIVITY | "user_activity" | +| DOCUMENT_STATUS | "document_status" | + + + diff --git a/sdks/java-v1/docs/SignatureRequestApi.md b/sdks/java-v1/docs/SignatureRequestApi.md new file mode 100644 index 000000000..9c22f6611 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestApi.md @@ -0,0 +1,2155 @@ +# SignatureRequestApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**signatureRequestBulkCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestBulkCreateEmbeddedWithTemplate) | **POST** /signature_request/bulk_create_embedded_with_template | Embedded Bulk Send with Template +[**signatureRequestBulkSendWithTemplate**](SignatureRequestApi.md#signatureRequestBulkSendWithTemplate) | **POST** /signature_request/bulk_send_with_template | Bulk Send with Template +[**signatureRequestCancel**](SignatureRequestApi.md#signatureRequestCancel) | **POST** /signature_request/cancel/{signature_request_id} | Cancel Incomplete Signature Request +[**signatureRequestCreateEmbedded**](SignatureRequestApi.md#signatureRequestCreateEmbedded) | **POST** /signature_request/create_embedded | Create Embedded Signature Request +[**signatureRequestCreateEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestCreateEmbeddedWithTemplate) | **POST** /signature_request/create_embedded_with_template | Create Embedded Signature Request with Template +[**signatureRequestEdit**](SignatureRequestApi.md#signatureRequestEdit) | **PUT** /signature_request/edit/{signature_request_id} | Edit Signature Request +[**signatureRequestEditEmbedded**](SignatureRequestApi.md#signatureRequestEditEmbedded) | **PUT** /signature_request/edit_embedded/{signature_request_id} | Edit Embedded Signature Request +[**signatureRequestEditEmbeddedWithTemplate**](SignatureRequestApi.md#signatureRequestEditEmbeddedWithTemplate) | **PUT** /signature_request/edit_embedded_with_template/{signature_request_id} | Edit Embedded Signature Request with Template +[**signatureRequestEditWithTemplate**](SignatureRequestApi.md#signatureRequestEditWithTemplate) | **PUT** /signature_request/edit_with_template/{signature_request_id} | Edit Signature Request With Template +[**signatureRequestFiles**](SignatureRequestApi.md#signatureRequestFiles) | **GET** /signature_request/files/{signature_request_id} | Download Files +[**signatureRequestFilesAsDataUri**](SignatureRequestApi.md#signatureRequestFilesAsDataUri) | **GET** /signature_request/files_as_data_uri/{signature_request_id} | Download Files as Data Uri +[**signatureRequestFilesAsFileUrl**](SignatureRequestApi.md#signatureRequestFilesAsFileUrl) | **GET** /signature_request/files_as_file_url/{signature_request_id} | Download Files as File Url +[**signatureRequestGet**](SignatureRequestApi.md#signatureRequestGet) | **GET** /signature_request/{signature_request_id} | Get Signature Request +[**signatureRequestList**](SignatureRequestApi.md#signatureRequestList) | **GET** /signature_request/list | List Signature Requests +[**signatureRequestReleaseHold**](SignatureRequestApi.md#signatureRequestReleaseHold) | **POST** /signature_request/release_hold/{signature_request_id} | Release On-Hold Signature Request +[**signatureRequestRemind**](SignatureRequestApi.md#signatureRequestRemind) | **POST** /signature_request/remind/{signature_request_id} | Send Request Reminder +[**signatureRequestRemove**](SignatureRequestApi.md#signatureRequestRemove) | **POST** /signature_request/remove/{signature_request_id} | Remove Signature Request Access +[**signatureRequestSend**](SignatureRequestApi.md#signatureRequestSend) | **POST** /signature_request/send | Send Signature Request +[**signatureRequestSendWithTemplate**](SignatureRequestApi.md#signatureRequestSendWithTemplate) | **POST** /signature_request/send_with_template | Send with Template +[**signatureRequestUpdate**](SignatureRequestApi.md#signatureRequestUpdate) | **POST** /signature_request/update/{signature_request_id} | Update Signature Request + + + +## signatureRequestBulkCreateEmbeddedWithTemplate + +> BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate(signatureRequestBulkCreateEmbeddedWithTemplateRequest) + +Embedded Bulk Send with Template + +Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter to be signed in an embedded iFrame. These embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +**NOTE:** Only available for Standard plan and higher. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkCreateEmbeddedWithTemplateRequest = new SignatureRequestBulkCreateEmbeddedWithTemplateRequest(); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.clientId("1a659d9ad95bccd307ecad78d72192f8"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.signerList(signerList); + signatureRequestBulkCreateEmbeddedWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkCreateEmbeddedWithTemplate( + signatureRequestBulkCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkCreateEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestBulkCreateEmbeddedWithTemplateRequest** | [**SignatureRequestBulkCreateEmbeddedWithTemplateRequest**](SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestBulkSendWithTemplate + +> BulkSendJobSendResponse signatureRequestBulkSendWithTemplate(signatureRequestBulkSendWithTemplateRequest) + +Bulk Send with Template + +Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of the provided Template(s) specified with the `template_ids` parameter. + +**NOTE:** Only available for Standard plan and higher. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestBulkSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signerList2CustomFields1 = new SubBulkSignerListCustomField(); + signerList2CustomFields1.name("company"); + signerList2CustomFields1.value("123 LLC"); + + var signerList2CustomFields = new ArrayList(List.of ( + signerList2CustomFields1 + )); + + var signerList2Signers1 = new SubSignatureRequestTemplateSigner(); + signerList2Signers1.role("Client"); + signerList2Signers1.name("Mary"); + signerList2Signers1.emailAddress("mary@example.com"); + signerList2Signers1.pin("gd9as5b"); + + var signerList2Signers = new ArrayList(List.of ( + signerList2Signers1 + )); + + var signerList1CustomFields1 = new SubBulkSignerListCustomField(); + signerList1CustomFields1.name("company"); + signerList1CustomFields1.value("ABC Corp"); + + var signerList1CustomFields = new ArrayList(List.of ( + signerList1CustomFields1 + )); + + var signerList1Signers1 = new SubSignatureRequestTemplateSigner(); + signerList1Signers1.role("Client"); + signerList1Signers1.name("George"); + signerList1Signers1.emailAddress("george@example.com"); + signerList1Signers1.pin("d79a3td"); + + var signerList1Signers = new ArrayList(List.of ( + signerList1Signers1 + )); + + var signerList1 = new SubBulkSignerList(); + signerList1.customFields(signerList1CustomFields); + signerList1.signers(signerList1Signers); + + var signerList2 = new SubBulkSignerList(); + signerList2.customFields(signerList2CustomFields); + signerList2.signers(signerList2Signers); + + var signerList = new ArrayList(List.of ( + signerList1, + signerList2 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signatureRequestBulkSendWithTemplateRequest = new SignatureRequestBulkSendWithTemplateRequest(); + signatureRequestBulkSendWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestBulkSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestBulkSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestBulkSendWithTemplateRequest.testMode(true); + signatureRequestBulkSendWithTemplateRequest.signerList(signerList); + signatureRequestBulkSendWithTemplateRequest.ccs(ccs); + + try + { + var response = new SignatureRequestApi(config).signatureRequestBulkSendWithTemplate( + signatureRequestBulkSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestBulkSendWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestBulkSendWithTemplateRequest** | [**SignatureRequestBulkSendWithTemplateRequest**](SignatureRequestBulkSendWithTemplateRequest.md)| | + +### Return type + +[**BulkSendJobSendResponse**](BulkSendJobSendResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestCancel + +> signatureRequestCancel(signatureRequestId) + +Cancel Incomplete Signature Request + +Cancels an incomplete signature request. This action is **not reversible**. + +The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. + +This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. + +To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. + +**NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCancelExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + new SignatureRequestApi(config).signatureRequestCancel( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the incomplete SignatureRequest to cancel. | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestCreateEmbedded + +> SignatureRequestGetResponse signatureRequestCreateEmbedded(signatureRequestCreateEmbeddedRequest) + +Create Embedded Signature Request + +Creates a new SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestCreateEmbeddedRequest = new SignatureRequestCreateEmbeddedRequest(); + signatureRequestCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestCreateEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestCreateEmbeddedRequest.testMode(true); + signatureRequestCreateEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestCreateEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestCreateEmbeddedRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbedded( + signatureRequestCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbedded"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestCreateEmbeddedRequest** | [**SignatureRequestCreateEmbeddedRequest**](SignatureRequestCreateEmbeddedRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestCreateEmbeddedWithTemplate + +> SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate(signatureRequestCreateEmbeddedWithTemplateRequest) + +Create Embedded Signature Request with Template + +Creates a new SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestCreateEmbeddedWithTemplateRequest = new SignatureRequestCreateEmbeddedWithTemplateRequest(); + signatureRequestCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestCreateEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestCreateEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestCreateEmbeddedWithTemplateRequest.testMode(true); + signatureRequestCreateEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestCreateEmbeddedWithTemplate( + signatureRequestCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestCreateEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestCreateEmbeddedWithTemplateRequest** | [**SignatureRequestCreateEmbeddedWithTemplateRequest**](SignatureRequestCreateEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestEdit + +> SignatureRequestGetResponse signatureRequestEdit(signatureRequestId, signatureRequestEditRequest) + +Edit Signature Request + +Edits and sends a SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditRequest = new SignatureRequestEditRequest(); + signatureRequestEditRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditRequest.subject("The NDA we talked about"); + signatureRequestEditRequest.testMode(true); + signatureRequestEditRequest.title("NDA with Acme Co."); + signatureRequestEditRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestEditRequest.fieldOptions(fieldOptions); + signatureRequestEditRequest.signingOptions(signingOptions); + signatureRequestEditRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEdit( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEdit"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditRequest** | [**SignatureRequestEditRequest**](SignatureRequestEditRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestEditEmbedded + +> SignatureRequestGetResponse signatureRequestEditEmbedded(signatureRequestId, signatureRequestEditEmbeddedRequest) + +Edit Embedded Signature Request + +Edits a SignatureRequest with the submitted documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestEditEmbeddedRequest = new SignatureRequestEditEmbeddedRequest(); + signatureRequestEditEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestEditEmbeddedRequest.subject("The NDA we talked about"); + signatureRequestEditEmbeddedRequest.testMode(true); + signatureRequestEditEmbeddedRequest.title("NDA with Acme Co."); + signatureRequestEditEmbeddedRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestEditEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestEditEmbeddedRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbedded( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbedded"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedRequest** | [**SignatureRequestEditEmbeddedRequest**](SignatureRequestEditEmbeddedRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestEditEmbeddedWithTemplate + +> SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate(signatureRequestId, signatureRequestEditEmbeddedWithTemplateRequest) + +Edit Embedded Signature Request with Template + +Edits a SignatureRequest based on the given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can only be signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var signatureRequestEditEmbeddedWithTemplateRequest = new SignatureRequestEditEmbeddedWithTemplateRequest(); + signatureRequestEditEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + signatureRequestEditEmbeddedWithTemplateRequest.templateIds(List.of ( + "c26b8a16784a872da37ea946b9ddec7c1e11dff6" + )); + signatureRequestEditEmbeddedWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditEmbeddedWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditEmbeddedWithTemplateRequest.testMode(true); + signatureRequestEditEmbeddedWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditEmbeddedWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditEmbeddedWithTemplateRequest** | [**SignatureRequestEditEmbeddedWithTemplateRequest**](SignatureRequestEditEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestEditWithTemplate + +> SignatureRequestGetResponse signatureRequestEditWithTemplate(signatureRequestId, signatureRequestEditWithTemplateRequest) + +Edit Signature Request With Template + +Edits and sends a SignatureRequest based off of the Template(s) specified with the template_ids parameter. + +**NOTE:** Edit and resend will not deduct your signature request quota. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestEditWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestEditWithTemplateRequest = new SignatureRequestEditWithTemplateRequest(); + signatureRequestEditWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestEditWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestEditWithTemplateRequest.subject("Purchase Order"); + signatureRequestEditWithTemplateRequest.testMode(true); + signatureRequestEditWithTemplateRequest.signingOptions(signingOptions); + signatureRequestEditWithTemplateRequest.signers(signers); + signatureRequestEditWithTemplateRequest.ccs(ccs); + signatureRequestEditWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestEditWithTemplate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestEditWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestEditWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to edit. | + **signatureRequestEditWithTemplateRequest** | [**SignatureRequestEditWithTemplateRequest**](SignatureRequestEditWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestFiles + +> File signatureRequestFiles(signatureRequestId, fileType) + +Download Files + +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a PDF or ZIP file. + +If the files are currently being prepared, a status code of `409` will be returned instead. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFiles( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + "pdf" // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFiles"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | + **fileType** | **String**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [default to pdf] [enum: pdf, zip] + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/zip, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestFilesAsDataUri + +> FileResponseDataUri signatureRequestFilesAsDataUri(signatureRequestId) + +Download Files as Data Uri + +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsDataUri( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsDataUri"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | + +### Return type + +[**FileResponseDataUri**](FileResponseDataUri.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestFilesAsFileUrl + +> FileResponse signatureRequestFilesAsFileUrl(signatureRequestId, forceDownload) + +Download Files as File Url + +Obtain a copy of the current documents specified by the `signature_request_id` parameter. Returns a JSON object with a url to the file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestFilesAsFileUrl( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestFilesAsFileUrl"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | + **forceDownload** | **Integer**| By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. | [optional] [default to 1] + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestGet + +> SignatureRequestGetResponse signatureRequestGet(signatureRequestId) + +Get Signature Request + +Returns the status of the SignatureRequest specified by the `signature_request_id` parameter. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestGet( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to retrieve. | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestList + +> SignatureRequestListResponse signatureRequestList(accountId, page, pageSize, query) + +List Signature Requests + +Returns a list of SignatureRequests that you can access. This includes SignatureRequests you have sent as well as received, but not ones that you have been CCed on. + +Take a look at our [search guide](/api/reference/search/) to learn more about querying signature requests. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestList"); + 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**| Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] + **page** | **Integer**| Which page number of the SignatureRequest List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + **query** | **String**| String that includes search terms and/or fields to be used to filter the SignatureRequest objects. | [optional] + +### Return type + +[**SignatureRequestListResponse**](SignatureRequestListResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestReleaseHold + +> SignatureRequestGetResponse signatureRequestReleaseHold(signatureRequestId) + +Release On-Hold Signature Request + +Releases a held SignatureRequest that was claimed and prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft must indicate at Draft creation that the SignatureRequest created from the Draft should be held. Releasing the SignatureRequest will send requests to all signers. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestReleaseHoldExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestReleaseHold( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestReleaseHold"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to release. | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestRemind + +> SignatureRequestGetResponse signatureRequestRemind(signatureRequestId, signatureRequestRemindRequest) + +Send Request Reminder + +Sends an email to the signer reminding them to sign the signature request. You cannot send a reminder within 1 hour of the last reminder that was sent. This includes manual AND automatic reminders. + +**NOTE:** This action can **not** be used with embedded signature requests. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemindExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestRemindRequest = new SignatureRequestRemindRequest(); + signatureRequestRemindRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestRemind( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestRemindRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemind"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to send a reminder for. | + **signatureRequestRemindRequest** | [**SignatureRequestRemindRequest**](SignatureRequestRemindRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestRemove + +> signatureRequestRemove(signatureRequestId) + +Remove Signature Request Access + +Removes your access to a completed signature request. This action is **not reversible**. + +The signature request must be fully executed by all parties (signed or declined to sign). Other parties will continue to maintain access to the completed signature request document(s). + +Unlike /signature_request/cancel, this endpoint is synchronous and your access will be immediately removed. Upon successful removal, this endpoint will return a 200 OK response. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestRemoveExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + + try + { + new SignatureRequestApi(config).signatureRequestRemove( + "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId + ); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestRemove"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to remove. | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestSend + +> SignatureRequestGetResponse signatureRequestSend(signatureRequestSendRequest) + +Send Signature Request + +Creates and sends a new SignatureRequest with the submitted documents. If `form_fields_per_document` is not specified, a signature page will be affixed where all signers will be required to add their signature, signifying their agreement to all contained documents. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers2 = new SubSignatureRequestSigner(); + signers2.name("Jill"); + signers2.emailAddress("jill@example.com"); + signers2.order(1); + + var signers = new ArrayList(List.of ( + signers1, + signers2 + )); + + var signatureRequestSendRequest = new SignatureRequestSendRequest(); + signatureRequestSendRequest.message("Please sign this NDA and then we can discuss more. Let me know if you\nhave any questions."); + signatureRequestSendRequest.subject("The NDA we talked about"); + signatureRequestSendRequest.testMode(true); + signatureRequestSendRequest.title("NDA with Acme Co."); + signatureRequestSendRequest.ccEmailAddresses(List.of ( + "lawyer1@dropboxsign.com", + "lawyer2@dropboxsign.com" + )); + signatureRequestSendRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + signatureRequestSendRequest.metadata(JSON.deserialize(""" + { + "custom_id": 1234, + "custom_text": "NDA #9" + } + """, Map.class)); + signatureRequestSendRequest.fieldOptions(fieldOptions); + signatureRequestSendRequest.signingOptions(signingOptions); + signatureRequestSendRequest.signers(signers); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSend( + signatureRequestSendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSend"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestSendRequest** | [**SignatureRequestSendRequest**](SignatureRequestSendRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestSendWithTemplate + +> SignatureRequestGetResponse signatureRequestSendWithTemplate(signatureRequestSendWithTemplateRequest) + +Send with Template + +Creates and sends a new SignatureRequest based off of the Template(s) specified with the `template_ids` parameter. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestSendWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signingOptions = new SubSigningOptions(); + signingOptions.defaultType(SubSigningOptions.DefaultTypeEnum.DRAW); + signingOptions.draw(true); + signingOptions.phone(false); + signingOptions.type(true); + signingOptions.upload(true); + + var signers1 = new SubSignatureRequestTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@example.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var customFields1 = new SubCustomField(); + customFields1.name("Cost"); + customFields1.editor("Client"); + customFields1.required(true); + customFields1.value("$20,000"); + + var customFields = new ArrayList(List.of ( + customFields1 + )); + + var signatureRequestSendWithTemplateRequest = new SignatureRequestSendWithTemplateRequest(); + signatureRequestSendWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + signatureRequestSendWithTemplateRequest.message("Glad we could come to an agreement."); + signatureRequestSendWithTemplateRequest.subject("Purchase Order"); + signatureRequestSendWithTemplateRequest.testMode(true); + signatureRequestSendWithTemplateRequest.signingOptions(signingOptions); + signatureRequestSendWithTemplateRequest.signers(signers); + signatureRequestSendWithTemplateRequest.ccs(ccs); + signatureRequestSendWithTemplateRequest.customFields(customFields); + + try + { + var response = new SignatureRequestApi(config).signatureRequestSendWithTemplate( + signatureRequestSendWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestSendWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestSendWithTemplateRequest** | [**SignatureRequestSendWithTemplateRequest**](SignatureRequestSendWithTemplateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## signatureRequestUpdate + +> SignatureRequestGetResponse signatureRequestUpdate(signatureRequestId, signatureRequestUpdateRequest) + +Update Signature Request + +Updates the email address and/or the name for a given signer on a signature request. You can listen for the `signature_request_email_bounce` event on your app or account to detect bounced emails, and respond with this method. + +Updating the email address of a signer will generate a new `signature_id` value. + +**NOTE:** This action cannot be performed on a signature request with an appended signature page. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class SignatureRequestUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signatureRequestUpdateRequest = new SignatureRequestUpdateRequest(); + signatureRequestUpdateRequest.signatureId("2f9781e1a8e2045224d808c153c2e1d3df6f8f2f"); + signatureRequestUpdateRequest.emailAddress("john@example.com"); + + try + { + var response = new SignatureRequestApi(config).signatureRequestUpdate( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + signatureRequestUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling SignatureRequestApi#signatureRequestUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The id of the SignatureRequest to update. | + **signatureRequestUpdateRequest** | [**SignatureRequestUpdateRequest**](SignatureRequestUpdateRequest.md)| | + +### Return type + +[**SignatureRequestGetResponse**](SignatureRequestGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..4243ead1c --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestBulkCreateEmbeddedWithTemplateRequest.md @@ -0,0 +1,26 @@ + + +# SignatureRequestBulkCreateEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signerFile` | ```File``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | +| `signerList` | [```List```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md new file mode 100644 index 000000000..1798f6fdc --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestBulkSendWithTemplateRequest.md @@ -0,0 +1,26 @@ + + +# SignatureRequestBulkSendWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signerFile` | ```File``` | `signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns:

- `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional)

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field" suffix will be treated as a custom field (optional)

You may only specify field values here, any other options should be set in the custom_fields request parameter.

Example CSV:

``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ``` | | +| `signerList` | [```List```](SubBulkSignerList.md) | `signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md new file mode 100644 index 000000000..383f8a8f3 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedRequest.md @@ -0,0 +1,37 @@ + + +# SignatureRequestCreateEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..050a7e631 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestCreateEmbeddedWithTemplateRequest.md @@ -0,0 +1,28 @@ + + +# SignatureRequestCreateEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md new file mode 100644 index 000000000..dd8b06061 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditEmbeddedRequest.md @@ -0,0 +1,37 @@ + + +# SignatureRequestEditEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..3cc3dee72 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditEmbeddedWithTemplateRequest.md @@ -0,0 +1,28 @@ + + +# SignatureRequestEditEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this embedded signature request. Used for security purposes. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditRequest.md b/sdks/java-v1/docs/SignatureRequestEditRequest.md new file mode 100644 index 000000000..7fa3aca65 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditRequest.md @@ -0,0 +1,38 @@ + + +# SignatureRequestEditRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md new file mode 100644 index 000000000..d079524b1 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestEditWithTemplateRequest.md @@ -0,0 +1,29 @@ + + +# SignatureRequestEditWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestGetResponse.md b/sdks/java-v1/docs/SignatureRequestGetResponse.md new file mode 100644 index 000000000..25ce665c4 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestGetResponse.md @@ -0,0 +1,15 @@ + + +# SignatureRequestGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signatureRequest`*_required_ | [```SignatureRequestResponse```](SignatureRequestResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestListResponse.md b/sdks/java-v1/docs/SignatureRequestListResponse.md new file mode 100644 index 000000000..6384d2ad0 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestListResponse.md @@ -0,0 +1,16 @@ + + +# SignatureRequestListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signatureRequests`*_required_ | [```List```](SignatureRequestResponse.md) | Contains information about signature requests. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestRemindRequest.md b/sdks/java-v1/docs/SignatureRequestRemindRequest.md new file mode 100644 index 000000000..bf76e08f4 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestRemindRequest.md @@ -0,0 +1,15 @@ + + +# SignatureRequestRemindRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress`*_required_ | ```String``` | The email address of the signer to send a reminder to. | | +| `name` | ```String``` | The name of the signer to send a reminder to. Include if two or more signers share an email address. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponse.md b/sdks/java-v1/docs/SignatureRequestResponse.md new file mode 100644 index 000000000..6e8d9645c --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponse.md @@ -0,0 +1,38 @@ + + +# SignatureRequestResponse + +Contains information about a signature request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `testMode` | ```Boolean``` | Whether this is a test signature request. Test requests have no legal value. Defaults to `false`. | | +| `signatureRequestId` | ```String``` | The id of the SignatureRequest. | | +| `requesterEmailAddress` | ```String``` | The email address of the initiator of the SignatureRequest. | | +| `title` | ```String``` | The title the specified Account uses for the SignatureRequest. | | +| `originalTitle` | ```String``` | Default Label for account. | | +| `subject` | ```String``` | The subject in the email that was initially sent to the signers. | | +| `message` | ```String``` | The custom message in the email that was initially sent to the signers. | | +| `metadata` | ```Map``` | The metadata attached to the signature request. | | +| `createdAt` | ```Integer``` | Time the signature request was created. | | +| `expiresAt` | ```Integer``` | The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | +| `isComplete` | ```Boolean``` | Whether or not the SignatureRequest has been fully executed by all signers. | | +| `isDeclined` | ```Boolean``` | Whether or not the SignatureRequest has been declined by a signer. | | +| `hasError` | ```Boolean``` | Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings). | | +| `filesUrl` | ```String``` | The URL where a copy of the request's documents can be downloaded. | | +| `signingUrl` | ```String``` | The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing. | | +| `detailsUrl` | ```String``` | The URL where the requester and the signers can view the current status of the SignatureRequest. | | +| `ccEmailAddresses` | ```List``` | A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed. | | +| `signingRedirectUrl` | ```String``` | The URL you want the signer redirected to after they successfully sign. | | +| `finalCopyUri` | ```String``` | The path where the completed document can be downloaded | | +| `templateIds` | ```List``` | Templates IDs used in this SignatureRequest (if any). | | +| `customFields` | [```List```](SignatureRequestResponseCustomFieldBase.md) | An array of Custom Field objects containing the name and type of each custom field.

* Text Field uses `SignatureRequestResponseCustomFieldText`
* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | +| `responseData` | [```List```](SignatureRequestResponseDataBase.md) | An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. | | +| `signatures` | [```List```](SignatureRequestResponseSignatures.md) | An array of signature objects, 1 for each signer. | | +| `bulkSendJobId` | ```String``` | The ID of the Bulk Send job which sent the signature request, if applicable. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseAttachment.md b/sdks/java-v1/docs/SignatureRequestResponseAttachment.md new file mode 100644 index 000000000..1ef3a209b --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseAttachment.md @@ -0,0 +1,19 @@ + + +# SignatureRequestResponseAttachment + +Signer attachments. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `id`*_required_ | ```String``` | The unique ID for this attachment. | | +| `signer`*_required_ | ```String``` | The Signer this attachment is assigned to. | | +| `name`*_required_ | ```String``` | The name of this attachment. | | +| `required`*_required_ | ```Boolean``` | A boolean value denoting if this attachment is required. | | +| `instructions` | ```String``` | Instructions for Signer. | | +| `uploadedAt` | ```Integer``` | Timestamp when attachment was uploaded by Signer. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md new file mode 100644 index 000000000..7b5f104c4 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldBase.md @@ -0,0 +1,21 @@ + + +# SignatureRequestResponseCustomFieldBase + +An array of Custom Field objects containing the name and type of each custom field. + +* Text Field uses `SignatureRequestResponseCustomFieldText` +* Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | +| `name`*_required_ | ```String``` | The name of the Custom Field. | | +| `required` | ```Boolean``` | A boolean value denoting if this field is required. | | +| `apiId` | ```String``` | The unique ID for this field. | | +| `editor` | ```String``` | The name of the Role that is able to edit this field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md new file mode 100644 index 000000000..c2cb8414b --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldCheckbox.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseCustomFieldCheckbox + +This class extends `SignatureRequestResponseCustomFieldBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | +| `value` | ```Boolean``` | A true/false for checkbox fields | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md new file mode 100644 index 000000000..23ceb565c --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldText.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseCustomFieldText + +This class extends `SignatureRequestResponseCustomFieldBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this Custom Field. Only 'text' and 'checkbox' are currently supported. | | +| `value` | ```String``` | A text string for text fields | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md new file mode 100644 index 000000000..099a8c07a --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseCustomFieldTypeEnum.md @@ -0,0 +1,13 @@ + + +# SignatureRequestResponseCustomFieldTypeEnum + +## Enum + + +* `TEXT` (value: `"text"`) + +* `CHECKBOX` (value: `"checkbox"`) + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataBase.md b/sdks/java-v1/docs/SignatureRequestResponseDataBase.md new file mode 100644 index 000000000..a9605a44a --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataBase.md @@ -0,0 +1,18 @@ + + +# SignatureRequestResponseDataBase + +An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `apiId` | ```String``` | The unique ID for this field. | | +| `signatureId` | ```String``` | The ID of the signature to which this response is linked. | | +| `name` | ```String``` | The name of the form field. | | +| `required` | ```Boolean``` | A boolean value denoting if this field is required. | | +| `type` | ```String``` | | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md b/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md new file mode 100644 index 000000000..76c8f14fd --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataTypeEnum.md @@ -0,0 +1,27 @@ + + +# SignatureRequestResponseDataTypeEnum + +## Enum + + +* `TEXT` (value: `"text"`) + +* `CHECKBOX` (value: `"checkbox"`) + +* `DATE_SIGNED` (value: `"date_signed"`) + +* `DROPDOWN` (value: `"dropdown"`) + +* `INITIALS` (value: `"initials"`) + +* `RADIO` (value: `"radio"`) + +* `SIGNATURE` (value: `"signature"`) + +* `TEXT_MERGE` (value: `"text-merge"`) + +* `CHECKBOX_MERGE` (value: `"checkbox-merge"`) + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md new file mode 100644 index 000000000..fda57045a --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckbox.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueCheckbox + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A yes/no checkbox | | +| `value` | ```Boolean``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md new file mode 100644 index 000000000..96af5ebaf --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueCheckboxMerge.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueCheckboxMerge + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A checkbox field that has default value set by the api | | +| `value` | ```String``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md new file mode 100644 index 000000000..308bd8bf2 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueDateSigned.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueDateSigned + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A date | | +| `value` | ```String``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md new file mode 100644 index 000000000..599cb3cef --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueDropdown.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueDropdown + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | An input field for dropdowns | | +| `value` | ```String``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md new file mode 100644 index 000000000..760618b49 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueInitials.md @@ -0,0 +1,16 @@ + + +# SignatureRequestResponseDataValueInitials + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | An input field for initials | | +| `value` | ```String``` | The value of the form field. | | +| `isSigned` | ```Boolean``` | This field contains the boolean true if the field is signed. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md new file mode 100644 index 000000000..b8e073f1f --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueRadio.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueRadio + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | An input field for radios | | +| `value` | ```Boolean``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md new file mode 100644 index 000000000..8cea5ac2e --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueSignature.md @@ -0,0 +1,16 @@ + + +# SignatureRequestResponseDataValueSignature + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A signature input field | | +| `value` | ```String``` | The value of the form field. | | +| `isSigned` | ```Boolean``` | This field contains the boolean true if the field is signed. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md new file mode 100644 index 000000000..e08ec8ff8 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueText.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueText + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A text input field | | +| `value` | ```String``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md b/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md new file mode 100644 index 000000000..2b5e0d3fe --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseDataValueTextMerge.md @@ -0,0 +1,15 @@ + + +# SignatureRequestResponseDataValueTextMerge + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type` | ```String``` | A text field that has default text set by the api | | +| `value` | ```String``` | The value of the form field. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestResponseSignatures.md b/sdks/java-v1/docs/SignatureRequestResponseSignatures.md new file mode 100644 index 000000000..2f0e16dc0 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestResponseSignatures.md @@ -0,0 +1,32 @@ + + +# SignatureRequestResponseSignatures + +An array of signature objects, 1 for each signer. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signatureId` | ```String``` | Signature identifier. | | +| `signerGroupGuid` | ```String``` | Signer Group GUID | | +| `signerEmailAddress` | ```String``` | The email address of the signer. | | +| `signerName` | ```String``` | The name of the signer. | | +| `signerRole` | ```String``` | The role of the signer. | | +| `order` | ```Integer``` | If signer order is assigned this is the 0-based index for this signer. | | +| `statusCode` | ```String``` | The current status of the signature. eg: awaiting_signature, signed, declined. | | +| `declineReason` | ```String``` | The reason provided by the signer for declining the request. | | +| `signedAt` | ```Integer``` | Time that the document was signed or null. | | +| `lastViewedAt` | ```Integer``` | The time that the document was last viewed by this signer or null. | | +| `lastRemindedAt` | ```Integer``` | The time the last reminder email was sent to the signer or null. | | +| `hasPin` | ```Boolean``` | Boolean to indicate whether this signature requires a PIN to access. | | +| `hasSmsAuth` | ```Boolean``` | Boolean to indicate whether this signature has SMS authentication enabled. | | +| `hasSmsDelivery` | ```Boolean``` | Boolean to indicate whether this signature has SMS delivery enabled. | | +| `smsPhoneNumber` | ```String``` | The SMS phone number used for authentication or signature request delivery. | | +| `reassignedBy` | ```String``` | Email address of original signer who reassigned to this signer. | | +| `reassignmentReason` | ```String``` | Reason provided by original signer who reassigned to this signer. | | +| `reassignedFrom` | ```String``` | Previous signature identifier. | | +| `error` | ```String``` | Error message pertaining to this signer, or null. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestSendRequest.md b/sdks/java-v1/docs/SignatureRequestSendRequest.md new file mode 100644 index 000000000..914303935 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestSendRequest.md @@ -0,0 +1,39 @@ + + +# SignatureRequestSendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `signers` | [```List```](SubSignatureRequestSigner.md) | Add Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `groupedSigners` | [```List```](SubSignatureRequestGroupedSigners.md) | Add Grouped Signers to your Signature Request.

This endpoint requires either **signers** or **grouped_signers**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `clientId` | ```String``` | The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Enables automatic Text Tag removal when set to true.

**NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information. | | +| `isQualifiedSignature` | ```Boolean``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `useTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md b/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md new file mode 100644 index 000000000..7a8d8c88a --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestSendWithTemplateRequest.md @@ -0,0 +1,30 @@ + + +# SignatureRequestSendWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used. | | +| `signers`*_required_ | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `clientId` | ```String``` | Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `isQualifiedSignature` | ```Boolean``` | Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.<br>
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `isEid` | ```Boolean``` | Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.<br>
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | + + + diff --git a/sdks/java-v1/docs/SignatureRequestUpdateRequest.md b/sdks/java-v1/docs/SignatureRequestUpdateRequest.md new file mode 100644 index 000000000..4b38c53e7 --- /dev/null +++ b/sdks/java-v1/docs/SignatureRequestUpdateRequest.md @@ -0,0 +1,17 @@ + + +# SignatureRequestUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signatureId`*_required_ | ```String``` | The signature ID for the recipient. | | +| `emailAddress` | ```String``` | The new email address for the recipient.

This will generate a new `signature_id` value.

**NOTE:** Optional if `name` is provided. | | +| `name` | ```String``` | The new name for the recipient.

**NOTE:** Optional if `email_address` is provided. | | +| `expiresAt` | ```Integer``` | The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. | | + + + diff --git a/sdks/java-v1/docs/SubAttachment.md b/sdks/java-v1/docs/SubAttachment.md new file mode 100644 index 000000000..b5e9c80fd --- /dev/null +++ b/sdks/java-v1/docs/SubAttachment.md @@ -0,0 +1,17 @@ + + +# SubAttachment + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name`*_required_ | ```String``` | The name of attachment. | | +| `signerIndex`*_required_ | ```Integer``` | The signer's index in the `signers` parameter (0-based indexing).

**NOTE:** Only one signer can be assigned per attachment. | | +| `instructions` | ```String``` | The instructions for uploading the attachment. | | +| `required` | ```Boolean``` | Determines if the attachment must be uploaded. | | + + + diff --git a/sdks/java-v1/docs/SubBulkSignerList.md b/sdks/java-v1/docs/SubBulkSignerList.md new file mode 100644 index 000000000..918c935b1 --- /dev/null +++ b/sdks/java-v1/docs/SubBulkSignerList.md @@ -0,0 +1,15 @@ + + +# SubBulkSignerList + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `customFields` | [```List```](SubBulkSignerListCustomField.md) | An array of custom field values. | | +| `signers` | [```List```](SubSignatureRequestTemplateSigner.md) | Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document.

Currently only templates with a single role are supported. All signers must have the same `role` value. | | + + + diff --git a/sdks/java-v1/docs/SubBulkSignerListCustomField.md b/sdks/java-v1/docs/SubBulkSignerListCustomField.md new file mode 100644 index 000000000..b37ad53bc --- /dev/null +++ b/sdks/java-v1/docs/SubBulkSignerListCustomField.md @@ -0,0 +1,15 @@ + + +# SubBulkSignerListCustomField + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name`*_required_ | ```String``` | The name of the custom field. Must be the field's `name` or `api_id`. | | +| `value`*_required_ | ```String``` | The value of the custom field. | | + + + diff --git a/sdks/java-v1/docs/SubCC.md b/sdks/java-v1/docs/SubCC.md new file mode 100644 index 000000000..37eacd3b8 --- /dev/null +++ b/sdks/java-v1/docs/SubCC.md @@ -0,0 +1,15 @@ + + +# SubCC + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `role`*_required_ | ```String``` | Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role. | | +| `emailAddress`*_required_ | ```String``` | The email address of the CC recipient. | | + + + diff --git a/sdks/java-v1/docs/SubCustomField.md b/sdks/java-v1/docs/SubCustomField.md new file mode 100644 index 000000000..a309fd6e0 --- /dev/null +++ b/sdks/java-v1/docs/SubCustomField.md @@ -0,0 +1,21 @@ + + +# SubCustomField + +When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. + +Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. + +For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name`*_required_ | ```String``` | The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing. | | +| `editor` | ```String``` | Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`.

**NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable. | | +| `required` | ```Boolean``` | Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`. | | +| `value` | ```String``` | The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing. | | + + + diff --git a/sdks/java-v1/docs/SubEditorOptions.md b/sdks/java-v1/docs/SubEditorOptions.md new file mode 100644 index 000000000..5483d255f --- /dev/null +++ b/sdks/java-v1/docs/SubEditorOptions.md @@ -0,0 +1,15 @@ + + +# SubEditorOptions + +This allows the requester to specify editor options when a preparing a document + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `allowEditSigners` | ```Boolean``` | Allows requesters to edit the list of signers | | +| `allowEditDocuments` | ```Boolean``` | Allows requesters to edit documents, including delete and add | | + + + diff --git a/sdks/java-v1/docs/SubFieldOptions.md b/sdks/java-v1/docs/SubFieldOptions.md new file mode 100644 index 000000000..e1be7690d --- /dev/null +++ b/sdks/java-v1/docs/SubFieldOptions.md @@ -0,0 +1,27 @@ + + +# SubFieldOptions + +This allows the requester to specify field options for a signature request. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `dateFormat`*_required_ | [```DateFormatEnum```](#DateFormatEnum) | Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats))

**NOTE:** Only available for Premium and higher. | | + + + +## Enum: DateFormatEnum + +| Name | Value | +---- | ----- +| MMDDYYYY | "MM / DD / YYYY" | +| MM_DD_YYYY | "MM - DD - YYYY" | +| DDMMYYYY | "DD / MM / YYYY" | +| DD_MM_YYYY | "DD - MM - YYYY" | +| YYYYMMDD | "YYYY / MM / DD" | +| YYYY_MM_DD | "YYYY - MM - DD" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldGroup.md b/sdks/java-v1/docs/SubFormFieldGroup.md new file mode 100644 index 000000000..c55ffa355 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldGroup.md @@ -0,0 +1,16 @@ + + +# SubFormFieldGroup + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `groupId`*_required_ | ```String``` | ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`. | | +| `groupLabel`*_required_ | ```String``` | Name of the group | | +| `requirement`*_required_ | ```String``` | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldRule.md b/sdks/java-v1/docs/SubFormFieldRule.md new file mode 100644 index 000000000..ca44afdb6 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldRule.md @@ -0,0 +1,17 @@ + + +# SubFormFieldRule + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `id`*_required_ | ```String``` | Must be unique across all defined rules. | | +| `triggerOperator`*_required_ | ```String``` | Currently only `AND` is supported. Support for `OR` is being worked on. | | +| `triggers`*_required_ | [```List```](SubFormFieldRuleTrigger.md) | An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed. | | +| `actions`*_required_ | [```List```](SubFormFieldRuleAction.md) | An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldRuleAction.md b/sdks/java-v1/docs/SubFormFieldRuleAction.md new file mode 100644 index 000000000..16928736e --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldRuleAction.md @@ -0,0 +1,26 @@ + + +# SubFormFieldRuleAction + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `hidden`*_required_ | ```Boolean``` | `true` to hide the target field when rule is satisfied, otherwise `false`. | | +| `type`*_required_ | [```TypeEnum```](#TypeEnum) | | | +| `fieldId` | ```String``` | **field_id** or **group_id** is required, but not both.

Must reference the `api_id` of an existing field defined within `form_fields_per_document`.

Cannot use with `group_id`. Trigger and action fields must belong to the same signer. | | +| `groupId` | ```String``` | **group_id** or **field_id** is required, but not both.

Must reference the ID of an existing group defined within `form_field_groups`.

Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer. | | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| CHANGE_FIELD_VISIBILITY | "change-field-visibility" | +| CHANGE_GROUP_VISIBILITY | "change-group-visibility" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldRuleTrigger.md b/sdks/java-v1/docs/SubFormFieldRuleTrigger.md new file mode 100644 index 000000000..3a82561bd --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldRuleTrigger.md @@ -0,0 +1,29 @@ + + +# SubFormFieldRuleTrigger + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `id`*_required_ | ```String``` | Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer. | | +| `operator`*_required_ | [```OperatorEnum```](#OperatorEnum) | Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value | | +| `value` | ```String``` | **value** or **values** is required, but not both.

The value to match against **operator**.

- When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match`

Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1` | | +| `values` | ```List``` | **values** or **value** is required, but not both.

The values to match against **operator** when it is one of the following:

- `any` - `none` | | + + + +## Enum: OperatorEnum + +| Name | Value | +---- | ----- +| ANY | "any" | +| IS | "is" | +| MATCH | "match" | +| NONE | "none" | +| NOT | "not" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md new file mode 100644 index 000000000..a44994a32 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentBase.md @@ -0,0 +1,37 @@ + + +# SubFormFieldsPerDocumentBase + +The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) + +**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. + +* Text Field use `SubFormFieldsPerDocumentText` +* Dropdown Field use `SubFormFieldsPerDocumentDropdown` +* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` +* Checkbox Field use `SubFormFieldsPerDocumentCheckbox` +* Radio Field use `SubFormFieldsPerDocumentRadio` +* Signature Field use `SubFormFieldsPerDocumentSignature` +* Date Signed Field use `SubFormFieldsPerDocumentDateSigned` +* Initials Field use `SubFormFieldsPerDocumentInitials` +* Text Merge Field use `SubFormFieldsPerDocumentTextMerge` +* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `documentIndex`*_required_ | ```Integer``` | Represents the integer index of the `file` or `file_url` document the field should be attached to. | | +| `apiId`*_required_ | ```String``` | An identifier for the field that is unique across all documents in the request. | | +| `height`*_required_ | ```Integer``` | Size of the field in pixels. | | +| `required`*_required_ | ```Boolean``` | Whether this field is required. | | +| `signer`*_required_ | ```String``` | Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field.

**NOTE:** To set the value of the field as the preparer you must set this to `me_now`

**NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data. | | +| `type`*_required_ | ```String``` | | | +| `width`*_required_ | ```Integer``` | Size of the field in pixels. | | +| `x`*_required_ | ```Integer``` | Location coordinates of the field in pixels. | | +| `y`*_required_ | ```Integer``` | Location coordinates of the field in pixels. | | +| `name` | ```String``` | Display name for the field. | | +| `page` | ```Integer``` | Page in the document where the field should be placed (requires documents be PDF files).

- When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md new file mode 100644 index 000000000..c4e473f3f --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckbox.md @@ -0,0 +1,16 @@ + + +# SubFormFieldsPerDocumentCheckbox + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class. | | +| `isChecked`*_required_ | ```Boolean``` | `true` for checking the checkbox field by default, otherwise `false`. | | +| `group` | ```String``` | String referencing group defined in `form_field_groups` parameter. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md new file mode 100644 index 000000000..824359645 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentCheckboxMerge.md @@ -0,0 +1,14 @@ + + +# SubFormFieldsPerDocumentCheckboxMerge + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md new file mode 100644 index 000000000..bffc1a4b5 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentDateSigned.md @@ -0,0 +1,39 @@ + + +# SubFormFieldsPerDocumentDateSigned + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A date. Use the `SubFormFieldsPerDocumentDateSigned` class. | | +| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | +| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | + + + +## Enum: FontFamilyEnum + +| Name | Value | +---- | ----- +| HELVETICA | "helvetica" | +| ARIAL | "arial" | +| COURIER | "courier" | +| CALIBRI | "calibri" | +| CAMBRIA | "cambria" | +| GEORGIA | "georgia" | +| TIMES | "times" | +| TREBUCHET | "trebuchet" | +| VERDANA | "verdana" | +| ROBOTO | "roboto" | +| ROBOTO_MONO | "robotoMono" | +| NOTO_SANS | "notoSans" | +| NOTO_SERIF | "notoSerif" | +| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | +| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | +| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md new file mode 100644 index 000000000..ca470eaa4 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentDropdown.md @@ -0,0 +1,41 @@ + + +# SubFormFieldsPerDocumentDropdown + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class. | | +| `options`*_required_ | ```List``` | Array of string values representing dropdown values. | | +| `content` | ```String``` | Selected value in `options` array. Value must exist in array. | | +| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | +| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | + + + +## Enum: FontFamilyEnum + +| Name | Value | +---- | ----- +| HELVETICA | "helvetica" | +| ARIAL | "arial" | +| COURIER | "courier" | +| CALIBRI | "calibri" | +| CAMBRIA | "cambria" | +| GEORGIA | "georgia" | +| TIMES | "times" | +| TREBUCHET | "trebuchet" | +| VERDANA | "verdana" | +| ROBOTO | "roboto" | +| ROBOTO_MONO | "robotoMono" | +| NOTO_SANS | "notoSans" | +| NOTO_SERIF | "notoSerif" | +| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | +| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | +| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md new file mode 100644 index 000000000..b7582a236 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentFontEnum.md @@ -0,0 +1,41 @@ + + +# SubFormFieldsPerDocumentFontEnum + +## Enum + + +* `HELVETICA` (value: `"helvetica"`) + +* `ARIAL` (value: `"arial"`) + +* `COURIER` (value: `"courier"`) + +* `CALIBRI` (value: `"calibri"`) + +* `CAMBRIA` (value: `"cambria"`) + +* `GEORGIA` (value: `"georgia"`) + +* `TIMES` (value: `"times"`) + +* `TREBUCHET` (value: `"trebuchet"`) + +* `VERDANA` (value: `"verdana"`) + +* `ROBOTO` (value: `"roboto"`) + +* `ROBOTO_MONO` (value: `"robotoMono"`) + +* `NOTO_SANS` (value: `"notoSans"`) + +* `NOTO_SERIF` (value: `"notoSerif"`) + +* `NOTO_CJK_JP_REGULAR` (value: `"notoCJK-JP-Regular"`) + +* `NOTO_HEBREW_REGULAR` (value: `"notoHebrew-Regular"`) + +* `NOTO_SAN_THAI_MERGED` (value: `"notoSanThaiMerged"`) + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md new file mode 100644 index 000000000..543312b59 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentHyperlink.md @@ -0,0 +1,41 @@ + + +# SubFormFieldsPerDocumentHyperlink + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class. | | +| `content`*_required_ | ```String``` | Link Text. | | +| `contentUrl`*_required_ | ```String``` | Link URL. | | +| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | +| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | + + + +## Enum: FontFamilyEnum + +| Name | Value | +---- | ----- +| HELVETICA | "helvetica" | +| ARIAL | "arial" | +| COURIER | "courier" | +| CALIBRI | "calibri" | +| CAMBRIA | "cambria" | +| GEORGIA | "georgia" | +| TIMES | "times" | +| TREBUCHET | "trebuchet" | +| VERDANA | "verdana" | +| ROBOTO | "roboto" | +| ROBOTO_MONO | "robotoMono" | +| NOTO_SANS | "notoSans" | +| NOTO_SERIF | "notoSerif" | +| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | +| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | +| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md new file mode 100644 index 000000000..c3537c2d1 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentInitials.md @@ -0,0 +1,14 @@ + + +# SubFormFieldsPerDocumentInitials + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md new file mode 100644 index 000000000..c19487677 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentRadio.md @@ -0,0 +1,16 @@ + + +# SubFormFieldsPerDocumentRadio + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class. | | +| `group`*_required_ | ```String``` | String referencing group defined in `form_field_groups` parameter. | | +| `isChecked`*_required_ | ```Boolean``` | `true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md new file mode 100644 index 000000000..187b14538 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentSignature.md @@ -0,0 +1,14 @@ + + +# SubFormFieldsPerDocumentSignature + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A signature input field. Use the `SubFormFieldsPerDocumentSignature` class. | | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md new file mode 100644 index 000000000..d431f5422 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentText.md @@ -0,0 +1,64 @@ + + +# SubFormFieldsPerDocumentText + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A text input field. Use the `SubFormFieldsPerDocumentText` class. | | +| `placeholder` | ```String``` | Placeholder value for text field. | | +| `autoFillType` | ```String``` | Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values. | | +| `linkId` | ```String``` | Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields. | | +| `masked` | ```Boolean``` | Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`. | | +| `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.

**NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value. | | +| `validationCustomRegex` | ```String``` | | | +| `validationCustomRegexFormatLabel` | ```String``` | | | +| `content` | ```String``` | Content of a `me_now` text field | | +| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | +| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | + + + +## Enum: ValidationTypeEnum + +| Name | Value | +---- | ----- +| NUMBERS_ONLY | "numbers_only" | +| LETTERS_ONLY | "letters_only" | +| PHONE_NUMBER | "phone_number" | +| BANK_ROUTING_NUMBER | "bank_routing_number" | +| BANK_ACCOUNT_NUMBER | "bank_account_number" | +| EMAIL_ADDRESS | "email_address" | +| ZIP_CODE | "zip_code" | +| SOCIAL_SECURITY_NUMBER | "social_security_number" | +| EMPLOYER_IDENTIFICATION_NUMBER | "employer_identification_number" | +| CUSTOM_REGEX | "custom_regex" | + + + +## Enum: FontFamilyEnum + +| Name | Value | +---- | ----- +| HELVETICA | "helvetica" | +| ARIAL | "arial" | +| COURIER | "courier" | +| CALIBRI | "calibri" | +| CAMBRIA | "cambria" | +| GEORGIA | "georgia" | +| TIMES | "times" | +| TREBUCHET | "trebuchet" | +| VERDANA | "verdana" | +| ROBOTO | "roboto" | +| ROBOTO_MONO | "robotoMono" | +| NOTO_SANS | "notoSans" | +| NOTO_SERIF | "notoSerif" | +| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | +| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | +| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md new file mode 100644 index 000000000..e1876cce1 --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentTextMerge.md @@ -0,0 +1,39 @@ + + +# SubFormFieldsPerDocumentTextMerge + +This class extends `SubFormFieldsPerDocumentBase`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class. | | +| `fontFamily` | [```FontFamilyEnum```](#FontFamilyEnum) | Font family for the field. | | +| `fontSize` | ```Integer``` | The initial px font size for the field contents. Can be any integer value between `7` and `49`.

**NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field. | | + + + +## Enum: FontFamilyEnum + +| Name | Value | +---- | ----- +| HELVETICA | "helvetica" | +| ARIAL | "arial" | +| COURIER | "courier" | +| CALIBRI | "calibri" | +| CAMBRIA | "cambria" | +| GEORGIA | "georgia" | +| TIMES | "times" | +| TREBUCHET | "trebuchet" | +| VERDANA | "verdana" | +| ROBOTO | "roboto" | +| ROBOTO_MONO | "robotoMono" | +| NOTO_SANS | "notoSans" | +| NOTO_SERIF | "notoSerif" | +| NOTO_CJK_JP_REGULAR | "notoCJK-JP-Regular" | +| NOTO_HEBREW_REGULAR | "notoHebrew-Regular" | +| NOTO_SAN_THAI_MERGED | "notoSanThaiMerged" | + + + diff --git a/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md b/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md new file mode 100644 index 000000000..20258832e --- /dev/null +++ b/sdks/java-v1/docs/SubFormFieldsPerDocumentTypeEnum.md @@ -0,0 +1,29 @@ + + +# SubFormFieldsPerDocumentTypeEnum + +## Enum + + +* `CHECKBOX` (value: `"checkbox"`) + +* `CHECKBOX_MERGE` (value: `"checkbox-merge"`) + +* `DATE_SIGNED` (value: `"date_signed"`) + +* `DROPDOWN` (value: `"dropdown"`) + +* `HYPERLINK` (value: `"hyperlink"`) + +* `INITIALS` (value: `"initials"`) + +* `SIGNATURE` (value: `"signature"`) + +* `RADIO` (value: `"radio"`) + +* `TEXT` (value: `"text"`) + +* `TEXT_MERGE` (value: `"text-merge"`) + + + diff --git a/sdks/java-v1/docs/SubMergeField.md b/sdks/java-v1/docs/SubMergeField.md new file mode 100644 index 000000000..66582350e --- /dev/null +++ b/sdks/java-v1/docs/SubMergeField.md @@ -0,0 +1,24 @@ + + +# SubMergeField + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name`*_required_ | ```String``` | The name of the merge field. Must be unique. | | +| `type`*_required_ | [```TypeEnum```](#TypeEnum) | The type of merge field. | | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| TEXT | "text" | +| CHECKBOX | "checkbox" | + + + diff --git a/sdks/java-v1/docs/SubOAuth.md b/sdks/java-v1/docs/SubOAuth.md new file mode 100644 index 000000000..527d0be78 --- /dev/null +++ b/sdks/java-v1/docs/SubOAuth.md @@ -0,0 +1,30 @@ + + +# SubOAuth + +OAuth related parameters. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `callbackUrl` | ```String``` | The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided) | | +| `scopes` | [```List<ScopesEnum>```](#List<ScopesEnum>) | A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided). | | + + + +## Enum: List<ScopesEnum> + +| Name | Value | +---- | ----- +| REQUEST_SIGNATURE | "request_signature" | +| BASIC_ACCOUNT_INFO | "basic_account_info" | +| ACCOUNT_ACCESS | "account_access" | +| SIGNATURE_REQUEST_ACCESS | "signature_request_access" | +| TEMPLATE_ACCESS | "template_access" | +| TEAM_ACCESS | "team_access" | +| API_APP_ACCESS | "api_app_access" | +| EMPTY | "" | + + + diff --git a/sdks/java-v1/docs/SubOptions.md b/sdks/java-v1/docs/SubOptions.md new file mode 100644 index 000000000..c36523a02 --- /dev/null +++ b/sdks/java-v1/docs/SubOptions.md @@ -0,0 +1,14 @@ + + +# SubOptions + +Additional options supported by API App. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `canInsertEverywhere` | ```Boolean``` | Determines if signers can use "Insert Everywhere" when signing a document. | | + + + diff --git a/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md b/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md new file mode 100644 index 000000000..80ace3400 --- /dev/null +++ b/sdks/java-v1/docs/SubSignatureRequestGroupedSigners.md @@ -0,0 +1,16 @@ + + +# SubSignatureRequestGroupedSigners + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `group`*_required_ | ```String``` | The name of the group. | | +| `signers`*_required_ | [```List```](SubSignatureRequestSigner.md) | Signers belonging to this Group.

**NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below. | | +| `order` | ```Integer``` | The order the group is required to sign in. Use this instead of Signer-level `order`. | | + + + diff --git a/sdks/java-v1/docs/SubSignatureRequestSigner.md b/sdks/java-v1/docs/SubSignatureRequestSigner.md new file mode 100644 index 000000000..109c422bc --- /dev/null +++ b/sdks/java-v1/docs/SubSignatureRequestSigner.md @@ -0,0 +1,28 @@ + + +# SubSignatureRequestSigner + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name`*_required_ | ```String``` | The name of the signer. | | +| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | +| `order` | ```Integer``` | The order the signer is required to sign in. | | +| `pin` | ```String``` | The 4- to 12-character access code that will secure this signer's signature page. | | +| `smsPhoneNumber` | ```String``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | | +| `smsPhoneNumberType` | [```SmsPhoneNumberTypeEnum```](#SmsPhoneNumberTypeEnum) | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | + + + +## Enum: SmsPhoneNumberTypeEnum + +| Name | Value | +---- | ----- +| AUTHENTICATION | "authentication" | +| DELIVERY | "delivery" | + + + diff --git a/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md b/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md new file mode 100644 index 000000000..866b37355 --- /dev/null +++ b/sdks/java-v1/docs/SubSignatureRequestTemplateSigner.md @@ -0,0 +1,28 @@ + + +# SubSignatureRequestTemplateSigner + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `role`*_required_ | ```String``` | Must match an existing role in chosen Template(s). It's case-sensitive. | | +| `name`*_required_ | ```String``` | The name of the signer. | | +| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | +| `pin` | ```String``` | The 4- to 12-character access code that will secure this signer's signature page. | | +| `smsPhoneNumber` | ```String``` | An E.164 formatted phone number.

By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on).

**NOTE:** Not available in test mode and requires a Standard plan or higher. | | +| `smsPhoneNumberType` | [```SmsPhoneNumberTypeEnum```](#SmsPhoneNumberTypeEnum) | Specifies the feature used with the `sms_phone_number`. Default `authentication`.

If `authentication`, signer is sent a verification code via SMS that is required to access the document.

If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email). | | + + + +## Enum: SmsPhoneNumberTypeEnum + +| Name | Value | +---- | ----- +| AUTHENTICATION | "authentication" | +| DELIVERY | "delivery" | + + + diff --git a/sdks/java-v1/docs/SubSigningOptions.md b/sdks/java-v1/docs/SubSigningOptions.md new file mode 100644 index 000000000..bca116053 --- /dev/null +++ b/sdks/java-v1/docs/SubSigningOptions.md @@ -0,0 +1,31 @@ + + +# SubSigningOptions + +This allows the requester to specify the types allowed for creating a signature. + +**NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `defaultType`*_required_ | [```DefaultTypeEnum```](#DefaultTypeEnum) | The default type shown (limited to the listed types) | | +| `draw` | ```Boolean``` | Allows drawing the signature | | +| `phone` | ```Boolean``` | Allows using a smartphone to email the signature | | +| `type` | ```Boolean``` | Allows typing the signature | | +| `upload` | ```Boolean``` | Allows uploading the signature | | + + + +## Enum: DefaultTypeEnum + +| Name | Value | +---- | ----- +| DRAW | "draw" | +| PHONE | "phone" | +| TYPE | "type" | +| UPLOAD | "upload" | + + + diff --git a/sdks/java-v1/docs/SubTeamResponse.md b/sdks/java-v1/docs/SubTeamResponse.md new file mode 100644 index 000000000..df784d080 --- /dev/null +++ b/sdks/java-v1/docs/SubTeamResponse.md @@ -0,0 +1,15 @@ + + +# SubTeamResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamId` | ```String``` | The id of a team | | +| `name` | ```String``` | The name of a team | | + + + diff --git a/sdks/java-v1/docs/SubTemplateRole.md b/sdks/java-v1/docs/SubTemplateRole.md new file mode 100644 index 000000000..a1ee8e0ea --- /dev/null +++ b/sdks/java-v1/docs/SubTemplateRole.md @@ -0,0 +1,15 @@ + + +# SubTemplateRole + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The role name of the signer that will be displayed when the template is used to create a signature request. | | +| `order` | ```Integer``` | The order in which this signer role is required to sign. | | + + + diff --git a/sdks/java-v1/docs/SubUnclaimedDraftSigner.md b/sdks/java-v1/docs/SubUnclaimedDraftSigner.md new file mode 100644 index 000000000..fec680ac2 --- /dev/null +++ b/sdks/java-v1/docs/SubUnclaimedDraftSigner.md @@ -0,0 +1,16 @@ + + +# SubUnclaimedDraftSigner + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress`*_required_ | ```String``` | The email address of the signer. | | +| `name`*_required_ | ```String``` | The name of the signer. | | +| `order` | ```Integer``` | The order the signer is required to sign in. | | + + + diff --git a/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md b/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md new file mode 100644 index 000000000..1c6547670 --- /dev/null +++ b/sdks/java-v1/docs/SubUnclaimedDraftTemplateSigner.md @@ -0,0 +1,16 @@ + + +# SubUnclaimedDraftTemplateSigner + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `role`*_required_ | ```String``` | Must match an existing role in chosen Template(s). | | +| `name`*_required_ | ```String``` | The name of the signer filling the role of `role`. | | +| `emailAddress`*_required_ | ```String``` | The email address of the signer filling the role of `role`. | | + + + diff --git a/sdks/java-v1/docs/SubWhiteLabelingOptions.md b/sdks/java-v1/docs/SubWhiteLabelingOptions.md new file mode 100644 index 000000000..0a5880da3 --- /dev/null +++ b/sdks/java-v1/docs/SubWhiteLabelingOptions.md @@ -0,0 +1,39 @@ + + +# SubWhiteLabelingOptions + +An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) + +Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `headerBackgroundColor` | ```String``` | | | +| `legalVersion` | [```LegalVersionEnum```](#LegalVersionEnum) | | | +| `linkColor` | ```String``` | | | +| `pageBackgroundColor` | ```String``` | | | +| `primaryButtonColor` | ```String``` | | | +| `primaryButtonColorHover` | ```String``` | | | +| `primaryButtonTextColor` | ```String``` | | | +| `primaryButtonTextColorHover` | ```String``` | | | +| `secondaryButtonColor` | ```String``` | | | +| `secondaryButtonColorHover` | ```String``` | | | +| `secondaryButtonTextColor` | ```String``` | | | +| `secondaryButtonTextColorHover` | ```String``` | | | +| `textColor1` | ```String``` | | | +| `textColor2` | ```String``` | | | +| `resetToDefault` | ```Boolean``` | Resets white labeling options to defaults. Only useful when updating an API App. | | + + + +## Enum: LegalVersionEnum + +| Name | Value | +---- | ----- +| TERMS1 | "terms1" | +| TERMS2 | "terms2" | + + + diff --git a/sdks/java-v1/docs/TeamAddMemberRequest.md b/sdks/java-v1/docs/TeamAddMemberRequest.md new file mode 100644 index 000000000..122e45b31 --- /dev/null +++ b/sdks/java-v1/docs/TeamAddMemberRequest.md @@ -0,0 +1,27 @@ + + +# TeamAddMemberRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | `account_id` or `email_address` is required. If both are provided, the account id prevails.

Account id of the user to invite to your Team. | | +| `emailAddress` | ```String``` | `account_id` or `email_address` is required, If both are provided, the account id prevails.

Email address of the user to invite to your Team. | | +| `role` | [```RoleEnum```](#RoleEnum) | A role member will take in a new Team.

**NOTE:** This parameter is used only if `team_id` is provided. | | + + + +## Enum: RoleEnum + +| Name | Value | +---- | ----- +| MEMBER | "Member" | +| DEVELOPER | "Developer" | +| TEAM_MANAGER | "Team Manager" | +| ADMIN | "Admin" | + + + diff --git a/sdks/java-v1/docs/TeamApi.md b/sdks/java-v1/docs/TeamApi.md new file mode 100644 index 000000000..3e57e0451 --- /dev/null +++ b/sdks/java-v1/docs/TeamApi.md @@ -0,0 +1,837 @@ +# TeamApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**teamAddMember**](TeamApi.md#teamAddMember) | **PUT** /team/add_member | Add User to Team +[**teamCreate**](TeamApi.md#teamCreate) | **POST** /team/create | Create Team +[**teamDelete**](TeamApi.md#teamDelete) | **DELETE** /team/destroy | Delete Team +[**teamGet**](TeamApi.md#teamGet) | **GET** /team | Get Team +[**teamInfo**](TeamApi.md#teamInfo) | **GET** /team/info | Get Team Info +[**teamInvites**](TeamApi.md#teamInvites) | **GET** /team/invites | List Team Invites +[**teamMembers**](TeamApi.md#teamMembers) | **GET** /team/members/{team_id} | List Team Members +[**teamRemoveMember**](TeamApi.md#teamRemoveMember) | **POST** /team/remove_member | Remove User from Team +[**teamSubTeams**](TeamApi.md#teamSubTeams) | **GET** /team/sub_teams/{team_id} | List Sub Teams +[**teamUpdate**](TeamApi.md#teamUpdate) | **PUT** /team | Update Team + + + +## teamAddMember + +> TeamGetResponse teamAddMember(teamAddMemberRequest, teamId) + +Add User to Team + +Invites a user (specified using the `email_address` parameter) to your Team. If the user does not currently have a Dropbox Sign Account, a new one will be created for them. If a user is already a part of another Team, a `team_invite_failed` error will be returned. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamAddMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var teamAddMemberRequest = new TeamAddMemberRequest(); + teamAddMemberRequest.emailAddress("george@example.com"); + + try + { + var response = new TeamApi(config).teamAddMember( + teamAddMemberRequest, + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamAddMember"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamAddMemberRequest** | [**TeamAddMemberRequest**](TeamAddMemberRequest.md)| | + **teamId** | **String**| The id of the team. | [optional] + +### Return type + +[**TeamGetResponse**](TeamGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamCreate + +> TeamGetResponse teamCreate(teamCreateRequest) + +Create Team + +Creates a new Team and makes you a member. You must not currently belong to a Team to invoke. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var teamCreateRequest = new TeamCreateRequest(); + teamCreateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamCreate( + teamCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamCreateRequest** | [**TeamCreateRequest**](TeamCreateRequest.md)| | + +### Return type + +[**TeamGetResponse**](TeamGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamDelete + +> teamDelete() + +Delete Team + +Deletes your Team. Can only be invoked when you have a Team with only one member (yourself). + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + new TeamApi(config).teamDelete(); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamDelete"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamGet + +> TeamGetResponse teamGet() + +Get Team + +Returns information about your Team as well as a list of its members. If you do not belong to a Team, a 404 error with an error_name of "not_found" will be returned. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamGet(); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**TeamGetResponse**](TeamGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamInfo + +> TeamGetInfoResponse teamInfo(teamId) + +Get Team Info + +Provides information about a team. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInfoExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInfo( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c" // teamId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInfo"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamId** | **String**| The id of the team. | [optional] + +### Return type + +[**TeamGetInfoResponse**](TeamGetInfoResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamInvites + +> TeamInvitesResponse teamInvites(emailAddress) + +List Team Invites + +Provides a list of team invites (and their roles). + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamInvitesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamInvites(); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamInvites"); + 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 | +|------------- | ------------- | ------------- | -------------| + **emailAddress** | **String**| The email address for which to display the team invites. | [optional] + +### Return type + +[**TeamInvitesResponse**](TeamInvitesResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamMembers + +> TeamMembersResponse teamMembers(teamId, page, pageSize) + +List Team Members + +Provides a paginated list of members (and their roles) that belong to a given team. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamMembersExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamMembers( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamMembers"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamId** | **String**| The id of the team that a member list is being requested from. | + **page** | **Integer**| Which page number of the team member list to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + +### Return type + +[**TeamMembersResponse**](TeamMembersResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamRemoveMember + +> TeamGetResponse teamRemoveMember(teamRemoveMemberRequest) + +Remove User from Team + +Removes the provided user Account from your Team. If the Account had an outstanding invitation to your Team, the invitation will be expired. If you choose to transfer documents from the removed Account to an Account provided in the `new_owner_email_address` parameter (available only for Enterprise plans), the response status code will be 201, which indicates that your request has been queued but not fully executed. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamRemoveMemberExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var teamRemoveMemberRequest = new TeamRemoveMemberRequest(); + teamRemoveMemberRequest.emailAddress("teammate@dropboxsign.com"); + teamRemoveMemberRequest.newOwnerEmailAddress("new_teammate@dropboxsign.com"); + + try + { + var response = new TeamApi(config).teamRemoveMember( + teamRemoveMemberRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamRemoveMember"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamRemoveMemberRequest** | [**TeamRemoveMemberRequest**](TeamRemoveMemberRequest.md)| | + +### Return type + +[**TeamGetResponse**](TeamGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamSubTeams + +> TeamSubTeamsResponse teamSubTeams(teamId, page, pageSize) + +List Sub Teams + +Provides a paginated list of sub teams that belong to a given team. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamSubTeamsExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TeamApi(config).teamSubTeams( + "4fea99bfcf2b26bfccf6cea3e127fb8bb74d8d9c", // teamId + 1, // page + 20 // pageSize + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamSubTeams"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamId** | **String**| The id of the parent Team. | + **page** | **Integer**| Which page number of the SubTeam List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + +### Return type + +[**TeamSubTeamsResponse**](TeamSubTeamsResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## teamUpdate + +> TeamGetResponse teamUpdate(teamUpdateRequest) + +Update Team + +Updates the name of your Team. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TeamUpdateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var teamUpdateRequest = new TeamUpdateRequest(); + teamUpdateRequest.name("New Team Name"); + + try + { + var response = new TeamApi(config).teamUpdate( + teamUpdateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TeamApi#teamUpdate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **teamUpdateRequest** | [**TeamUpdateRequest**](TeamUpdateRequest.md)| | + +### Return type + +[**TeamGetResponse**](TeamGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/TeamCreateRequest.md b/sdks/java-v1/docs/TeamCreateRequest.md new file mode 100644 index 000000000..1a4861618 --- /dev/null +++ b/sdks/java-v1/docs/TeamCreateRequest.md @@ -0,0 +1,14 @@ + + +# TeamCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of your Team. | | + + + diff --git a/sdks/java-v1/docs/TeamGetInfoResponse.md b/sdks/java-v1/docs/TeamGetInfoResponse.md new file mode 100644 index 000000000..1d2bc62a7 --- /dev/null +++ b/sdks/java-v1/docs/TeamGetInfoResponse.md @@ -0,0 +1,15 @@ + + +# TeamGetInfoResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `team`*_required_ | [```TeamInfoResponse```](TeamInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TeamGetResponse.md b/sdks/java-v1/docs/TeamGetResponse.md new file mode 100644 index 000000000..690796e1f --- /dev/null +++ b/sdks/java-v1/docs/TeamGetResponse.md @@ -0,0 +1,15 @@ + + +# TeamGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `team`*_required_ | [```TeamResponse```](TeamResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TeamInfoResponse.md b/sdks/java-v1/docs/TeamInfoResponse.md new file mode 100644 index 000000000..a776d4e09 --- /dev/null +++ b/sdks/java-v1/docs/TeamInfoResponse.md @@ -0,0 +1,18 @@ + + +# TeamInfoResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamId` | ```String``` | The id of a team | | +| `teamParent` | [```TeamParentResponse```](TeamParentResponse.md) | | | +| `name` | ```String``` | The name of a team | | +| `numMembers` | ```Integer``` | Number of members within a team | | +| `numSubTeams` | ```Integer``` | Number of sub teams within a team | | + + + diff --git a/sdks/java-v1/docs/TeamInviteResponse.md b/sdks/java-v1/docs/TeamInviteResponse.md new file mode 100644 index 000000000..c23aa4ed7 --- /dev/null +++ b/sdks/java-v1/docs/TeamInviteResponse.md @@ -0,0 +1,19 @@ + + +# TeamInviteResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `emailAddress` | ```String``` | Email address of the user invited to this team. | | +| `teamId` | ```String``` | Id of the team. | | +| `role` | ```String``` | Role of the user invited to this team. | | +| `sentAt` | ```Integer``` | Timestamp when the invitation was sent. | | +| `redeemedAt` | ```Integer``` | Timestamp when the invitation was redeemed. | | +| `expiresAt` | ```Integer``` | Timestamp when the invitation is expiring. | | + + + diff --git a/sdks/java-v1/docs/TeamInvitesResponse.md b/sdks/java-v1/docs/TeamInvitesResponse.md new file mode 100644 index 000000000..bdb648bb3 --- /dev/null +++ b/sdks/java-v1/docs/TeamInvitesResponse.md @@ -0,0 +1,15 @@ + + +# TeamInvitesResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamInvites`*_required_ | [```List```](TeamInviteResponse.md) | Contains a list of team invites and their roles. | | +| `warnings` | [```List```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/TeamMemberResponse.md b/sdks/java-v1/docs/TeamMemberResponse.md new file mode 100644 index 000000000..eb42aa095 --- /dev/null +++ b/sdks/java-v1/docs/TeamMemberResponse.md @@ -0,0 +1,16 @@ + + +# TeamMemberResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | Account id of the team member. | | +| `emailAddress` | ```String``` | Email address of the team member. | | +| `role` | ```String``` | The specific role a member has on the team. | | + + + diff --git a/sdks/java-v1/docs/TeamMembersResponse.md b/sdks/java-v1/docs/TeamMembersResponse.md new file mode 100644 index 000000000..785318277 --- /dev/null +++ b/sdks/java-v1/docs/TeamMembersResponse.md @@ -0,0 +1,16 @@ + + +# TeamMembersResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamMembers`*_required_ | [```List```](TeamMemberResponse.md) | Contains a list of team members and their roles for a specific team. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/TeamParentResponse.md b/sdks/java-v1/docs/TeamParentResponse.md new file mode 100644 index 000000000..c6ba18a98 --- /dev/null +++ b/sdks/java-v1/docs/TeamParentResponse.md @@ -0,0 +1,15 @@ + + +# TeamParentResponse + +Information about the parent team if a team has one, set to `null` otherwise. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `teamId` | ```String``` | The id of a team | | +| `name` | ```String``` | The name of a team | | + + + diff --git a/sdks/java-v1/docs/TeamRemoveMemberRequest.md b/sdks/java-v1/docs/TeamRemoveMemberRequest.md new file mode 100644 index 000000000..46f48538a --- /dev/null +++ b/sdks/java-v1/docs/TeamRemoveMemberRequest.md @@ -0,0 +1,29 @@ + + +# TeamRemoveMemberRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Account id to remove from your Team. | | +| `emailAddress` | ```String``` | **account_id** or **email_address** is required. If both are provided, the account id prevails.

Email address of the Account to remove from your Team. | | +| `newOwnerEmailAddress` | ```String``` | The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account.

**NOTE:** Only available for Enterprise plans. | | +| `newTeamId` | ```String``` | Id of the new Team. | | +| `newRole` | [```NewRoleEnum```](#NewRoleEnum) | A new role member will take in a new Team.

**NOTE:** This parameter is used only if `new_team_id` is provided. | | + + + +## Enum: NewRoleEnum + +| Name | Value | +---- | ----- +| MEMBER | "Member" | +| DEVELOPER | "Developer" | +| TEAM_MANAGER | "Team Manager" | +| ADMIN | "Admin" | + + + diff --git a/sdks/java-v1/docs/TeamResponse.md b/sdks/java-v1/docs/TeamResponse.md new file mode 100644 index 000000000..ca6344cfc --- /dev/null +++ b/sdks/java-v1/docs/TeamResponse.md @@ -0,0 +1,17 @@ + + +# TeamResponse + +Contains information about your team and its members + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of your Team | | +| `accounts` | [```List```](AccountResponse.md) | | | +| `invitedAccounts` | [```List```](AccountResponse.md) | A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`. | | +| `invitedEmails` | ```List``` | A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account. | | + + + diff --git a/sdks/java-v1/docs/TeamSubTeamsResponse.md b/sdks/java-v1/docs/TeamSubTeamsResponse.md new file mode 100644 index 000000000..636aa33eb --- /dev/null +++ b/sdks/java-v1/docs/TeamSubTeamsResponse.md @@ -0,0 +1,16 @@ + + +# TeamSubTeamsResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `subTeams`*_required_ | [```List```](SubTeamResponse.md) | Contains a list with sub teams. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | | | + + + diff --git a/sdks/java-v1/docs/TeamUpdateRequest.md b/sdks/java-v1/docs/TeamUpdateRequest.md new file mode 100644 index 000000000..9df0fe1da --- /dev/null +++ b/sdks/java-v1/docs/TeamUpdateRequest.md @@ -0,0 +1,14 @@ + + +# TeamUpdateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of your Team. | | + + + diff --git a/sdks/java-v1/docs/TemplateAddUserRequest.md b/sdks/java-v1/docs/TemplateAddUserRequest.md new file mode 100644 index 000000000..74966192b --- /dev/null +++ b/sdks/java-v1/docs/TemplateAddUserRequest.md @@ -0,0 +1,16 @@ + + +# TemplateAddUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The id of the Account to give access to the Template.
**NOTE:** The account id prevails if email address is also provided. | | +| `emailAddress` | ```String``` | The email address of the Account to give access to the Template.
**NOTE:** The account id prevails if it is also provided. | | +| `skipNotification` | ```Boolean``` | If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`. | | + + + diff --git a/sdks/java-v1/docs/TemplateApi.md b/sdks/java-v1/docs/TemplateApi.md new file mode 100644 index 000000000..f9de1a96a --- /dev/null +++ b/sdks/java-v1/docs/TemplateApi.md @@ -0,0 +1,1077 @@ +# TemplateApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**templateAddUser**](TemplateApi.md#templateAddUser) | **POST** /template/add_user/{template_id} | Add User to Template +[**templateCreate**](TemplateApi.md#templateCreate) | **POST** /template/create | Create Template +[**templateCreateEmbeddedDraft**](TemplateApi.md#templateCreateEmbeddedDraft) | **POST** /template/create_embedded_draft | Create Embedded Template Draft +[**templateDelete**](TemplateApi.md#templateDelete) | **POST** /template/delete/{template_id} | Delete Template +[**templateFiles**](TemplateApi.md#templateFiles) | **GET** /template/files/{template_id} | Get Template Files +[**templateFilesAsDataUri**](TemplateApi.md#templateFilesAsDataUri) | **GET** /template/files_as_data_uri/{template_id} | Get Template Files as Data Uri +[**templateFilesAsFileUrl**](TemplateApi.md#templateFilesAsFileUrl) | **GET** /template/files_as_file_url/{template_id} | Get Template Files as File Url +[**templateGet**](TemplateApi.md#templateGet) | **GET** /template/{template_id} | Get Template +[**templateList**](TemplateApi.md#templateList) | **GET** /template/list | List Templates +[**templateRemoveUser**](TemplateApi.md#templateRemoveUser) | **POST** /template/remove_user/{template_id} | Remove User from Template +[**templateUpdateFiles**](TemplateApi.md#templateUpdateFiles) | **POST** /template/update_files/{template_id} | Update Template Files + + + +## templateAddUser + +> TemplateGetResponse templateAddUser(templateId, templateAddUserRequest) + +Add User to Template + +Gives the specified Account access to the specified Template. The specified Account must be a part of your Team. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateAddUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var templateAddUserRequest = new TemplateAddUserRequest(); + templateAddUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateAddUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateAddUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateAddUser"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the Template to give the Account access to. | + **templateAddUserRequest** | [**TemplateAddUserRequest**](TemplateAddUserRequest.md)| | + +### Return type + +[**TemplateGetResponse**](TemplateGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateCreate + +> TemplateCreateResponse templateCreate(templateCreateRequest) + +Create Template + +Creates a template that can then be used. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var formFieldsPerDocument1 = new SubFormFieldsPerDocumentText(); + formFieldsPerDocument1.documentIndex(0); + formFieldsPerDocument1.apiId("uniqueIdHere_1"); + formFieldsPerDocument1.type("text"); + formFieldsPerDocument1.required(true); + formFieldsPerDocument1.signer("1"); + formFieldsPerDocument1.width(100); + formFieldsPerDocument1.height(16); + formFieldsPerDocument1.x(112); + formFieldsPerDocument1.y(328); + formFieldsPerDocument1.name(""); + formFieldsPerDocument1.page(1); + formFieldsPerDocument1.placeholder(""); + formFieldsPerDocument1.validationType(SubFormFieldsPerDocumentText.ValidationTypeEnum.NUMBERS_ONLY); + + var formFieldsPerDocument2 = new SubFormFieldsPerDocumentSignature(); + formFieldsPerDocument2.documentIndex(0); + formFieldsPerDocument2.apiId("uniqueIdHere_2"); + formFieldsPerDocument2.type("signature"); + formFieldsPerDocument2.required(true); + formFieldsPerDocument2.signer("0"); + formFieldsPerDocument2.width(120); + formFieldsPerDocument2.height(30); + formFieldsPerDocument2.x(530); + formFieldsPerDocument2.y(415); + formFieldsPerDocument2.name(""); + formFieldsPerDocument2.page(1); + + var formFieldsPerDocument = new ArrayList(List.of ( + formFieldsPerDocument1, + formFieldsPerDocument2 + )); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var templateCreateRequest = new TemplateCreateRequest(); + templateCreateRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateRequest.message("For your approval"); + templateCreateRequest.subject("Please sign this document"); + templateCreateRequest.testMode(true); + templateCreateRequest.title("Test Template"); + templateCreateRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateRequest.fieldOptions(fieldOptions); + templateCreateRequest.signerRoles(signerRoles); + templateCreateRequest.formFieldsPerDocument(formFieldsPerDocument); + templateCreateRequest.mergeFields(mergeFields); + + try + { + var response = new TemplateApi(config).templateCreate( + templateCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateCreateRequest** | [**TemplateCreateRequest**](TemplateCreateRequest.md)| | + +### Return type + +[**TemplateCreateResponse**](TemplateCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateCreateEmbeddedDraft + +> TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft(templateCreateEmbeddedDraftRequest) + +Create Embedded Template Draft + +The first step in an embedded template workflow. Creates a draft template that can then be further set up in the template 'edit' stage. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateCreateEmbeddedDraftExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var fieldOptions = new SubFieldOptions(); + fieldOptions.dateFormat(SubFieldOptions.DateFormatEnum.DD_MM_YYYY); + + var mergeFields1 = new SubMergeField(); + mergeFields1.name("Full Name"); + mergeFields1.type(SubMergeField.TypeEnum.TEXT); + + var mergeFields2 = new SubMergeField(); + mergeFields2.name("Is Registered?"); + mergeFields2.type(SubMergeField.TypeEnum.CHECKBOX); + + var mergeFields = new ArrayList(List.of ( + mergeFields1, + mergeFields2 + )); + + var signerRoles1 = new SubTemplateRole(); + signerRoles1.name("Client"); + signerRoles1.order(0); + + var signerRoles2 = new SubTemplateRole(); + signerRoles2.name("Witness"); + signerRoles2.order(1); + + var signerRoles = new ArrayList(List.of ( + signerRoles1, + signerRoles2 + )); + + var templateCreateEmbeddedDraftRequest = new TemplateCreateEmbeddedDraftRequest(); + templateCreateEmbeddedDraftRequest.clientId("37dee8d8440c66d54cfa05d92c160882"); + templateCreateEmbeddedDraftRequest.message("For your approval"); + templateCreateEmbeddedDraftRequest.subject("Please sign this document"); + templateCreateEmbeddedDraftRequest.testMode(true); + templateCreateEmbeddedDraftRequest.title("Test Template"); + templateCreateEmbeddedDraftRequest.ccRoles(List.of ( + "Manager" + )); + templateCreateEmbeddedDraftRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + templateCreateEmbeddedDraftRequest.fieldOptions(fieldOptions); + templateCreateEmbeddedDraftRequest.mergeFields(mergeFields); + templateCreateEmbeddedDraftRequest.signerRoles(signerRoles); + + try + { + var response = new TemplateApi(config).templateCreateEmbeddedDraft( + templateCreateEmbeddedDraftRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateCreateEmbeddedDraft"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateCreateEmbeddedDraftRequest** | [**TemplateCreateEmbeddedDraftRequest**](TemplateCreateEmbeddedDraftRequest.md)| | + +### Return type + +[**TemplateCreateEmbeddedDraftResponse**](TemplateCreateEmbeddedDraftResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateDelete + +> templateDelete(templateId) + +Delete Template + +Completely deletes the template specified from the account. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateDeleteExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + new TemplateApi(config).templateDelete( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateDelete"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the Template to delete. | + +### Return type + +null (empty response body) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateFiles + +> File templateFiles(templateId, fileType) + +Get Template Files + +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a PDF or ZIP file. + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + null // fileType + ); + response.renameTo(new File("./file_response")); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFiles"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the template files to retrieve. | + **fileType** | **String**| Set to `pdf` for a single merged document or `zip` for a collection of individual documents. | [optional] [enum: pdf, zip] + +### Return type + +[**File**](File.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/pdf, application/zip, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateFilesAsDataUri + +> FileResponseDataUri templateFilesAsDataUri(templateId) + +Get Template Files as Data Uri + +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a `data_uri` representing the base64 encoded file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsDataUriExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsDataUri( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsDataUri"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the template files to retrieve. | + +### Return type + +[**FileResponseDataUri**](FileResponseDataUri.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateFilesAsFileUrl + +> FileResponse templateFilesAsFileUrl(templateId, forceDownload) + +Get Template Files as File Url + +Obtain a copy of the current documents specified by the `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). + +If the files are currently being prepared, a status code of `409` will be returned instead. In this case please wait for the `template_created` callback event. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateFilesAsFileUrlExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateFilesAsFileUrl( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + 1 // forceDownload + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateFilesAsFileUrl"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the template files to retrieve. | + **forceDownload** | **Integer**| By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser. | [optional] [default to 1] + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateGet + +> TemplateGetResponse templateGet(templateId) + +Get Template + +Returns the Template specified by the `template_id` parameter. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateGetExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateGet( + "f57db65d3f933b5316d398057a36176831451a35" // templateId + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateGet"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the Template to retrieve. | + +### Return type + +[**TemplateGetResponse**](TemplateGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateList + +> TemplateListResponse templateList(accountId, page, pageSize, query) + +List Templates + +Returns a list of the Templates that are accessible by you. + +Take a look at our [search guide](/api/reference/search/) to learn more about querying templates. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateListExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + try + { + var response = new TemplateApi(config).templateList( + null, // accountId + 1, // page + 20, // pageSize + null // query + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateList"); + 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**| Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account. | [optional] + **page** | **Integer**| Which page number of the Template List to return. Defaults to `1`. | [optional] [default to 1] + **pageSize** | **Integer**| Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`. | [optional] [default to 20] + **query** | **String**| String that includes search terms and/or fields to be used to filter the Template objects. | [optional] + +### Return type + +[**TemplateListResponse**](TemplateListResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateRemoveUser + +> TemplateGetResponse templateRemoveUser(templateId, templateRemoveUserRequest) + +Remove User from Template + +Removes the specified Account's access to the specified Template. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateRemoveUserExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var templateRemoveUserRequest = new TemplateRemoveUserRequest(); + templateRemoveUserRequest.emailAddress("george@dropboxsign.com"); + + try + { + var response = new TemplateApi(config).templateRemoveUser( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateRemoveUserRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateRemoveUser"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The id of the Template to remove the Account's access to. | + **templateRemoveUserRequest** | [**TemplateRemoveUserRequest**](TemplateRemoveUserRequest.md)| | + +### Return type + +[**TemplateGetResponse**](TemplateGetResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## templateUpdateFiles + +> TemplateUpdateFilesResponse templateUpdateFiles(templateId, templateUpdateFilesRequest) + +Update Template Files + +Overlays a new file with the overlay of an existing template. The new file(s) must: + +1. have the same or higher page count +2. the same orientation as the file(s) being replaced. + +This will not overwrite or in any way affect the existing template. Both the existing template and new template will be available for use after executing this endpoint. Also note that this will decrement your template quota. + +Overlaying new files is asynchronous and a successful call to this endpoint will return 200 OK response if the request passes initial validation checks. + +It is recommended that a callback be implemented to listen for the callback event. A `template_created` event will be sent when the files are updated or a `template_error` event will be sent if there was a problem while updating the files. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the API dashboard and retry the request if necessary. + +If the page orientation or page count is different from the original template document, we will notify you with a `template_error` [callback event](https://app.hellosign.com/api/eventsAndCallbacksWalkthrough). + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class TemplateUpdateFilesExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var templateUpdateFilesRequest = new TemplateUpdateFilesRequest(); + templateUpdateFilesRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new TemplateApi(config).templateUpdateFiles( + "f57db65d3f933b5316d398057a36176831451a35", // templateId + templateUpdateFilesRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling TemplateApi#templateUpdateFiles"); + 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 | +|------------- | ------------- | ------------- | -------------| + **templateId** | **String**| The ID of the template whose files to update. | + **templateUpdateFilesRequest** | [**TemplateUpdateFilesRequest**](TemplateUpdateFilesRequest.md)| | + +### Return type + +[**TemplateUpdateFilesResponse**](TemplateUpdateFilesResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md new file mode 100644 index 000000000..05f2497fc --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftRequest.md @@ -0,0 +1,38 @@ + + +# TemplateCreateEmbeddedDraftRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request | | +| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | +| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `mergeFields` | [```List```](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | | +| `message` | ```String``` | The default template email message. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `signerRoles` | [```List```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | +| `subject` | ```String``` | The template title (alias). | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `usePreexistingFields` | ```Boolean``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | | + + + diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md new file mode 100644 index 000000000..f25b48d33 --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponse.md @@ -0,0 +1,15 @@ + + +# TemplateCreateEmbeddedDraftResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `template`*_required_ | [```TemplateCreateEmbeddedDraftResponseTemplate```](TemplateCreateEmbeddedDraftResponseTemplate.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md new file mode 100644 index 000000000..770cce434 --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateEmbeddedDraftResponseTemplate.md @@ -0,0 +1,17 @@ + + +# TemplateCreateEmbeddedDraftResponseTemplate + +Template object with parameters: `template_id`, `edit_url`, `expires_at`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateId` | ```String``` | The id of the Template. | | +| `editUrl` | ```String``` | Link to edit the template. | | +| `expiresAt` | ```Integer``` | When the link expires. | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TemplateCreateRequest.md b/sdks/java-v1/docs/TemplateCreateRequest.md new file mode 100644 index 000000000..5f99510d9 --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateRequest.md @@ -0,0 +1,31 @@ + + +# TemplateCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `formFieldsPerDocument`*_required_ | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `signerRoles`*_required_ | [```List```](SubTemplateRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccRoles` | ```List``` | The CC roles that must be assigned when using the template to send a signature request | | +| `clientId` | ```String``` | Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `mergeFields` | [```List```](SubMergeField.md) | Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document. | | +| `message` | ```String``` | The default template email message. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `subject` | ```String``` | The template title (alias). | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `usePreexistingFields` | ```Boolean``` | Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). | | + + + diff --git a/sdks/java-v1/docs/TemplateCreateResponse.md b/sdks/java-v1/docs/TemplateCreateResponse.md new file mode 100644 index 000000000..3c7389668 --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateResponse.md @@ -0,0 +1,15 @@ + + +# TemplateCreateResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `template`*_required_ | [```TemplateCreateResponseTemplate```](TemplateCreateResponseTemplate.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TemplateCreateResponseTemplate.md b/sdks/java-v1/docs/TemplateCreateResponseTemplate.md new file mode 100644 index 000000000..1dcd4bd79 --- /dev/null +++ b/sdks/java-v1/docs/TemplateCreateResponseTemplate.md @@ -0,0 +1,14 @@ + + +# TemplateCreateResponseTemplate + +Template object with parameters: `template_id`. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateId` | ```String``` | The id of the Template. | | + + + diff --git a/sdks/java-v1/docs/TemplateEditResponse.md b/sdks/java-v1/docs/TemplateEditResponse.md new file mode 100644 index 000000000..88d225e68 --- /dev/null +++ b/sdks/java-v1/docs/TemplateEditResponse.md @@ -0,0 +1,14 @@ + + +# TemplateEditResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateId`*_required_ | ```String``` | The id of the Template. | | + + + diff --git a/sdks/java-v1/docs/TemplateGetResponse.md b/sdks/java-v1/docs/TemplateGetResponse.md new file mode 100644 index 000000000..2ee4867f0 --- /dev/null +++ b/sdks/java-v1/docs/TemplateGetResponse.md @@ -0,0 +1,15 @@ + + +# TemplateGetResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `template`*_required_ | [```TemplateResponse```](TemplateResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TemplateListResponse.md b/sdks/java-v1/docs/TemplateListResponse.md new file mode 100644 index 000000000..92b720c58 --- /dev/null +++ b/sdks/java-v1/docs/TemplateListResponse.md @@ -0,0 +1,16 @@ + + +# TemplateListResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templates`*_required_ | [```List```](TemplateResponse.md) | List of templates that the API caller has access to. | | +| `listInfo`*_required_ | [```ListInfoResponse```](ListInfoResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/TemplateRemoveUserRequest.md b/sdks/java-v1/docs/TemplateRemoveUserRequest.md new file mode 100644 index 000000000..72a3a585a --- /dev/null +++ b/sdks/java-v1/docs/TemplateRemoveUserRequest.md @@ -0,0 +1,15 @@ + + +# TemplateRemoveUserRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | +| `emailAddress` | ```String``` | The id or email address of the Account to remove access to the Template. The account id prevails if both are provided. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponse.md b/sdks/java-v1/docs/TemplateResponse.md new file mode 100644 index 000000000..40de0fdc8 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponse.md @@ -0,0 +1,29 @@ + + +# TemplateResponse + +Contains information about the templates you and your team have created. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateId` | ```String``` | The id of the Template. | | +| `title` | ```String``` | The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | +| `message` | ```String``` | The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest. | | +| `updatedAt` | ```Integer``` | Time the template was last updated. | | +| `isEmbedded` | ```Boolean``` | `true` if this template was created using an embedded flow, `false` if it was created on our website. Will be `null` when you are not the creator of the Template. | | +| `isCreator` | ```Boolean``` | `true` if you are the owner of this template, `false` if it's been shared with you by a team member. | | +| `canEdit` | ```Boolean``` | Indicates whether edit rights have been granted to you by the owner (always `true` if that's you). | | +| `isLocked` | ```Boolean``` | Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests. | | +| `metadata` | ```Map``` | The metadata attached to the template. | | +| `signerRoles` | [```List```](TemplateResponseSignerRole.md) | An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template. | | +| `ccRoles` | [```List```](TemplateResponseCCRole.md) | An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. | | +| `documents` | [```List```](TemplateResponseDocument.md) | An array describing each document associated with this Template. Includes form field data for each document. | | +| `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | +| `namedFormFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead. | | +| `accounts` | [```List```](TemplateResponseAccount.md) | An array of the Accounts that can use this Template. | | +| `attachments` | [```List```](SignatureRequestResponseAttachment.md) | Signer attachments. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseAccount.md b/sdks/java-v1/docs/TemplateResponseAccount.md new file mode 100644 index 000000000..10c996408 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseAccount.md @@ -0,0 +1,19 @@ + + +# TemplateResponseAccount + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `accountId` | ```String``` | The id of the Account. | | +| `emailAddress` | ```String``` | The email address associated with the Account. | | +| `isLocked` | ```Boolean``` | Returns `true` if the user has been locked out of their account by a team admin. | | +| `isPaidHs` | ```Boolean``` | Returns `true` if the user has a paid Dropbox Sign account. | | +| `isPaidHf` | ```Boolean``` | Returns `true` if the user has a paid HelloFax account. | | +| `quotas` | [```TemplateResponseAccountQuota```](TemplateResponseAccountQuota.md) | | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseAccountQuota.md b/sdks/java-v1/docs/TemplateResponseAccountQuota.md new file mode 100644 index 000000000..ad94c2493 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseAccountQuota.md @@ -0,0 +1,17 @@ + + +# TemplateResponseAccountQuota + +An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templatesLeft` | ```Integer``` | API templates remaining. | | +| `apiSignatureRequestsLeft` | ```Integer``` | API signature requests remaining. | | +| `documentsLeft` | ```Integer``` | Signature requests remaining. | | +| `smsVerificationsLeft` | ```Integer``` | SMS verifications remaining. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseCCRole.md b/sdks/java-v1/docs/TemplateResponseCCRole.md new file mode 100644 index 000000000..64069b826 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseCCRole.md @@ -0,0 +1,14 @@ + + +# TemplateResponseCCRole + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of the Role. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocument.md b/sdks/java-v1/docs/TemplateResponseDocument.md new file mode 100644 index 000000000..65da85d42 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocument.md @@ -0,0 +1,19 @@ + + +# TemplateResponseDocument + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | Name of the associated file. | | +| `index` | ```Integer``` | Document ordering, the lowest index is displayed first and the highest last (0-based indexing). | | +| `fieldGroups` | [```List```](TemplateResponseDocumentFieldGroup.md) | An array of Form Field Group objects. | | +| `formFields` | [```List```](TemplateResponseDocumentFormFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | +| `customFields` | [```List```](TemplateResponseDocumentCustomFieldBase.md) | An array of Form Field objects containing the name and type of each named field. | | +| `staticFields` | [```List```](TemplateResponseDocumentStaticFieldBase.md) | An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md new file mode 100644 index 000000000..edd461727 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldBase.md @@ -0,0 +1,23 @@ + + +# TemplateResponseDocumentCustomFieldBase + +An array of Form Field objects containing the name and type of each named field. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | | | +| `apiId` | ```String``` | The unique ID for this field. | | +| `name` | ```String``` | The name of the Custom Field. | | +| `signer` | ```String``` | The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender). | | +| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | | +| `y` | ```Integer``` | The vertical offset in pixels for this form field. | | +| `width` | ```Integer``` | The width in pixels of this form field. | | +| `height` | ```Integer``` | The height in pixels of this form field. | | +| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md new file mode 100644 index 000000000..dbde79072 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldCheckbox.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentCustomFieldCheckbox + +This class extends `TemplateResponseDocumentCustomFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md new file mode 100644 index 000000000..ccaf19394 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentCustomFieldText.md @@ -0,0 +1,18 @@ + + +# TemplateResponseDocumentCustomFieldText + +This class extends `TemplateResponseDocumentCustomFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this Custom Field. Only `text` and `checkbox` are currently supported.

* Text uses `TemplateResponseDocumentCustomFieldText`
* Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox` | | +| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | +| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | +| `fontFamily` | ```String``` | Font family used in this form field's text. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md new file mode 100644 index 000000000..03b5ffbb8 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroup.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFieldGroup + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of the form field group. | | +| `rule` | [```TemplateResponseDocumentFieldGroupRule```](TemplateResponseDocumentFieldGroupRule.md) | | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md new file mode 100644 index 000000000..e0f4dcc8a --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFieldGroupRule.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFieldGroupRule + +The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping). + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `requirement` | ```String``` | Examples: `require_0-1` `require_1` `require_1-ormore`

- Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group. | | +| `groupLabel` | ```String``` | Name of the group | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md new file mode 100644 index 000000000..6ff896074 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldBase.md @@ -0,0 +1,22 @@ + + +# TemplateResponseDocumentFormFieldBase + +An array of Form Field objects containing the name and type of each named field. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | | | +| `apiId` | ```String``` | A unique id for the form field. | | +| `name` | ```String``` | The name of the form field. | | +| `signer` | ```String``` | The signer of the Form Field. | | +| `x` | ```Integer``` | The horizontal offset in pixels for this form field. | | +| `y` | ```Integer``` | The vertical offset in pixels for this form field. | | +| `width` | ```Integer``` | The width in pixels of this form field. | | +| `height` | ```Integer``` | The height in pixels of this form field. | | +| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md new file mode 100644 index 000000000..a7f2cadeb --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldCheckbox.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldCheckbox + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md new file mode 100644 index 000000000..09b45eec7 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDateSigned.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldDateSigned + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md new file mode 100644 index 000000000..70e5da455 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldDropdown.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldDropdown + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md new file mode 100644 index 000000000..e8efcf2d7 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldHyperlink.md @@ -0,0 +1,19 @@ + + +# TemplateResponseDocumentFormFieldHyperlink + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | +| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | +| `fontFamily` | ```String``` | Font family used in this form field's text. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md new file mode 100644 index 000000000..f1fe1f5b5 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldInitials.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldInitials + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md new file mode 100644 index 000000000..877b842a2 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldRadio.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldRadio + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group`*_required_ | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md new file mode 100644 index 000000000..366aaa9b4 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldSignature.md @@ -0,0 +1,15 @@ + + +# TemplateResponseDocumentFormFieldSignature + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md new file mode 100644 index 000000000..49cdfaad6 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentFormFieldText.md @@ -0,0 +1,37 @@ + + +# TemplateResponseDocumentFormFieldText + +This class extends `TemplateResponseDocumentFormFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this form field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentFormFieldText`
* Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentFormFieldRadio`
* Signature Field uses `TemplateResponseDocumentFormFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentFormFieldInitials` | | +| `avgTextLength` | [```TemplateResponseFieldAvgTextLength```](TemplateResponseFieldAvgTextLength.md) | | | +| `isMultiline` | ```Boolean``` | Whether this form field is multiline text. | | +| `originalFontSize` | ```Integer``` | Original font size used in this form field's text. | | +| `fontFamily` | ```String``` | Font family used in this form field's text. | | +| `validationType` | [```ValidationTypeEnum```](#ValidationTypeEnum) | Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields. | | + + + +## Enum: ValidationTypeEnum + +| Name | Value | +---- | ----- +| NUMBERS_ONLY | "numbers_only" | +| LETTERS_ONLY | "letters_only" | +| PHONE_NUMBER | "phone_number" | +| BANK_ROUTING_NUMBER | "bank_routing_number" | +| BANK_ACCOUNT_NUMBER | "bank_account_number" | +| EMAIL_ADDRESS | "email_address" | +| ZIP_CODE | "zip_code" | +| SOCIAL_SECURITY_NUMBER | "social_security_number" | +| EMPLOYER_IDENTIFICATION_NUMBER | "employer_identification_number" | +| CUSTOM_REGEX | "custom_regex" | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md new file mode 100644 index 000000000..4be3cf070 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldBase.md @@ -0,0 +1,23 @@ + + +# TemplateResponseDocumentStaticFieldBase + +An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | | | +| `apiId` | ```String``` | A unique id for the static field. | | +| `name` | ```String``` | The name of the static field. | | +| `signer` | ```String``` | The signer of the Static Field. | | +| `x` | ```Integer``` | The horizontal offset in pixels for this static field. | | +| `y` | ```Integer``` | The vertical offset in pixels for this static field. | | +| `width` | ```Integer``` | The width in pixels of this static field. | | +| `height` | ```Integer``` | The height in pixels of this static field. | | +| `required` | ```Boolean``` | Boolean showing whether or not this field is required. | | +| `group` | ```String``` | The name of the group this field is in. If this field is not a group, this defaults to `null`. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md new file mode 100644 index 000000000..6cd94853c --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldCheckbox.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldCheckbox + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md new file mode 100644 index 000000000..d5c530d8b --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDateSigned.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldDateSigned + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md new file mode 100644 index 000000000..53505315e --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldDropdown.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldDropdown + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md new file mode 100644 index 000000000..930658b69 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldHyperlink.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldHyperlink + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md new file mode 100644 index 000000000..67d755703 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldInitials.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldInitials + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md new file mode 100644 index 000000000..ed32ccca6 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldRadio.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldRadio + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md new file mode 100644 index 000000000..61f8902f8 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldSignature.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldSignature + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md new file mode 100644 index 000000000..3dced017f --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseDocumentStaticFieldText.md @@ -0,0 +1,14 @@ + + +# TemplateResponseDocumentStaticFieldText + +This class extends `TemplateResponseDocumentStaticFieldBase` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | ```String``` | The type of this static field. See [field types](/api/reference/constants/#field-types).

* Text Field uses `TemplateResponseDocumentStaticFieldText`
* Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown`
* Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink`
* Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox`
* Radio Field uses `TemplateResponseDocumentStaticFieldRadio`
* Signature Field uses `TemplateResponseDocumentStaticFieldSignature`
* Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned`
* Initials Field uses `TemplateResponseDocumentStaticFieldInitials` | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md b/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md new file mode 100644 index 000000000..bb66f3057 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseFieldAvgTextLength.md @@ -0,0 +1,15 @@ + + +# TemplateResponseFieldAvgTextLength + +Average text length in this field. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `numLines` | ```Integer``` | Number of lines. | | +| `numCharsPerLine` | ```Integer``` | Number of characters per line. | | + + + diff --git a/sdks/java-v1/docs/TemplateResponseSignerRole.md b/sdks/java-v1/docs/TemplateResponseSignerRole.md new file mode 100644 index 000000000..15b48cf17 --- /dev/null +++ b/sdks/java-v1/docs/TemplateResponseSignerRole.md @@ -0,0 +1,15 @@ + + +# TemplateResponseSignerRole + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `name` | ```String``` | The name of the Role. | | +| `order` | ```Integer``` | If signer order is assigned this is the 0-based index for this role. | | + + + diff --git a/sdks/java-v1/docs/TemplateUpdateFilesRequest.md b/sdks/java-v1/docs/TemplateUpdateFilesRequest.md new file mode 100644 index 000000000..8671b87f8 --- /dev/null +++ b/sdks/java-v1/docs/TemplateUpdateFilesRequest.md @@ -0,0 +1,19 @@ + + +# TemplateUpdateFilesRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId` | ```String``` | Client id of the app you're using to update this template. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `message` | ```String``` | The new default template email message. | | +| `subject` | ```String``` | The new default template email subject. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | + + + diff --git a/sdks/java-v1/docs/TemplateUpdateFilesResponse.md b/sdks/java-v1/docs/TemplateUpdateFilesResponse.md new file mode 100644 index 000000000..70930e1c8 --- /dev/null +++ b/sdks/java-v1/docs/TemplateUpdateFilesResponse.md @@ -0,0 +1,14 @@ + + +# TemplateUpdateFilesResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `template`*_required_ | [```TemplateUpdateFilesResponseTemplate```](TemplateUpdateFilesResponseTemplate.md) | | | + + + diff --git a/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md b/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md new file mode 100644 index 000000000..6289a9953 --- /dev/null +++ b/sdks/java-v1/docs/TemplateUpdateFilesResponseTemplate.md @@ -0,0 +1,15 @@ + + +# TemplateUpdateFilesResponseTemplate + +Contains template id + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `templateId` | ```String``` | The id of the Template. | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftApi.md b/sdks/java-v1/docs/UnclaimedDraftApi.md new file mode 100644 index 000000000..59ad0d2fd --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftApi.md @@ -0,0 +1,400 @@ +# UnclaimedDraftApi + +All URIs are relative to *https://api.hellosign.com/v3* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +[**unclaimedDraftCreate**](UnclaimedDraftApi.md#unclaimedDraftCreate) | **POST** /unclaimed_draft/create | Create Unclaimed Draft +[**unclaimedDraftCreateEmbedded**](UnclaimedDraftApi.md#unclaimedDraftCreateEmbedded) | **POST** /unclaimed_draft/create_embedded | Create Embedded Unclaimed Draft +[**unclaimedDraftCreateEmbeddedWithTemplate**](UnclaimedDraftApi.md#unclaimedDraftCreateEmbeddedWithTemplate) | **POST** /unclaimed_draft/create_embedded_with_template | Create Embedded Unclaimed Draft with Template +[**unclaimedDraftEditAndResend**](UnclaimedDraftApi.md#unclaimedDraftEditAndResend) | **POST** /unclaimed_draft/edit_and_resend/{signature_request_id} | Edit and Resend Unclaimed Draft + + + +## unclaimedDraftCreate + +> UnclaimedDraftCreateResponse unclaimedDraftCreate(unclaimedDraftCreateRequest) + +Create Unclaimed Draft + +Creates a new Draft that can be claimed using the claim URL. The first authenticated user to access the URL will claim the Draft and will be shown either the "Sign and send" or the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a 404. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var signers1 = new SubUnclaimedDraftSigner(); + signers1.name("Jack"); + signers1.emailAddress("jack@example.com"); + signers1.order(0); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateRequest = new UnclaimedDraftCreateRequest(); + unclaimedDraftCreateRequest.type(UnclaimedDraftCreateRequest.TypeEnum.REQUEST_SIGNATURE); + unclaimedDraftCreateRequest.testMode(true); + unclaimedDraftCreateRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + unclaimedDraftCreateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreate( + unclaimedDraftCreateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **unclaimedDraftCreateRequest** | [**UnclaimedDraftCreateRequest**](UnclaimedDraftCreateRequest.md)| | + +### Return type + +[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## unclaimedDraftCreateEmbedded + +> UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded(unclaimedDraftCreateEmbeddedRequest) + +Create Embedded Unclaimed Draft + +Creates a new Draft that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftCreateEmbeddedRequest = new UnclaimedDraftCreateEmbeddedRequest(); + unclaimedDraftCreateEmbeddedRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedRequest.testMode(true); + unclaimedDraftCreateEmbeddedRequest.files(List.of ( + new File("./example_signature_request.pdf") + )); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbedded( + unclaimedDraftCreateEmbeddedRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbedded"); + 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 | +|------------- | ------------- | ------------- | -------------| + **unclaimedDraftCreateEmbeddedRequest** | [**UnclaimedDraftCreateEmbeddedRequest**](UnclaimedDraftCreateEmbeddedRequest.md)| | + +### Return type + +[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## unclaimedDraftCreateEmbeddedWithTemplate + +> UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate(unclaimedDraftCreateEmbeddedWithTemplateRequest) + +Create Embedded Unclaimed Draft with Template + +Creates a new Draft with a previously saved template(s) that can be claimed and used in an embedded iFrame. The first authenticated user to access the URL will claim the Draft and will be shown the "Request signature" page with the Draft loaded. Subsequent access to the claim URL will result in a `404`. For this embedded endpoint the `requester_email_address` parameter is required. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftCreateEmbeddedWithTemplateExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var ccs1 = new SubCC(); + ccs1.role("Accounting"); + ccs1.emailAddress("accounting@dropboxsign.com"); + + var ccs = new ArrayList(List.of ( + ccs1 + )); + + var signers1 = new SubUnclaimedDraftTemplateSigner(); + signers1.role("Client"); + signers1.name("George"); + signers1.emailAddress("george@example.com"); + + var signers = new ArrayList(List.of ( + signers1 + )); + + var unclaimedDraftCreateEmbeddedWithTemplateRequest = new UnclaimedDraftCreateEmbeddedWithTemplateRequest(); + unclaimedDraftCreateEmbeddedWithTemplateRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.requesterEmailAddress("jack@dropboxsign.com"); + unclaimedDraftCreateEmbeddedWithTemplateRequest.templateIds(List.of ( + "61a832ff0d8423f91d503e76bfbcc750f7417c78" + )); + unclaimedDraftCreateEmbeddedWithTemplateRequest.testMode(false); + unclaimedDraftCreateEmbeddedWithTemplateRequest.ccs(ccs); + unclaimedDraftCreateEmbeddedWithTemplateRequest.signers(signers); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftCreateEmbeddedWithTemplate( + unclaimedDraftCreateEmbeddedWithTemplateRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftCreateEmbeddedWithTemplate"); + 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 | +|------------- | ------------- | ------------- | -------------| + **unclaimedDraftCreateEmbeddedWithTemplateRequest** | [**UnclaimedDraftCreateEmbeddedWithTemplateRequest**](UnclaimedDraftCreateEmbeddedWithTemplateRequest.md)| | + +### Return type + +[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json, multipart/form-data +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + + +## unclaimedDraftEditAndResend + +> UnclaimedDraftCreateResponse unclaimedDraftEditAndResend(signatureRequestId, unclaimedDraftEditAndResendRequest) + +Edit and Resend Unclaimed Draft + +Creates a new signature request from an embedded request that can be edited prior to being sent to the recipients. Parameter `test_mode` can be edited prior to request. Signers can be edited in embedded editor. Requester's email address will remain unchanged if `requester_email_address` parameter is not set. + +**NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal drafts can be used and accessed on Dropbox Sign. + +### Example + +```java +package com.dropbox.sign_sandbox; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Configuration; +import com.dropbox.sign.api.*; +import com.dropbox.sign.auth.*; +import com.dropbox.sign.JSON; +import com.dropbox.sign.model.*; + +import java.io.File; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class UnclaimedDraftEditAndResendExample +{ + public static void main(String[] args) + { + var config = Configuration.getDefaultApiClient(); + config.setUsername("YOUR_API_KEY"); + // config.setAccessToken("YOUR_ACCESS_TOKEN"); + + var unclaimedDraftEditAndResendRequest = new UnclaimedDraftEditAndResendRequest(); + unclaimedDraftEditAndResendRequest.clientId("b6b8e7deaf8f0b95c029dca049356d4a2cf9710a"); + unclaimedDraftEditAndResendRequest.testMode(false); + + try + { + var response = new UnclaimedDraftApi(config).unclaimedDraftEditAndResend( + "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId + unclaimedDraftEditAndResendRequest + ); + + System.out.println(response); + } catch (ApiException e) { + System.err.println("Exception when calling UnclaimedDraftApi#unclaimedDraftEditAndResend"); + 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 | +|------------- | ------------- | ------------- | -------------| + **signatureRequestId** | **String**| The ID of the signature request to edit and resend. | + **unclaimedDraftEditAndResendRequest** | [**UnclaimedDraftEditAndResendRequest**](UnclaimedDraftEditAndResendRequest.md)| | + +### Return type + +[**UnclaimedDraftCreateResponse**](UnclaimedDraftCreateResponse.md) + +### Authorization + +[api_key](../README.md#api_key), [oauth2](../README.md#oauth2) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
| +| **4XX** | failed_operation | - | + diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md new file mode 100644 index 000000000..aab362d77 --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedRequest.md @@ -0,0 +1,58 @@ + + +# UnclaimedDraftCreateEmbeddedRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `requesterEmailAddress`*_required_ | ```String``` | The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `forceSignerPage` | ```Boolean``` | Provide users the ability to review/edit the signers. | | +| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the subject and message. | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | | +| `holdRequest` | ```Boolean``` | The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | | +| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | +| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `signers` | [```List```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | +| `type` | [```TypeEnum```](#TypeEnum) | The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it. | | +| `usePreexistingFields` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | +| `useTextTags` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| SEND_DOCUMENT | "send_document" | +| REQUEST_SIGNATURE | "request_signature" | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md new file mode 100644 index 000000000..03ad8b9e5 --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftCreateEmbeddedWithTemplateRequest.md @@ -0,0 +1,43 @@ + + +# UnclaimedDraftCreateEmbeddedWithTemplateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `requesterEmailAddress`*_required_ | ```String``` | The email address of the user that should be designated as the requester of this draft. | | +| `templateIds`*_required_ | ```List``` | Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `allowReassign` | ```Boolean``` | Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`.

**NOTE:** Only available for Premium plan and higher. | | +| `ccs` | [```List```](SubCC.md) | Add CC email recipients. Required when a CC role exists for the Template. | | +| `customFields` | [```List```](SubCustomField.md) | An array defining values and options for custom fields. Required when a custom field exists in the Template. | | +| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `files` | ```List``` | Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | | +| `fileUrls` | ```List``` | Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored.

**files** or **file_urls[]** is required, but not both. | | +| `forceSignerRoles` | ```Boolean``` | Provide users the ability to review/edit the template signer roles. | | +| `forceSubjectMessage` | ```Boolean``` | Provide users the ability to review/edit the template subject and message. | | +| `holdRequest` | ```Boolean``` | The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`. | | +| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `previewOnly` | ```Boolean``` | This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor).

- `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience.

**NOTE:** This parameter overwrites `show_preview=1` (if set). | | +| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | +| `showPreview` | ```Boolean``` | This allows the requester to enable the editor/preview experience.

- `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `signers` | [```List```](SubUnclaimedDraftTemplateSigner.md) | Add Signers to your Templated-based Signature Request. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `skipMeNow` | ```Boolean``` | Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | +| `title` | ```String``` | The title you want to assign to the SignatureRequest. | | +| `populateAutoFillFields` | ```Boolean``` | Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing.

**NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature. | | +| `allowCcs` | ```Boolean``` | This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft. | | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md b/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md new file mode 100644 index 000000000..f23c6f4ba --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftCreateRequest.md @@ -0,0 +1,46 @@ + + +# UnclaimedDraftCreateRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `type`*_required_ | [```TypeEnum```](#TypeEnum) | The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional. | | +| `files` | ```List``` | Use `files[]` to indicate the uploaded file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `fileUrls` | ```List``` | Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature.

This endpoint requires either **files** or **file_urls[]**, but not both. | | +| `allowDecline` | ```Boolean``` | Allows signers to decline to sign a document if `true`. Defaults to `false`. | | +| `attachments` | [```List```](SubAttachment.md) | A list describing the attachments | | +| `ccEmailAddresses` | ```List``` | The email addresses that should be CCed. | | +| `clientId` | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `customFields` | [```List```](SubCustomField.md) | When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests.

Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call.

For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. | | +| `fieldOptions` | [```SubFieldOptions```](SubFieldOptions.md) | | | +| `formFieldGroups` | [```List```](SubFormFieldGroup.md) | Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`. | | +| `formFieldRules` | [```List```](SubFormFieldRule.md) | Conditional Logic rules for fields defined in `form_fields_per_document`. | | +| `formFieldsPerDocument` | [```List```](SubFormFieldsPerDocumentBase.md) | The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).)

**NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types.

* Text Field use `SubFormFieldsPerDocumentText`
* Dropdown Field use `SubFormFieldsPerDocumentDropdown`
* Hyperlink Field use `SubFormFieldsPerDocumentHyperlink`
* Checkbox Field use `SubFormFieldsPerDocumentCheckbox`
* Radio Field use `SubFormFieldsPerDocumentRadio`
* Signature Field use `SubFormFieldsPerDocumentSignature`
* Date Signed Field use `SubFormFieldsPerDocumentDateSigned`
* Initials Field use `SubFormFieldsPerDocumentInitials`
* Text Merge Field use `SubFormFieldsPerDocumentTextMerge`
* Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` | | +| `hideTextTags` | ```Boolean``` | Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details. | | +| `message` | ```String``` | The custom message in the email that will be sent to the signers. | | +| `metadata` | ```Map``` | Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request.

Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `signers` | [```List```](SubUnclaimedDraftSigner.md) | Add Signers to your Unclaimed Draft Signature Request. | | +| `signingOptions` | [```SubSigningOptions```](SubSigningOptions.md) | | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `subject` | ```String``` | The subject in the email that will be sent to the signers. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | +| `usePreexistingFields` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | +| `useTextTags` | ```Boolean``` | Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both. | | +| `expiresAt` | ```Integer``` | When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.

**NOTE:** This does not correspond to the **expires_at** returned in the response. | | + + + +## Enum: TypeEnum + +| Name | Value | +---- | ----- +| SEND_DOCUMENT | "send_document" | +| REQUEST_SIGNATURE | "request_signature" | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md b/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md new file mode 100644 index 000000000..d2d3a7c4a --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftCreateResponse.md @@ -0,0 +1,15 @@ + + +# UnclaimedDraftCreateResponse + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `unclaimedDraft`*_required_ | [```UnclaimedDraftResponse```](UnclaimedDraftResponse.md) | | | +| `warnings` | [```List```](WarningResponse.md) | A list of warnings. | | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md b/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md new file mode 100644 index 000000000..8eb306a31 --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftEditAndResendRequest.md @@ -0,0 +1,21 @@ + + +# UnclaimedDraftEditAndResendRequest + + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `clientId`*_required_ | ```String``` | Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app. | | +| `editorOptions` | [```SubEditorOptions```](SubEditorOptions.md) | | | +| `isForEmbeddedSigning` | ```Boolean``` | The request created from this draft will also be signable in embedded mode if set to `true`. | | +| `requesterEmailAddress` | ```String``` | The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used. | | +| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature. | | +| `showProgressStepper` | ```Boolean``` | When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden. | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `testMode` | ```Boolean``` | Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`. | | + + + diff --git a/sdks/java-v1/docs/UnclaimedDraftResponse.md b/sdks/java-v1/docs/UnclaimedDraftResponse.md new file mode 100644 index 000000000..ab470a27d --- /dev/null +++ b/sdks/java-v1/docs/UnclaimedDraftResponse.md @@ -0,0 +1,19 @@ + + +# UnclaimedDraftResponse + +A group of documents that a user can take ownership of via the claim URL. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `signatureRequestId` | ```String``` | The ID of the signature request that is represented by this UnclaimedDraft. | | +| `claimUrl` | ```String``` | The URL to be used to claim this UnclaimedDraft. | | +| `signingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully sign. | | +| `requestingRedirectUrl` | ```String``` | The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.). | | +| `expiresAt` | ```Integer``` | When the link expires. | | +| `testMode` | ```Boolean``` | Whether this is a test draft. Signature requests made from test drafts have no legal value. | | + + + diff --git a/sdks/java-v1/docs/WarningResponse.md b/sdks/java-v1/docs/WarningResponse.md new file mode 100644 index 000000000..50cad9b58 --- /dev/null +++ b/sdks/java-v1/docs/WarningResponse.md @@ -0,0 +1,15 @@ + + +# WarningResponse + +A list of warnings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| `warningMsg`*_required_ | ```String``` | Warning message | | +| `warningName`*_required_ | ```String``` | Warning name | | + + + diff --git a/sdks/java-v1/pom.xml b/sdks/java-v1/pom.xml index 834b4de4d..6c2b97c63 100644 --- a/sdks/java-v1/pom.xml +++ b/sdks/java-v1/pom.xml @@ -5,7 +5,7 @@ dropbox-sign jar dropbox-sign - 1.8-dev + 1.8.1-dev https://github.com/hellosign/dropbox-sign-java Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds! diff --git a/sdks/java-v1/src/main/AndroidManifest.xml b/sdks/java-v1/src/main/AndroidManifest.xml new file mode 100644 index 000000000..f709040ef --- /dev/null +++ b/sdks/java-v1/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java index dbfef4dcc..b758f0a9b 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiClient.java @@ -147,7 +147,7 @@ public ApiClient(Map authMap) { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.8-dev/java"); + setUserAgent("OpenAPI-Generator/1.8.1-dev/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap<>(); diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java new file mode 100644 index 000000000..27476dab3 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiException.java @@ -0,0 +1,128 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import com.dropbox.sign.model.ErrorResponse; +import java.util.List; +import java.util.Map; + +/** API Exception */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + private ErrorResponse errorResponse; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException( + String message, + Throwable throwable, + int code, + Map> responseHeaders, + String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException( + String message, + int code, + Map> responseHeaders, + String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException( + String message, + Throwable throwable, + int code, + Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException( + int code, + String message, + Map> responseHeaders, + String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException( + int code, + String message, + Map> responseHeaders, + String responseBody, + ErrorResponse errorResponse) { + this(code, message, responseHeaders, responseBody); + this.errorResponse = errorResponse; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + public ErrorResponse getErrorResponse() { + return errorResponse; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java new file mode 100644 index 000000000..7f5f3703f --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ApiResponse.java @@ -0,0 +1,73 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + private final int statusCode; + private final Map> headers; + private final T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + /** + * Get the status code + * + * @return status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Get the headers + * + * @return map of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + * Get the data + * + * @return data + */ + public T getData() { + return data; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java index 5e694cee9..5770ea9d5 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java @@ -20,7 +20,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class Configuration { - public static final String VERSION = "1.8-dev"; + public static final String VERSION = "1.8.1-dev"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java new file mode 100644 index 000000000..8d65b8708 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/EventCallbackHelper.java @@ -0,0 +1,63 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import com.dropbox.sign.model.EventCallbackRequest; +import com.dropbox.sign.model.EventCallbackRequestEventMetadata; +import org.apache.commons.codec.digest.HmacAlgorithms; +import org.apache.commons.codec.digest.HmacUtils; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class EventCallbackHelper { + public static final String EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback"; + + public static final String EVENT_TYPE_APP_CALLBACK = "app_callback"; + + private EventCallbackHelper() {} + + /** + * Verify that a callback came from HelloSign.com + * + * @param apiKey + * @param eventCallback + * @return a boolean value indicating whether the callback event is valid + */ + public static boolean isValid(String apiKey, EventCallbackRequest eventCallback) { + return new HmacUtils(HmacAlgorithms.HMAC_SHA_256, apiKey) + .hmacHex( + eventCallback.getEvent().getEventTime() + + eventCallback.getEvent().getEventType()) + .equals(eventCallback.getEvent().getEventHash()); + } + + /** + * Identifies the callback type, one of "account_callback" or "app_callback". + * + *

"app_callback" will always include a value for "reported_for_app_id" + * + * @param eventCallback + */ + public static String getCallbackType(EventCallbackRequest eventCallback) { + EventCallbackRequestEventMetadata metadata = eventCallback.getEvent().getEventMetadata(); + + if (metadata == null + || metadata.getReportedForAppId() == null + || metadata.getReportedForAppId().isEmpty()) { + return EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK; + } + + return EventCallbackHelper.EVENT_TYPE_APP_CALLBACK; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java new file mode 100644 index 000000000..c171040d9 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java @@ -0,0 +1,261 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import com.dropbox.sign.model.*; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.databind.json.JsonMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import javax.ws.rs.core.GenericType; +import javax.ws.rs.ext.ContextResolver; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = + JsonMapper.builder() + .serializationInclusion(JsonInclude.Include.NON_NULL) + .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .defaultDateFormat(new RFC3339DateFormat()) + .addModule(new JavaTimeModule()) + .build(); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { + return mapper; + } + + /** + * Returns the target model class that should be used to deserialize the input data. The + * discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet<>()); + } + return null; + } + + /** Helper class to register the discriminator mappings. */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping( + Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap<>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. This + * function can be invoked for anyOf/oneOf composed models with discriminator mappings. The + * discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + *

The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + */ + public static boolean isInstanceOf( + Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (GenericType childType : descendants.values()) { + if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** A map of discriminators for all model classes. */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** A map of oneOf/anyOf descendants for each model class. */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator( + Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = + new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants( + Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java new file mode 100644 index 000000000..806b9b146 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JavaTimeFormatter.java @@ -0,0 +1,72 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. It's + * generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code + * java8}. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class JavaTimeFormatter { + + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given {@code OffsetDateTime} object into string. + * + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java new file mode 100644 index 000000000..0f3d10c47 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Pair.java @@ -0,0 +1,58 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair(String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java new file mode 100644 index 000000000..3334a5843 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/RFC3339DateFormat.java @@ -0,0 +1,58 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import com.fasterxml.jackson.databind.util.StdDateFormat; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = + new StdDateFormat().withTimeZone(TIMEZONE_Z).withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java new file mode 100644 index 000000000..8d3d8b18c --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerConfiguration.java @@ -0,0 +1,79 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import java.util.Map; + +/** Representing a Server configuration. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for + * substitution in the server's URL template. + */ + public ServerConfiguration( + String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable : this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 + && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException( + "The variable " + + name + + " in the server URL has invalid value " + + value + + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java new file mode 100644 index 000000000..4af52f41e --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/ServerVariable.java @@ -0,0 +1,37 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import java.util.HashSet; + +/** Representing a Server Variable for server URL template substitution. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are + * from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java new file mode 100644 index 000000000..bcc8a0371 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/StringUtil.java @@ -0,0 +1,83 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + * + *

Note: This might be replaced by utility method from commons-lang or guava someday if one + * of those libraries is added as dependency. + * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java new file mode 100644 index 000000000..9f8742a3d --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/ApiKeyAuth.java @@ -0,0 +1,86 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.auth; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java new file mode 100644 index 000000000..9d183342d --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/Authentication.java @@ -0,0 +1,37 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.auth; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException; +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java new file mode 100644 index 000000000..9fd1f753b --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBasicAuth.java @@ -0,0 +1,64 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.auth; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Pair; +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put( + "Authorization", + "Basic " + + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java new file mode 100644 index 000000000..a77c13eda --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/auth/HttpBearerAuth.java @@ -0,0 +1,73 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.auth; + +import com.dropbox.sign.ApiException; +import com.dropbox.sign.Pair; +import java.net.URI; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the + * Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the + * Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams( + List queryParams, + Map headerParams, + Map cookieParams, + String payload, + String method, + URI uri) + throws ApiException { + if (bearerToken == null) { + return; + } + + headerParams.put( + "Authorization", + (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java new file mode 100644 index 000000000..4e340e3f1 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/AbstractOpenApiSchema.java @@ -0,0 +1,147 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Map; +import java.util.Objects; +import javax.ws.rs.core.GenericType; + +/** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() { + return instance; + } + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) { + this.instance = instance; + } + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf + * schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema) object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).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 boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) + && Objects.equals(this.isNullable, a.isNullable) + && Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java new file mode 100644 index 000000000..2749d7769 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetCountryEnum.java @@ -0,0 +1,51 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets FaxLineAreaCodeGetCountryEnum */ +public enum FaxLineAreaCodeGetCountryEnum { + CA("CA"), + + US("US"), + + UK("UK"); + + private String value; + + FaxLineAreaCodeGetCountryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetCountryEnum fromValue(String value) { + for (FaxLineAreaCodeGetCountryEnum b : FaxLineAreaCodeGetCountryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java new file mode 100644 index 000000000..6016ba996 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetProvinceEnum.java @@ -0,0 +1,71 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets FaxLineAreaCodeGetProvinceEnum */ +public enum FaxLineAreaCodeGetProvinceEnum { + AB("AB"), + + BC("BC"), + + MB("MB"), + + NB("NB"), + + NL("NL"), + + NT("NT"), + + NS("NS"), + + NU("NU"), + + ON("ON"), + + PE("PE"), + + QC("QC"), + + SK("SK"), + + YT("YT"); + + private String value; + + FaxLineAreaCodeGetProvinceEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetProvinceEnum fromValue(String value) { + for (FaxLineAreaCodeGetProvinceEnum b : FaxLineAreaCodeGetProvinceEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java new file mode 100644 index 000000000..2e9da9f6b --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/FaxLineAreaCodeGetStateEnum.java @@ -0,0 +1,147 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets FaxLineAreaCodeGetStateEnum */ +public enum FaxLineAreaCodeGetStateEnum { + AK("AK"), + + AL("AL"), + + AR("AR"), + + AZ("AZ"), + + CA("CA"), + + CO("CO"), + + CT("CT"), + + DC("DC"), + + DE("DE"), + + FL("FL"), + + GA("GA"), + + HI("HI"), + + IA("IA"), + + ID("ID"), + + IL("IL"), + + IN("IN"), + + KS("KS"), + + KY("KY"), + + LA("LA"), + + MA("MA"), + + MD("MD"), + + ME("ME"), + + MI("MI"), + + MN("MN"), + + MO("MO"), + + MS("MS"), + + MT("MT"), + + NC("NC"), + + ND("ND"), + + NE("NE"), + + NH("NH"), + + NJ("NJ"), + + NM("NM"), + + NV("NV"), + + NY("NY"), + + OH("OH"), + + OK("OK"), + + OR("OR"), + + PA("PA"), + + RI("RI"), + + SC("SC"), + + SD("SD"), + + TN("TN"), + + TX("TX"), + + UT("UT"), + + VA("VA"), + + VT("VT"), + + WA("WA"), + + WI("WI"), + + WV("WV"), + + WY("WY"); + + private String value; + + FaxLineAreaCodeGetStateEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FaxLineAreaCodeGetStateEnum fromValue(String value) { + for (FaxLineAreaCodeGetStateEnum b : FaxLineAreaCodeGetStateEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java new file mode 100644 index 000000000..356385d32 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseCustomFieldTypeEnum.java @@ -0,0 +1,50 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets SignatureRequestResponseCustomFieldTypeEnum */ +public enum SignatureRequestResponseCustomFieldTypeEnum { + TEXT("text"), + + CHECKBOX("checkbox"); + + private String value; + + SignatureRequestResponseCustomFieldTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SignatureRequestResponseCustomFieldTypeEnum fromValue(String value) { + for (SignatureRequestResponseCustomFieldTypeEnum b : + SignatureRequestResponseCustomFieldTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java new file mode 100644 index 000000000..35e89e061 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SignatureRequestResponseDataTypeEnum.java @@ -0,0 +1,64 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets SignatureRequestResponseDataTypeEnum */ +public enum SignatureRequestResponseDataTypeEnum { + TEXT("text"), + + CHECKBOX("checkbox"), + + DATE_SIGNED("date_signed"), + + DROPDOWN("dropdown"), + + INITIALS("initials"), + + RADIO("radio"), + + SIGNATURE("signature"), + + TEXT_MERGE("text-merge"), + + CHECKBOX_MERGE("checkbox-merge"); + + private String value; + + SignatureRequestResponseDataTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SignatureRequestResponseDataTypeEnum fromValue(String value) { + for (SignatureRequestResponseDataTypeEnum b : + SignatureRequestResponseDataTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java new file mode 100644 index 000000000..a4e55c3f5 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentFontEnum.java @@ -0,0 +1,77 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets SubFormFieldsPerDocumentFontEnum */ +public enum SubFormFieldsPerDocumentFontEnum { + HELVETICA("helvetica"), + + ARIAL("arial"), + + COURIER("courier"), + + CALIBRI("calibri"), + + CAMBRIA("cambria"), + + GEORGIA("georgia"), + + TIMES("times"), + + TREBUCHET("trebuchet"), + + VERDANA("verdana"), + + ROBOTO("roboto"), + + ROBOTO_MONO("robotoMono"), + + NOTO_SANS("notoSans"), + + NOTO_SERIF("notoSerif"), + + NOTO_CJK_JP_REGULAR("notoCJK-JP-Regular"), + + NOTO_HEBREW_REGULAR("notoHebrew-Regular"), + + NOTO_SAN_THAI_MERGED("notoSanThaiMerged"); + + private String value; + + SubFormFieldsPerDocumentFontEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SubFormFieldsPerDocumentFontEnum fromValue(String value) { + for (SubFormFieldsPerDocumentFontEnum b : SubFormFieldsPerDocumentFontEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java new file mode 100644 index 000000000..7b3d7e5d3 --- /dev/null +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldsPerDocumentTypeEnum.java @@ -0,0 +1,65 @@ +/* + * Dropbox Sign API + * Dropbox Sign v3 API + * + * The version of the OpenAPI document: 3.0.0 + * Contact: apisupport@hellosign.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.dropbox.sign.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets SubFormFieldsPerDocumentTypeEnum */ +public enum SubFormFieldsPerDocumentTypeEnum { + CHECKBOX("checkbox"), + + CHECKBOX_MERGE("checkbox-merge"), + + DATE_SIGNED("date_signed"), + + DROPDOWN("dropdown"), + + HYPERLINK("hyperlink"), + + INITIALS("initials"), + + SIGNATURE("signature"), + + RADIO("radio"), + + TEXT("text"), + + TEXT_MERGE("text-merge"); + + private String value; + + SubFormFieldsPerDocumentTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SubFormFieldsPerDocumentTypeEnum fromValue(String value) { + for (SubFormFieldsPerDocumentTypeEnum b : SubFormFieldsPerDocumentTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} diff --git a/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache b/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache deleted file mode 100644 index c8196cfef..000000000 --- a/sdks/java-v1/templates/RFC3339InstantDeserializer.mustache +++ /dev/null @@ -1,89 +0,0 @@ -{{>licenseInfo}} -package {{invokerPackage}}; - -import java.io.IOException; -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.time.format.DateTimeFormatter; -import java.time.temporal.Temporal; -import java.time.temporal.TemporalAccessor; -import java.util.function.BiFunction; -import java.util.function.Function; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature; -import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; - -{{>generatedAnnotation}} -public class RFC3339InstantDeserializer extends InstantDeserializer { - - private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault(); - private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS - = JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault(); - - public static final RFC3339InstantDeserializer INSTANT = new RFC3339InstantDeserializer<>( - Instant.class, DateTimeFormatter.ISO_INSTANT, - Instant::from, - a -> Instant.ofEpochMilli( a.value ), - a -> Instant.ofEpochSecond( a.integer, a.fraction ), - null, - true, // yes, replace zero offset with Z - DEFAULT_NORMALIZE_ZONE_ID, - DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS - ); - - public static final RFC3339InstantDeserializer OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>( - OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, - OffsetDateTime::from, - a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), - a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), - (d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ? - d : - d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ), - true, // yes, replace zero offset with Z - DEFAULT_NORMALIZE_ZONE_ID, - DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS - ); - - public static final RFC3339InstantDeserializer ZONED_DATE_TIME = new RFC3339InstantDeserializer<>( - ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, - ZonedDateTime::from, - a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ), - a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ), - ZonedDateTime::withZoneSameInstant, - false, // keep zero offset and Z separate since zones explicitly supported - DEFAULT_NORMALIZE_ZONE_ID, - DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS - ); - - protected RFC3339InstantDeserializer( - Class supportedType, - DateTimeFormatter formatter, - Function parsedToValue, - Function fromMilliseconds, - Function fromNanoseconds, - BiFunction adjust, - boolean replaceZeroOffsetAsZ, - boolean normalizeZoneId, - boolean readNumericStringsAsTimestamp) { - super( - supportedType, - formatter, - parsedToValue, - fromMilliseconds, - fromNanoseconds, - adjust, - replaceZeroOffsetAsZ, - normalizeZoneId, - readNumericStringsAsTimestamp - ); - } - - @Override - protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException { - return super._fromString(p, ctxt, string0.replace( ' ', 'T' )); - } -} \ No newline at end of file diff --git a/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache b/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache deleted file mode 100644 index 7cc80277a..000000000 --- a/sdks/java-v1/templates/RFC3339JavaTimeModule.mustache +++ /dev/null @@ -1,20 +0,0 @@ -{{>licenseInfo}} -package {{invokerPackage}}; - -import java.time.Instant; -import java.time.OffsetDateTime; -import java.time.ZonedDateTime; - -import com.fasterxml.jackson.databind.module.SimpleModule; - -{{>generatedAnnotation}} -public class RFC3339JavaTimeModule extends SimpleModule { - - public RFC3339JavaTimeModule() { - super("RFC3339JavaTimeModule"); - - addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT); - addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME); - addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME); - } -} diff --git a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache index 82b03eee1..23b435728 100644 --- a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache @@ -1396,11 +1396,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if ("".equals(entity.getEntity())) { response = invocationBuilder.method("DELETE"); } else { -<<<<<<< HEAD - response = invocationBuilder.method("DELETE", entity); -======= response = invocationBuilder.method("DELETE", entity); ->>>>>>> java-v1-openapi-generator-upgrade-2 } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); diff --git a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache index 69b9572db..12b5b1326 100644 --- a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache @@ -32,17 +32,10 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) -<<<<<<< HEAD -{{^useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} -======= {{^useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) {{/useCustomTemplateCode}} {{#useCustomTemplateCode}} ->>>>>>> java-v1-openapi-generator-upgrade-2 .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) {{/useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) @@ -57,7 +50,9 @@ public class JSON implements ContextResolver { {{#openApiNullable}} .addModule(new JsonNullableModule()) {{/openApiNullable}} + {{^useCustomTemplateCode}} .addModule(new RFC3339JavaTimeModule()) + {{/useCustomTemplateCode}} .build(); } diff --git a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache index 4c8e8be78..d3ea8ff60 100644 --- a/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/build.gradle.mustache @@ -232,12 +232,9 @@ ext { {{#useReflectionEqualsHashCode}} commons_lang3_version = "3.17.0" {{/useReflectionEqualsHashCode}} -<<<<<<< HEAD -======= {{#useCustomTemplateCode}} mockito_version = "3.12.4" {{/useCustomTemplateCode}} ->>>>>>> java-v1-openapi-generator-upgrade-2 } dependencies { diff --git a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache index f9fea6d8b..c0716915e 100644 --- a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache @@ -280,15 +280,9 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ -<<<<<<< HEAD - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } -======= public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } ->>>>>>> java-v1-openapi-generator-upgrade-2 {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} diff --git a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache index df69e7250..a73f86943 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pojo.mustache @@ -92,8 +92,6 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{>nullable_var_annotations}} -<<<<<<< HEAD -======= {{^useCustomTemplateCode}} private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/useCustomTemplateCode}} @@ -102,7 +100,6 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens private {{{datatypeWithEnum}}} {{name}}{{#required}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/required}}{{^required}} = null{{/required}}; {{/isContainer}} {{^isContainer}} ->>>>>>> java-v1-openapi-generator-upgrade-2 private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; {{/isContainer}} {{/useCustomTemplateCode}} diff --git a/sdks/java-v1/templates/libraries/native/api.mustache b/sdks/java-v1/templates/libraries/native/api.mustache index 151f9f3fd..874c1a406 100644 --- a/sdks/java-v1/templates/libraries/native/api.mustache +++ b/sdks/java-v1/templates/libraries/native/api.mustache @@ -284,13 +284,8 @@ public class {{classname}} { {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} if (localVarResponse.body() == null) { return new ApiResponse<{{{returnType}}}>( -<<<<<<< HEAD - localVarResponse.statusCode(), - localVarResponse.headers().map(), -======= localVarResponse.statusCode(), localVarResponse.headers().map(), ->>>>>>> java-v1-openapi-generator-upgrade-2 null ); } @@ -302,17 +297,6 @@ public class {{classname}} { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) -<<<<<<< HEAD - ); - {{/returnType}} - {{^returnType}} - return new ApiResponse<{{{returnType}}}>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), - null - ); - {{/returnType}} -======= ); {{/returnType}} {{^returnType}} @@ -322,7 +306,6 @@ public class {{classname}} { null ); {{/returnType}} ->>>>>>> java-v1-openapi-generator-upgrade-2 {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} diff --git a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache index 6c4241ac6..05efcd14b 100644 --- a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache @@ -115,16 +115,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this.objectMapper = mapper.copy(); this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper)); this.dateFormat = format; -<<<<<<< HEAD - this.objectMapper = createDefaultObjectMapper(format); - this.init(); -======= this.init(); } private ApiClient(RestClient restClient, DateFormat format) { this(restClient, createDefaultObjectMapper(format), format); ->>>>>>> java-v1-openapi-generator-upgrade-2 } private ApiClient(RestClient restClient, DateFormat format) { From d44f13a73d8a8e777d2a7c14ba8ae2edb42fcc83 Mon Sep 17 00:00:00 2001 From: Monica Auriemma Date: Fri, 21 Mar 2025 18:45:27 -0400 Subject: [PATCH 5/6] couple more --- sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache | 4 ---- .../templates/libraries/jersey3/oneof_model.mustache | 6 ------ sdks/java-v1/templates/libraries/jersey3/pojo.mustache | 4 ---- 3 files changed, 14 deletions(-) diff --git a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache index 7dcb3f440..a2d6dd380 100644 --- a/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/ApiClient.mustache @@ -1359,11 +1359,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if ("".equals(entity.getEntity())) { response = invocationBuilder.method("DELETE"); } else { -<<<<<<< HEAD - response = invocationBuilder.method("DELETE", entity); -======= response = invocationBuilder.method("DELETE", entity); ->>>>>>> java-v1-openapi-generator-upgrade-2 } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); diff --git a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache index f9fea6d8b..c0716915e 100644 --- a/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/oneof_model.mustache @@ -280,15 +280,9 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ -<<<<<<< HEAD - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { - return ({{{dataType}}})super.getActualInstance(); - } -======= public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); } ->>>>>>> java-v1-openapi-generator-upgrade-2 {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} diff --git a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache index 57c00933f..8f454c429 100644 --- a/sdks/java-v1/templates/libraries/jersey3/pojo.mustache +++ b/sdks/java-v1/templates/libraries/jersey3/pojo.mustache @@ -82,11 +82,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens @Deprecated {{/deprecated}} {{>nullable_var_annotations}} -<<<<<<< HEAD - private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; -======= private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; ->>>>>>> java-v1-openapi-generator-upgrade-2 {{/vendorExtensions.x-is-jackson-optional-nullable}} {{/vars}} From ce7445290d74ba3f1a10f44757a0325af6f232fa Mon Sep 17 00:00:00 2001 From: Juan Treminio Date: Mon, 24 Mar 2025 13:10:14 -0500 Subject: [PATCH 6/6] Adds missing diff --- sdks/java-v1/bin/copy-constants.php | 64 ++++++++++ sdks/java-v1/openapi-config.yaml | 1 + sdks/java-v1/run-build | 3 + .../java/com/dropbox/sign/Configuration.java | 29 +---- .../src/main/java/com/dropbox/sign/JSON.java | 1 - .../java/com/dropbox/sign/api/AccountApi.java | 20 ++-- .../java/com/dropbox/sign/api/ApiAppApi.java | 20 ++-- .../com/dropbox/sign/api/BulkSendJobApi.java | 8 +- .../com/dropbox/sign/api/EmbeddedApi.java | 8 +- .../java/com/dropbox/sign/api/FaxApi.java | 20 ++-- .../java/com/dropbox/sign/api/FaxLineApi.java | 28 ++--- .../java/com/dropbox/sign/api/OAuthApi.java | 8 +- .../java/com/dropbox/sign/api/ReportApi.java | 4 +- .../dropbox/sign/api/SignatureRequestApi.java | 112 +++++++++--------- .../java/com/dropbox/sign/api/TeamApi.java | 44 +++---- .../com/dropbox/sign/api/TemplateApi.java | 48 ++++---- .../dropbox/sign/api/UnclaimedDraftApi.java | 28 ++--- .../sign/model/SubFormFieldRuleAction.java | 4 +- sdks/java-v1/templates/Configuration.mustache | 38 ++---- .../apache-httpclient/ApiClient.mustache | 3 +- .../libraries/feign/ApiClient.mustache | 1 - .../libraries/jersey2/ApiClient.mustache | 2 +- .../templates/libraries/jersey2/JSON.mustache | 11 -- .../templates/libraries/jersey2/api.mustache | 15 --- .../libraries/jersey2/oneof_model.mustache | 4 +- .../templates/libraries/jersey2/pom.mustache | 3 - .../libraries/microprofile/enumClass.mustache | 2 +- .../microprofile/enumOuterClass.mustache | 2 +- .../libraries/native/ApiClient.mustache | 1 - .../templates/libraries/native/api.mustache | 10 +- .../libraries/native/modelEnum.mustache | 2 +- .../libraries/okhttp-gson/modelEnum.mustache | 2 +- .../okhttp-gson/modelInnerEnum.mustache | 2 +- .../libraries/restclient/ApiClient.mustache | 16 --- .../libraries/restclient/api.mustache | 13 +- .../libraries/webclient/ApiClient.mustache | 13 -- .../libraries/webclient/api.mustache | 13 +- sdks/java-v1/templates/modelEnum.mustache | 2 +- .../java-v1/templates/modelInnerEnum.mustache | 2 +- 39 files changed, 276 insertions(+), 331 deletions(-) create mode 100755 sdks/java-v1/bin/copy-constants.php diff --git a/sdks/java-v1/bin/copy-constants.php b/sdks/java-v1/bin/copy-constants.php new file mode 100755 index 000000000..70ec3083c --- /dev/null +++ b/sdks/java-v1/bin/copy-constants.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +run(); \ No newline at end of file diff --git a/sdks/java-v1/openapi-config.yaml b/sdks/java-v1/openapi-config.yaml index 9365d0179..db4935dbf 100644 --- a/sdks/java-v1/openapi-config.yaml +++ b/sdks/java-v1/openapi-config.yaml @@ -26,6 +26,7 @@ additionalProperties: licenseUrl: https://www.opensource.org/licenses/mit-license.php useCustomTemplateCode: true licenseCopyrightYear: 2024 + failOnUnknownProperties: false files: dropbox-EventCallbackHelper.mustache: templateType: SupportingFiles diff --git a/sdks/java-v1/run-build b/sdks/java-v1/run-build index 6a103f861..99e100a84 100755 --- a/sdks/java-v1/run-build +++ b/sdks/java-v1/run-build @@ -47,6 +47,9 @@ docker run --rm \ -w "${WORKING_DIR}" \ perl bash ./bin/scan_for +printf "Adding old-style constant names ...\n" +bash "${DIR}/bin/php" ./bin/copy-constants.php + # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java index 5770ea9d5..7bdd70522 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java @@ -12,18 +12,13 @@ package com.dropbox.sign; -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.12.0") public class Configuration { public static final String VERSION = "1.8.1-dev"; - private static final AtomicReference defaultApiClient = new AtomicReference<>(); - private static volatile Supplier apiClientFactory = ApiClient::new; + private static volatile ApiClient defaultApiClient = new ApiClient(); /** * Get the default API client, which would be used when creating API instances without providing @@ -32,18 +27,7 @@ public class Configuration { * @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; + return defaultApiClient; } /** @@ -53,13 +37,6 @@ public static ApiClient getDefaultApiClient() { * @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); + defaultApiClient = apiClient; } - - private Configuration() {} } diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java index c171040d9..cd4a199ef 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java @@ -12,7 +12,6 @@ package com.dropbox.sign; -import com.dropbox.sign.model.*; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.json.JsonMapper; diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java index 8af822627..836bd4bf4 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java @@ -51,7 +51,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified + * Create Account Creates a new Dropbox Sign Account that is associated with the specified * `email_address`. * * @param accountCreateRequest (required) @@ -71,7 +71,7 @@ public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateReq } /** - * Create Account. Creates a new Dropbox Sign Account that is associated with the specified + * Create Account Creates a new Dropbox Sign Account that is associated with the specified * `email_address`. * * @param accountCreateRequest (required) @@ -124,7 +124,7 @@ public ApiResponse accountCreateWithHttpInfo( } /** - * Get Account. Returns the properties and settings of your Account. + * Get Account Returns the properties and settings of your Account. * * @param accountId `account_id` or `email_address` is required. If both are * provided, the account id prevails. The ID of the Account. (optional) @@ -185,7 +185,7 @@ public ApiResponse accountGetWithHttpInfo(String accountId) } /** - * Get Account. Returns the properties and settings of your Account. + * Get Account Returns the properties and settings of your Account. * * @param accountId `account_id` or `email_address` is required. If both are * provided, the account id prevails. The ID of the Account. (optional) @@ -235,8 +235,8 @@ public ApiResponse accountGetWithHttpInfo( } /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * Update Account Updates the properties and settings of your Account. Currently only allows for + * updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * * @param accountUpdateRequest (required) * @return AccountGetResponse @@ -255,8 +255,8 @@ public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateReques } /** - * Update Account. Updates the properties and settings of your Account. Currently only allows - * for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. + * Update Account Updates the properties and settings of your Account. Currently only allows for + * updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale. * * @param accountUpdateRequest (required) * @return ApiResponse<AccountGetResponse> @@ -308,7 +308,7 @@ public ApiResponse accountUpdateWithHttpInfo( } /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. + * Verify Account Verifies whether an Dropbox Sign Account exists for the given email address. * * @param accountVerifyRequest (required) * @return AccountVerifyResponse @@ -327,7 +327,7 @@ public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyReq } /** - * Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address. + * Verify Account Verifies whether an Dropbox Sign Account exists for the given email address. * * @param accountVerifyRequest (required) * @return ApiResponse<AccountVerifyResponse> diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java index d0666ebd0..b74007e35 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java @@ -49,7 +49,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create API App. Creates a new API App. + * Create API App Creates a new API App. * * @param apiAppCreateRequest (required) * @return ApiAppGetResponse @@ -68,7 +68,7 @@ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest) } /** - * Create API App. Creates a new API App. + * Create API App Creates a new API App. * * @param apiAppCreateRequest (required) * @return ApiResponse<ApiAppGetResponse> @@ -120,7 +120,7 @@ public ApiResponse apiAppCreateWithHttpInfo( } /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. + * Delete API App Deletes an API App. Can only be invoked for apps you own. * * @param clientId The client id of the API App to delete. (required) * @throws ApiException if fails to make API call @@ -137,7 +137,7 @@ public void apiAppDelete(String clientId) throws ApiException { } /** - * Delete API App. Deletes an API App. Can only be invoked for apps you own. + * Delete API App Deletes an API App. Can only be invoked for apps you own. * * @param clientId The client id of the API App to delete. (required) * @return ApiResponse<Void> @@ -187,7 +187,7 @@ public ApiResponse apiAppDeleteWithHttpInfo(String clientId) throws ApiExc } /** - * Get API App. Returns an object with information about an API App. + * Get API App Returns an object with information about an API App. * * @param clientId The client id of the API App to retrieve. (required) * @return ApiAppGetResponse @@ -205,7 +205,7 @@ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException { } /** - * Get API App. Returns an object with information about an API App. + * Get API App Returns an object with information about an API App. * * @param clientId The client id of the API App to retrieve. (required) * @return ApiResponse<ApiAppGetResponse> @@ -257,7 +257,7 @@ public ApiResponse apiAppGetWithHttpInfo(String clientId) } /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team + * List API Apps Returns a list of API Apps that are accessible by you. If you are on a team * with an Admin or Developer role, this list will include apps owned by teammates. * * @param page Which page number of the API App List to return. Defaults to `1`. @@ -318,7 +318,7 @@ public ApiResponse apiAppListWithHttpInfo(Integer page) } /** - * List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team + * List API Apps Returns a list of API Apps that are accessible by you. If you are on a team * with an Admin or Developer role, this list will include apps owned by teammates. * * @param page Which page number of the API App List to return. Defaults to `1`. @@ -375,7 +375,7 @@ public ApiResponse apiAppListWithHttpInfo(Integer page, Inte } /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the + * Update API App Updates an existing API App. Can only be invoked for apps you own. Only the * fields you provide will be updated. If you wish to clear an existing optional field, provide * an empty string. * @@ -397,7 +397,7 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp } /** - * Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the + * Update API App Updates an existing API App. Can only be invoked for apps you own. Only the * fields you provide will be updated. If you wish to clear an existing optional field, provide * an empty string. * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java index 77eaa0a7c..f928d5c26 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java @@ -47,7 +47,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified + * Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified * by the `bulk_send_job_id` parameter. * * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) @@ -112,7 +112,7 @@ public ApiResponse bulkSendJobGetWithHttpInfo( } /** - * Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified + * Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified * by the `bulk_send_job_id` parameter. * * @param bulkSendJobId The id of the BulkSendJob to retrieve. (required) @@ -184,7 +184,7 @@ public ApiResponse bulkSendJobGetWithHttpInfo( } /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. + * List Bulk Send Jobs Returns a list of BulkSendJob that you can access. * * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. * (optional, default to 1) @@ -245,7 +245,7 @@ public ApiResponse bulkSendJobListWithHttpInfo(Integer } /** - * List Bulk Send Jobs. Returns a list of BulkSendJob that you can access. + * List Bulk Send Jobs Returns a list of BulkSendJob that you can access. * * @param page Which page number of the BulkSendJob List to return. Defaults to `1`. * (optional, default to 1) diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java index 57d058f9e..e89671c3d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java @@ -46,7 +46,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that + * Get Embedded Template Edit URL Retrieves an embedded object containing a template url that * can be opened in an iFrame. Note that only templates created via the embedded template * process are available to be edited with this endpoint. * @@ -68,7 +68,7 @@ public EmbeddedEditUrlResponse embeddedEditUrl( } /** - * Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that + * Get Embedded Template Edit URL Retrieves an embedded object containing a template url that * can be opened in an iFrame. Note that only templates created via the embedded template * process are available to be edited with this endpoint. * @@ -134,7 +134,7 @@ public ApiResponse embeddedEditUrlWithHttpInfo( } /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be + * Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be * opened in an iFrame. Note that templates created via the embedded template process will only * be accessible through the API. * @@ -154,7 +154,7 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc } /** - * Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be + * Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be * opened in an iFrame. Note that templates created via the embedded template process will only * be accessible through the API. * diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java index f8454702c..259f1117d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxApi.java @@ -49,7 +49,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Delete Fax. Deletes the specified Fax from the system + * Delete Fax Deletes the specified Fax from the system * * @param faxId Fax ID (required) * @throws ApiException if fails to make API call @@ -66,7 +66,7 @@ public void faxDelete(String faxId) throws ApiException { } /** - * Delete Fax. Deletes the specified Fax from the system + * Delete Fax Deletes the specified Fax from the system * * @param faxId Fax ID (required) * @return ApiResponse<Void> @@ -115,7 +115,7 @@ public ApiResponse faxDeleteWithHttpInfo(String faxId) throws ApiException } /** - * Download Fax Files. Downloads files associated with a Fax + * Download Fax Files Downloads files associated with a Fax * * @param faxId Fax ID (required) * @return File @@ -133,7 +133,7 @@ public File faxFiles(String faxId) throws ApiException { } /** - * Download Fax Files. Downloads files associated with a Fax + * Download Fax Files Downloads files associated with a Fax * * @param faxId Fax ID (required) * @return ApiResponse<File> @@ -184,7 +184,7 @@ public ApiResponse faxFilesWithHttpInfo(String faxId) throws ApiException } /** - * Get Fax. Returns information about a Fax + * Get Fax Returns information about a Fax * * @param faxId Fax ID (required) * @return FaxGetResponse @@ -202,7 +202,7 @@ public FaxGetResponse faxGet(String faxId) throws ApiException { } /** - * Get Fax. Returns information about a Fax + * Get Fax Returns information about a Fax * * @param faxId Fax ID (required) * @return ApiResponse<FaxGetResponse> @@ -252,7 +252,7 @@ public ApiResponse faxGetWithHttpInfo(String faxId) throws ApiEx } /** - * Lists Faxes. Returns properties of multiple Faxes + * Lists Faxes Returns properties of multiple Faxes * * @param page Which page number of the Fax List to return. Defaults to `1`. * (optional, default to 1) @@ -311,7 +311,7 @@ public ApiResponse faxListWithHttpInfo(Integer page) throws Api } /** - * Lists Faxes. Returns properties of multiple Faxes + * Lists Faxes Returns properties of multiple Faxes * * @param page Which page number of the Fax List to return. Defaults to `1`. * (optional, default to 1) @@ -366,7 +366,7 @@ public ApiResponse faxListWithHttpInfo(Integer page, Integer pa } /** - * Send Fax. Creates and sends a new Fax with the submitted file(s) + * Send Fax Creates and sends a new Fax with the submitted file(s) * * @param faxSendRequest (required) * @return FaxGetResponse @@ -384,7 +384,7 @@ public FaxGetResponse faxSend(FaxSendRequest faxSendRequest) throws ApiException } /** - * Send Fax. Creates and sends a new Fax with the submitted file(s) + * Send Fax Creates and sends a new Fax with the submitted file(s) * * @param faxSendRequest (required) * @return ApiResponse<FaxGetResponse> diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java index d412a3c6f..346232fe7 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/FaxLineApi.java @@ -52,7 +52,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add Fax Line User. Grants a user access to the specified Fax Line. + * Add Fax Line User Grants a user access to the specified Fax Line. * * @param faxLineAddUserRequest (required) * @return FaxLineResponse @@ -71,7 +71,7 @@ public FaxLineResponse faxLineAddUser(FaxLineAddUserRequest faxLineAddUserReques } /** - * Add Fax Line User. Grants a user access to the specified Fax Line. + * Add Fax Line User Grants a user access to the specified Fax Line. * * @param faxLineAddUserRequest (required) * @return ApiResponse<FaxLineResponse> @@ -122,7 +122,7 @@ public ApiResponse faxLineAddUserWithHttpInfo( } /** - * Get Available Fax Line Area Codes. Returns a list of available area codes for a given + * Get Available Fax Line Area Codes Returns a list of available area codes for a given * state/province and city * * @param country Filter area codes by country (required) @@ -210,7 +210,7 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( } /** - * Get Available Fax Line Area Codes. Returns a list of available area codes for a given + * Get Available Fax Line Area Codes Returns a list of available area codes for a given * state/province and city * * @param country Filter area codes by country (required) @@ -270,7 +270,7 @@ public ApiResponse faxLineAreaCodeGetWithHttpInfo( } /** - * Purchase Fax Line. Purchases a new Fax Line + * Purchase Fax Line Purchases a new Fax Line * * @param faxLineCreateRequest (required) * @return FaxLineResponse @@ -289,7 +289,7 @@ public FaxLineResponse faxLineCreate(FaxLineCreateRequest faxLineCreateRequest) } /** - * Purchase Fax Line. Purchases a new Fax Line + * Purchase Fax Line Purchases a new Fax Line * * @param faxLineCreateRequest (required) * @return ApiResponse<FaxLineResponse> @@ -340,7 +340,7 @@ public ApiResponse faxLineCreateWithHttpInfo( } /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. + * Delete Fax Line Deletes the specified Fax Line from the subscription. * * @param faxLineDeleteRequest (required) * @throws ApiException if fails to make API call @@ -357,7 +357,7 @@ public void faxLineDelete(FaxLineDeleteRequest faxLineDeleteRequest) throws ApiE } /** - * Delete Fax Line. Deletes the specified Fax Line from the subscription. + * Delete Fax Line Deletes the specified Fax Line from the subscription. * * @param faxLineDeleteRequest (required) * @return ApiResponse<Void> @@ -407,7 +407,7 @@ public ApiResponse faxLineDeleteWithHttpInfo(FaxLineDeleteRequest faxLineD } /** - * Get Fax Line. Returns the properties and settings of a Fax Line. + * Get Fax Line Returns the properties and settings of a Fax Line. * * @param number The Fax Line number (required) * @return FaxLineResponse @@ -425,7 +425,7 @@ public FaxLineResponse faxLineGet(String number) throws ApiException { } /** - * Get Fax Line. Returns the properties and settings of a Fax Line. + * Get Fax Line Returns the properties and settings of a Fax Line. * * @param number The Fax Line number (required) * @return ApiResponse<FaxLineResponse> @@ -475,7 +475,7 @@ public ApiResponse faxLineGetWithHttpInfo(String number) throws } /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. + * List Fax Lines Returns the properties and settings of multiple Fax Lines. * * @param accountId Account ID (optional) * @param page Which page number of the Fax Line List to return. Defaults to `1`. @@ -588,7 +588,7 @@ public ApiResponse faxLineListWithHttpInfo( } /** - * List Fax Lines. Returns the properties and settings of multiple Fax Lines. + * List Fax Lines Returns the properties and settings of multiple Fax Lines. * * @param accountId Account ID (optional) * @param page Which page number of the Fax Line List to return. Defaults to `1`. @@ -650,7 +650,7 @@ public ApiResponse faxLineListWithHttpInfo( } /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line + * Remove Fax Line Access Removes a user's access to the specified Fax Line * * @param faxLineRemoveUserRequest (required) * @return FaxLineResponse @@ -669,7 +669,7 @@ public FaxLineResponse faxLineRemoveUser(FaxLineRemoveUserRequest faxLineRemoveU } /** - * Remove Fax Line Access. Removes a user's access to the specified Fax Line + * Remove Fax Line Access Removes a user's access to the specified Fax Line * * @param faxLineRemoveUserRequest (required) * @return ApiResponse<FaxLineResponse> diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java index 3246b587d..4286c030c 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/OAuthApi.java @@ -45,7 +45,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need + * OAuth Token Generate Once you have retrieved the code from the user callback, you will need * to exchange it for an access token via a backend call. * * @param oauthTokenGenerateRequest (required) @@ -65,7 +65,7 @@ public OAuthTokenResponse oauthTokenGenerate( } /** - * OAuth Token Generate. Once you have retrieved the code from the user callback, you will need + * OAuth Token Generate Once you have retrieved the code from the user callback, you will need * to exchange it for an access token via a backend call. * * @param oauthTokenGenerateRequest (required) @@ -117,7 +117,7 @@ public ApiResponse oauthTokenGenerateWithHttpInfo( } /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one + * OAuth Token Refresh Access tokens are only valid for a given period of time (typically one * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see * `expires_in`), along with a refresh token that can be used to acquire a new access * token after the current one has expired. @@ -139,7 +139,7 @@ public OAuthTokenResponse oauthTokenRefresh(OAuthTokenRefreshRequest oauthTokenR } /** - * OAuth Token Refresh. Access tokens are only valid for a given period of time (typically one + * OAuth Token Refresh Access tokens are only valid for a given period of time (typically one * hour) for security reasons. Whenever acquiring an new access token its TTL is also given (see * `expires_in`), along with a refresh token that can be used to acquire a new access * token after the current one has expired. diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java index a4cec6b52..32c6bea91 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/ReportApi.java @@ -44,7 +44,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been + * Create Report Request the creation of one or more report(s). When the report(s) have been * generated, you will receive an email (one per requested report type) containing a link to * download the report as a CSV file. The requested date range may be up to 12 months in * duration, and `start_date` must not be more than 10 years in the past. @@ -66,7 +66,7 @@ public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest } /** - * Create Report. Request the creation of one or more report(s). When the report(s) have been + * Create Report Request the creation of one or more report(s). When the report(s) have been * generated, you will receive an email (one per requested report type) containing a link to * download the report as a CSV file. The requested date range may be up to 12 months in * duration, and `start_date` must not be more than 10 years in the past. diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java index 5be27cb1b..e8e83e549 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/SignatureRequestApi.java @@ -63,7 +63,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests + * Embedded Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests * in bulk based off of the provided Template(s) specified with the `template_ids` * parameter to be signed in an embedded iFrame. These embedded signature requests can only be * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox @@ -90,7 +90,7 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( } /** - * Embedded Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests + * Embedded Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests * in bulk based off of the provided Template(s) specified with the `template_ids` * parameter to be signed in an embedded iFrame. These embedded signature requests can only be * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox @@ -151,7 +151,7 @@ public BulkSendJobSendResponse signatureRequestBulkCreateEmbeddedWithTemplate( } /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk + * Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests in bulk * based off of the provided Template(s) specified with the `template_ids` parameter. * **NOTE:** Only available for Standard plan and higher. * @@ -175,7 +175,7 @@ public BulkSendJobSendResponse signatureRequestBulkSendWithTemplate( } /** - * Bulk Send with Template. Creates BulkSendJob which sends up to 250 SignatureRequests in bulk + * Bulk Send with Template Creates BulkSendJob which sends up to 250 SignatureRequests in bulk * based off of the provided Template(s) specified with the `template_ids` parameter. * **NOTE:** Only available for Standard plan and higher. * @@ -231,7 +231,7 @@ public ApiResponse signatureRequestBulkSendWithTemplate } /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is + * Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is * **not reversible**. The request will be canceled and signers will no longer be able to sign. * If they try to access the signature request they will receive a HTTP 410 status code * indicating that the resource has been deleted. Cancelation is asynchronous and a successful @@ -265,7 +265,7 @@ public void signatureRequestCancel(String signatureRequestId) throws ApiExceptio } /** - * Cancel Incomplete Signature Request. Cancels an incomplete signature request. This action is + * Cancel Incomplete Signature Request Cancels an incomplete signature request. This action is * **not reversible**. The request will be canceled and signers will no longer be able to sign. * If they try to access the signature request they will receive a HTTP 410 status code * indicating that the resource has been deleted. Cancelation is asynchronous and a successful @@ -337,12 +337,12 @@ public ApiResponse signatureRequestCancelWithHttpInfo(String signatureRequ } /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. + * Create Embedded Signature Request Creates a new SignatureRequest with the submitted documents + * to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature + * page will be affixed where all signers will be required to add their signature, signifying + * their agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. * * @param signatureRequestCreateEmbeddedRequest (required) * @return SignatureRequestGetResponse @@ -363,12 +363,12 @@ public SignatureRequestGetResponse signatureRequestCreateEmbedded( } /** - * Create Embedded Signature Request. Creates a new SignatureRequest with the submitted - * documents to be signed in an embedded iFrame. If form_fields_per_document is not specified, a - * signature page will be affixed where all signers will be required to add their signature, - * signifying their agreement to all contained documents. Note that embedded signature requests - * can only be signed in embedded iFrames whereas normal signature requests can only be signed - * on Dropbox Sign. + * Create Embedded Signature Request Creates a new SignatureRequest with the submitted documents + * to be signed in an embedded iFrame. If form_fields_per_document is not specified, a signature + * page will be affixed where all signers will be required to add their signature, signifying + * their agreement to all contained documents. Note that embedded signature requests can only be + * signed in embedded iFrames whereas normal signature requests can only be signed on Dropbox + * Sign. * * @param signatureRequestCreateEmbeddedRequest (required) * @return ApiResponse<SignatureRequestGetResponse> @@ -422,7 +422,7 @@ public ApiResponse signatureRequestCreateEmbeddedWi } /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the + * Create Embedded Signature Request with Template Creates a new SignatureRequest based on the * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests * can only be signed in embedded iFrames whereas normal signature requests can only be signed * on Dropbox Sign. @@ -448,7 +448,7 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( } /** - * Create Embedded Signature Request with Template. Creates a new SignatureRequest based on the + * Create Embedded Signature Request with Template Creates a new SignatureRequest based on the * given Template(s) to be signed in an embedded iFrame. Note that embedded signature requests * can only be signed in embedded iFrames whereas normal signature requests can only be signed * on Dropbox Sign. @@ -508,7 +508,7 @@ public SignatureRequestGetResponse signatureRequestCreateEmbeddedWithTemplate( } /** - * Edit Signature Request. Edits and sends a SignatureRequest with the submitted documents. If + * Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If * `form_fields_per_document` is not specified, a signature page will be affixed where * all signers will be required to add their signature, signifying their agreement to all * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. @@ -533,7 +533,7 @@ public SignatureRequestGetResponse signatureRequestEdit( } /** - * Edit Signature Request. Edits and sends a SignatureRequest with the submitted documents. If + * Edit Signature Request Edits and sends a SignatureRequest with the submitted documents. If * `form_fields_per_document` is not specified, a signature page will be affixed where * all signers will be required to add their signature, signifying their agreement to all * contained documents. **NOTE:** Edit and resend will not deduct your signature request quota. @@ -604,7 +604,7 @@ public ApiResponse signatureRequestEditWithHttpInfo } /** - * Edit Embedded Signature Request. Edits a SignatureRequest with the submitted documents to be + * Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page * will be affixed where all signers will be required to add their signature, signifying their * agreement to all contained documents. Note that embedded signature requests can only be @@ -633,7 +633,7 @@ public SignatureRequestGetResponse signatureRequestEditEmbedded( } /** - * Edit Embedded Signature Request. Edits a SignatureRequest with the submitted documents to be + * Edit Embedded Signature Request Edits a SignatureRequest with the submitted documents to be * signed in an embedded iFrame. If form_fields_per_document is not specified, a signature page * will be affixed where all signers will be required to add their signature, signifying their * agreement to all contained documents. Note that embedded signature requests can only be @@ -707,7 +707,7 @@ public ApiResponse signatureRequestEditEmbeddedWith } /** - * Edit Embedded Signature Request with Template. Edits a SignatureRequest based on the given + * Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can * only be signed in embedded iFrames whereas normal signature requests can only be signed on * Dropbox Sign. @@ -735,7 +735,7 @@ public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( } /** - * Edit Embedded Signature Request with Template. Edits a SignatureRequest based on the given + * Edit Embedded Signature Request with Template Edits a SignatureRequest based on the given * Template(s) to be signed in an embedded iFrame. Note that embedded signature requests can * only be signed in embedded iFrames whereas normal signature requests can only be signed on * Dropbox Sign. @@ -810,7 +810,7 @@ public SignatureRequestGetResponse signatureRequestEditEmbeddedWithTemplate( } /** - * Edit Signature Request With Template. Edits and sends a SignatureRequest based off of the + * Edit Signature Request With Template Edits and sends a SignatureRequest based off of the * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not * deduct your signature request quota. * @@ -836,7 +836,7 @@ public SignatureRequestGetResponse signatureRequestEditWithTemplate( } /** - * Edit Signature Request With Template. Edits and sends a SignatureRequest based off of the + * Edit Signature Request With Template Edits and sends a SignatureRequest based off of the * Template(s) specified with the template_ids parameter. **NOTE:** Edit and resend will not * deduct your signature request quota. * @@ -907,7 +907,7 @@ public ApiResponse signatureRequestEditWithTemplate } /** - * Download Files. Obtain a copy of the current documents specified by the + * Download Files Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are * currently being prepared, a status code of `409` will be returned instead. * @@ -949,7 +949,7 @@ public ApiResponse signatureRequestFilesWithHttpInfo(String signatureReque } /** - * Download Files. Obtain a copy of the current documents specified by the + * Download Files Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a PDF or ZIP file. If the files are * currently being prepared, a status code of `409` will be returned instead. * @@ -1018,7 +1018,7 @@ public ApiResponse signatureRequestFilesWithHttpInfo( } /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the + * Download Files as Data Uri Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. @@ -1040,7 +1040,7 @@ public FileResponseDataUri signatureRequestFilesAsDataUri(String signatureReques } /** - * Download Files as Data Uri. Obtain a copy of the current documents specified by the + * Download Files as Data Uri Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. @@ -1100,7 +1100,7 @@ public ApiResponse signatureRequestFilesAsDataUriWithHttpIn } /** - * Download Files as File Url. Obtain a copy of the current documents specified by the + * Download Files as File Url Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a url to the file * (PDFs only). If the files are currently being prepared, a status code of `409` will * be returned instead. @@ -1147,7 +1147,7 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( } /** - * Download Files as File Url. Obtain a copy of the current documents specified by the + * Download Files as File Url Obtain a copy of the current documents specified by the * `signature_request_id` parameter. Returns a JSON object with a url to the file * (PDFs only). If the files are currently being prepared, a status code of `409` will * be returned instead. @@ -1216,7 +1216,7 @@ public ApiResponse signatureRequestFilesAsFileUrlWithHttpInfo( } /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the + * Get Signature Request Returns the status of the SignatureRequest specified by the * `signature_request_id` parameter. * * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) @@ -1236,7 +1236,7 @@ public SignatureRequestGetResponse signatureRequestGet(String signatureRequestId } /** - * Get Signature Request. Returns the status of the SignatureRequest specified by the + * Get Signature Request Returns the status of the SignatureRequest specified by the * `signature_request_id` parameter. * * @param signatureRequestId The id of the SignatureRequest to retrieve. (required) @@ -1294,7 +1294,7 @@ public ApiResponse signatureRequestGetWithHttpInfo( } /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This + * List Signature Requests Returns a list of SignatureRequests that you can access. This * includes SignatureRequests you have sent as well as received, but not ones that you have been * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about * querying signature requests. @@ -1413,7 +1413,7 @@ public ApiResponse signatureRequestListWithHttpInf } /** - * List Signature Requests. Returns a list of SignatureRequests that you can access. This + * List Signature Requests Returns a list of SignatureRequests that you can access. This * includes SignatureRequests you have sent as well as received, but not ones that you have been * CCed on. Take a look at our [search guide](/api/reference/search/) to learn more about * querying signature requests. @@ -1478,7 +1478,7 @@ public ApiResponse signatureRequestListWithHttpInf } /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and + * Release On-Hold Signature Request Releases a held SignatureRequest that was claimed and * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft * must indicate at Draft creation that the SignatureRequest created from the Draft should be * held. Releasing the SignatureRequest will send requests to all signers. @@ -1500,7 +1500,7 @@ public SignatureRequestGetResponse signatureRequestReleaseHold(String signatureR } /** - * Release On-Hold Signature Request. Releases a held SignatureRequest that was claimed and + * Release On-Hold Signature Request Releases a held SignatureRequest that was claimed and * prepared from an [UnclaimedDraft](/api/reference/tag/Unclaimed-Draft). The owner of the Draft * must indicate at Draft creation that the SignatureRequest created from the Draft should be * held. Releasing the SignatureRequest will send requests to all signers. @@ -1560,7 +1560,7 @@ public ApiResponse signatureRequestReleaseHoldWithH } /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature + * Send Request Reminder Sends an email to the signer reminding them to sign the signature * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with * embedded signature requests. @@ -1585,7 +1585,7 @@ public SignatureRequestGetResponse signatureRequestRemind( } /** - * Send Request Reminder. Sends an email to the signer reminding them to sign the signature + * Send Request Reminder Sends an email to the signer reminding them to sign the signature * request. You cannot send a reminder within 1 hour of the last reminder that was sent. This * includes manual AND automatic reminders. **NOTE:** This action can **not** be used with * embedded signature requests. @@ -1655,7 +1655,7 @@ public ApiResponse signatureRequestRemindWithHttpIn } /** - * Remove Signature Request Access. Removes your access to a completed signature request. This + * Remove Signature Request Access Removes your access to a completed signature request. This * action is **not reversible**. The signature request must be fully executed by all parties * (signed or declined to sign). Other parties will continue to maintain access to the completed * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous @@ -1677,7 +1677,7 @@ public void signatureRequestRemove(String signatureRequestId) throws ApiExceptio } /** - * Remove Signature Request Access. Removes your access to a completed signature request. This + * Remove Signature Request Access Removes your access to a completed signature request. This * action is **not reversible**. The signature request must be fully executed by all parties * (signed or declined to sign). Other parties will continue to maintain access to the completed * signature request document(s). Unlike /signature_request/cancel, this endpoint is synchronous @@ -1737,10 +1737,10 @@ public ApiResponse signatureRequestRemoveWithHttpInfo(String signatureRequ } /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. + * Send Signature Request Creates and sends a new SignatureRequest with the submitted documents. + * If `form_fields_per_document` is not specified, a signature page will be affixed + * where all signers will be required to add their signature, signifying their agreement to all + * contained documents. * * @param signatureRequestSendRequest (required) * @return SignatureRequestGetResponse @@ -1759,10 +1759,10 @@ public SignatureRequestGetResponse signatureRequestSend( } /** - * Send Signature Request. Creates and sends a new SignatureRequest with the submitted - * documents. If `form_fields_per_document` is not specified, a signature page will be - * affixed where all signers will be required to add their signature, signifying their agreement - * to all contained documents. + * Send Signature Request Creates and sends a new SignatureRequest with the submitted documents. + * If `form_fields_per_document` is not specified, a signature page will be affixed + * where all signers will be required to add their signature, signifying their agreement to all + * contained documents. * * @param signatureRequestSendRequest (required) * @return ApiResponse<SignatureRequestGetResponse> @@ -1815,7 +1815,7 @@ public ApiResponse signatureRequestSendWithHttpInfo } /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) + * Send with Template Creates and sends a new SignatureRequest based off of the Template(s) * specified with the `template_ids` parameter. * * @param signatureRequestSendWithTemplateRequest (required) @@ -1837,7 +1837,7 @@ public SignatureRequestGetResponse signatureRequestSendWithTemplate( } /** - * Send with Template. Creates and sends a new SignatureRequest based off of the Template(s) + * Send with Template Creates and sends a new SignatureRequest based off of the Template(s) * specified with the `template_ids` parameter. * * @param signatureRequestSendWithTemplateRequest (required) @@ -1892,7 +1892,7 @@ public ApiResponse signatureRequestSendWithTemplate } /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a + * Update Signature Request Updates the email address and/or the name for a given signer on a * signature request. You can listen for the `signature_request_email_bounce` event on * your app or account to detect bounced emails, and respond with this method. Updating the * email address of a signer will generate a new `signature_id` value. **NOTE:** This @@ -1918,7 +1918,7 @@ public SignatureRequestGetResponse signatureRequestUpdate( } /** - * Update Signature Request. Updates the email address and/or the name for a given signer on a + * Update Signature Request Updates the email address and/or the name for a given signer on a * signature request. You can listen for the `signature_request_email_bounce` event on * your app or account to detect bounced emails, and respond with this method. Updating the * email address of a signer will generate a new `signature_id` value. **NOTE:** This diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java index 9760330ac..7ccffdb6d 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TeamApi.java @@ -54,7 +54,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to + * Add User to Team Invites a user (specified using the `email_address` parameter) to * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be * created for them. If a user is already a part of another Team, a * `team_invite_failed` error will be returned. @@ -97,7 +97,7 @@ public ApiResponse teamAddMemberWithHttpInfo( } /** - * Add User to Team. Invites a user (specified using the `email_address` parameter) to + * Add User to Team Invites a user (specified using the `email_address` parameter) to * your Team. If the user does not currently have a Dropbox Sign Account, a new one will be * created for them. If a user is already a part of another Team, a * `team_invite_failed` error will be returned. @@ -156,7 +156,7 @@ public ApiResponse teamAddMemberWithHttpInfo( } /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a + * Create Team Creates a new Team and makes you a member. You must not currently belong to a * Team to invoke. * * @param teamCreateRequest (required) @@ -175,7 +175,7 @@ public TeamGetResponse teamCreate(TeamCreateRequest teamCreateRequest) throws Ap } /** - * Create Team. Creates a new Team and makes you a member. You must not currently belong to a + * Create Team Creates a new Team and makes you a member. You must not currently belong to a * Team to invoke. * * @param teamCreateRequest (required) @@ -226,7 +226,7 @@ public ApiResponse teamCreateWithHttpInfo(TeamCreateRequest tea } /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member + * Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member * (yourself). * * @throws ApiException if fails to make API call @@ -243,7 +243,7 @@ public void teamDelete() throws ApiException { } /** - * Delete Team. Deletes your Team. Can only be invoked when you have a Team with only one member + * Delete Team Deletes your Team. Can only be invoked when you have a Team with only one member * (yourself). * * @return ApiResponse<Void> @@ -282,7 +282,7 @@ public ApiResponse teamDeleteWithHttpInfo() throws ApiException { } /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not + * Get Team Returns information about your Team as well as a list of its members. If you do not * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * * @return TeamGetResponse @@ -300,7 +300,7 @@ public TeamGetResponse teamGet() throws ApiException { } /** - * Get Team. Returns information about your Team as well as a list of its members. If you do not + * Get Team Returns information about your Team as well as a list of its members. If you do not * belong to a Team, a 404 error with an error_name of \"not_found\" will be returned. * * @return ApiResponse<TeamGetResponse> @@ -340,7 +340,7 @@ public ApiResponse teamGetWithHttpInfo() throws ApiException { } /** - * Get Team Info. Provides information about a team. + * Get Team Info Provides information about a team. * * @param teamId The id of the team. (optional) * @return TeamGetInfoResponse @@ -376,7 +376,7 @@ public ApiResponse teamInfoWithHttpInfo() throws ApiExcepti } /** - * Get Team Info. Provides information about a team. + * Get Team Info Provides information about a team. * * @param teamId The id of the team. (optional) * @return ApiResponse<TeamGetInfoResponse> @@ -422,7 +422,7 @@ public ApiResponse teamInfoWithHttpInfo(String teamId) } /** - * List Team Invites. Provides a list of team invites (and their roles). + * List Team Invites Provides a list of team invites (and their roles). * * @param emailAddress The email address for which to display the team invites. (optional) * @return TeamInvitesResponse @@ -458,7 +458,7 @@ public ApiResponse teamInvitesWithHttpInfo() throws ApiExce } /** - * List Team Invites. Provides a list of team invites (and their roles). + * List Team Invites Provides a list of team invites (and their roles). * * @param emailAddress The email address for which to display the team invites. (optional) * @return ApiResponse<TeamInvitesResponse> @@ -504,7 +504,7 @@ public ApiResponse teamInvitesWithHttpInfo(String emailAddr } /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a + * List Team Members Provides a paginated list of members (and their roles) that belong to a * given team. * * @param teamId The id of the team that a member list is being requested from. (required) @@ -568,7 +568,7 @@ public ApiResponse teamMembersWithHttpInfo(String teamId, I } /** - * List Team Members. Provides a paginated list of members (and their roles) that belong to a + * List Team Members Provides a paginated list of members (and their roles) that belong to a * given team. * * @param teamId The id of the team that a member list is being requested from. (required) @@ -637,8 +637,8 @@ public ApiResponse teamMembersWithHttpInfo( } /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to + * Remove User from Team Removes the provided user Account from your Team. If the Account had an + * outstanding invitation to your Team, the invitation will be expired. If you choose to * transfer documents from the removed Account to an Account provided in the * `new_owner_email_address` parameter (available only for Enterprise plans), the * response status code will be 201, which indicates that your request has been queued but not @@ -661,8 +661,8 @@ public TeamGetResponse teamRemoveMember(TeamRemoveMemberRequest teamRemoveMember } /** - * Remove User from Team. Removes the provided user Account from your Team. If the Account had - * an outstanding invitation to your Team, the invitation will be expired. If you choose to + * Remove User from Team Removes the provided user Account from your Team. If the Account had an + * outstanding invitation to your Team, the invitation will be expired. If you choose to * transfer documents from the removed Account to an Account provided in the * `new_owner_email_address` parameter (available only for Enterprise plans), the * response status code will be 201, which indicates that your request has been queued but not @@ -717,7 +717,7 @@ public ApiResponse teamRemoveMemberWithHttpInfo( } /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. + * List Sub Teams Provides a paginated list of sub teams that belong to a given team. * * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. @@ -780,7 +780,7 @@ public ApiResponse teamSubTeamsWithHttpInfo(String teamId, } /** - * List Sub Teams. Provides a paginated list of sub teams that belong to a given team. + * List Sub Teams Provides a paginated list of sub teams that belong to a given team. * * @param teamId The id of the parent Team. (required) * @param page Which page number of the SubTeam List to return. Defaults to `1`. @@ -848,7 +848,7 @@ public ApiResponse teamSubTeamsWithHttpInfo( } /** - * Update Team. Updates the name of your Team. + * Update Team Updates the name of your Team. * * @param teamUpdateRequest (required) * @return TeamGetResponse @@ -866,7 +866,7 @@ public TeamGetResponse teamUpdate(TeamUpdateRequest teamUpdateRequest) throws Ap } /** - * Update Team. Updates the name of your Team. + * Update Team Updates the name of your Team. * * @param teamUpdateRequest (required) * @return ApiResponse<TeamGetResponse> diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java index e5c8e5743..14eeae070 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/TemplateApi.java @@ -58,7 +58,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Add User to Template. Gives the specified Account access to the specified Template. The + * Add User to Template Gives the specified Account access to the specified Template. The * specified Account must be a part of your Team. * * @param templateId The id of the Template to give the Account access to. (required) @@ -79,7 +79,7 @@ public TemplateGetResponse templateAddUser( } /** - * Add User to Template. Gives the specified Account access to the specified Template. The + * Add User to Template Gives the specified Account access to the specified Template. The * specified Account must be a part of your Team. * * @param templateId The id of the Template to give the Account access to. (required) @@ -144,7 +144,7 @@ public ApiResponse templateAddUserWithHttpInfo( } /** - * Create Template. Creates a template that can then be used. + * Create Template Creates a template that can then be used. * * @param templateCreateRequest (required) * @return TemplateCreateResponse @@ -163,7 +163,7 @@ public TemplateCreateResponse templateCreate(TemplateCreateRequest templateCreat } /** - * Create Template. Creates a template that can then be used. + * Create Template Creates a template that can then be used. * * @param templateCreateRequest (required) * @return ApiResponse<TemplateCreateResponse> @@ -216,7 +216,7 @@ public ApiResponse templateCreateWithHttpInfo( } /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a + * Create Embedded Template Draft The first step in an embedded template workflow. Creates a * draft template that can then be further set up in the template 'edit' stage. * * @param templateCreateEmbeddedDraftRequest (required) @@ -238,7 +238,7 @@ public TemplateCreateEmbeddedDraftResponse templateCreateEmbeddedDraft( } /** - * Create Embedded Template Draft. The first step in an embedded template workflow. Creates a + * Create Embedded Template Draft The first step in an embedded template workflow. Creates a * draft template that can then be further set up in the template 'edit' stage. * * @param templateCreateEmbeddedDraftRequest (required) @@ -293,7 +293,7 @@ public ApiResponse templateCreateEmbeddedDr } /** - * Delete Template. Completely deletes the template specified from the account. + * Delete Template Completely deletes the template specified from the account. * * @param templateId The id of the Template to delete. (required) * @throws ApiException if fails to make API call @@ -310,7 +310,7 @@ public void templateDelete(String templateId) throws ApiException { } /** - * Delete Template. Completely deletes the template specified from the account. + * Delete Template Completely deletes the template specified from the account. * * @param templateId The id of the Template to delete. (required) * @return ApiResponse<Void> @@ -361,7 +361,7 @@ public ApiResponse templateDeleteWithHttpInfo(String templateId) throws Ap } /** - * Get Template Files. Obtain a copy of the current documents specified by the + * Get Template Files Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently * being prepared, a status code of `409` will be returned instead. In this case * please wait for the `template_created` callback event. @@ -402,7 +402,7 @@ public ApiResponse templateFilesWithHttpInfo(String templateId) throws Api } /** - * Get Template Files. Obtain a copy of the current documents specified by the + * Get Template Files Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a PDF or ZIP file. If the files are currently * being prepared, a status code of `409` will be returned instead. In this case * please wait for the `template_created` callback event. @@ -466,7 +466,7 @@ public ApiResponse templateFilesWithHttpInfo(String templateId, String fil } /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the + * Get Template Files as Data Uri Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. In this case please wait for the @@ -488,7 +488,7 @@ public FileResponseDataUri templateFilesAsDataUri(String templateId) throws ApiE } /** - * Get Template Files as Data Uri. Obtain a copy of the current documents specified by the + * Get Template Files as Data Uri Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a `data_uri` * representing the base64 encoded file (PDFs only). If the files are currently being prepared, * a status code of `409` will be returned instead. In this case please wait for the @@ -548,7 +548,7 @@ public ApiResponse templateFilesAsDataUriWithHttpInfo(Strin } /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the + * Get Template Files as File Url Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). * If the files are currently being prepared, a status code of `409` will be returned * instead. In this case please wait for the `template_created` callback event. @@ -592,7 +592,7 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo(String templ } /** - * Get Template Files as File Url. Obtain a copy of the current documents specified by the + * Get Template Files as File Url Obtain a copy of the current documents specified by the * `template_id` parameter. Returns a JSON object with a url to the file (PDFs only). * If the files are currently being prepared, a status code of `409` will be returned * instead. In this case please wait for the `template_created` callback event. @@ -660,7 +660,7 @@ public ApiResponse templateFilesAsFileUrlWithHttpInfo( } /** - * Get Template. Returns the Template specified by the `template_id` parameter. + * Get Template Returns the Template specified by the `template_id` parameter. * * @param templateId The id of the Template to retrieve. (required) * @return TemplateGetResponse @@ -678,7 +678,7 @@ public TemplateGetResponse templateGet(String templateId) throws ApiException { } /** - * Get Template. Returns the Template specified by the `template_id` parameter. + * Get Template Returns the Template specified by the `template_id` parameter. * * @param templateId The id of the Template to retrieve. (required) * @return ApiResponse<TemplateGetResponse> @@ -732,8 +732,8 @@ public ApiResponse templateGetWithHttpInfo(String templateI } /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. + * List Templates Returns a list of the Templates that are accessible by you. Take a look at our + * [search guide](/api/reference/search/) to learn more about querying templates. * * @param accountId Which account to return Templates for. Must be a team member. Use * `all` to indicate all team members. Defaults to your account. (optional) @@ -847,8 +847,8 @@ public ApiResponse templateListWithHttpInfo( } /** - * List Templates. Returns a list of the Templates that are accessible by you. Take a look at - * our [search guide](/api/reference/search/) to learn more about querying templates. + * List Templates Returns a list of the Templates that are accessible by you. Take a look at our + * [search guide](/api/reference/search/) to learn more about querying templates. * * @param accountId Which account to return Templates for. Must be a team member. Use * `all` to indicate all team members. Defaults to your account. (optional) @@ -910,7 +910,7 @@ public ApiResponse templateListWithHttpInfo( } /** - * Remove User from Template. Removes the specified Account's access to the specified + * Remove User from Template Removes the specified Account's access to the specified * Template. * * @param templateId The id of the Template to remove the Account's access to. (required) @@ -932,7 +932,7 @@ public TemplateGetResponse templateRemoveUser( } /** - * Remove User from Template. Removes the specified Account's access to the specified + * Remove User from Template Removes the specified Account's access to the specified * Template. * * @param templateId The id of the Template to remove the Account's access to. (required) @@ -998,7 +998,7 @@ public ApiResponse templateRemoveUserWithHttpInfo( } /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new + * Update Template Files Overlays a new file with the overlay of an existing template. The new * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) * being replaced. This will not overwrite or in any way affect the existing template. Both the * existing template and new template will be available for use after executing this endpoint. @@ -1032,7 +1032,7 @@ public TemplateUpdateFilesResponse templateUpdateFiles( } /** - * Update Template Files. Overlays a new file with the overlay of an existing template. The new + * Update Template Files Overlays a new file with the overlay of an existing template. The new * file(s) must: 1. have the same or higher page count 2. the same orientation as the file(s) * being replaced. This will not overwrite or in any way affect the existing template. Both the * existing template and new template will be available for use after executing this endpoint. diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java index 085a76759..61289c29f 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/api/UnclaimedDraftApi.java @@ -47,8 +47,8 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the + * Create Unclaimed Draft Creates a new Draft that can be claimed using the claim URL. The first + * authenticated user to access the URL will claim the Draft and will be shown either the * \"Sign and send\" or the \"Request signature\" page with the Draft * loaded. Subsequent access to the claim URL will result in a 404. * @@ -69,8 +69,8 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreate( } /** - * Create Unclaimed Draft. Creates a new Draft that can be claimed using the claim URL. The - * first authenticated user to access the URL will claim the Draft and will be shown either the + * Create Unclaimed Draft Creates a new Draft that can be claimed using the claim URL. The first + * authenticated user to access the URL will claim the Draft and will be shown either the * \"Sign and send\" or the \"Request signature\" page with the Draft * loaded. Subsequent access to the claim URL will result in a 404. * @@ -125,7 +125,7 @@ public ApiResponse unclaimedDraftCreateWithHttpInf } /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an + * Create Embedded Unclaimed Draft Creates a new Draft that can be claimed and used in an * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to * the claim URL will result in a `404`. For this embedded endpoint the @@ -152,7 +152,7 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbedded( } /** - * Create Embedded Unclaimed Draft. Creates a new Draft that can be claimed and used in an + * Create Embedded Unclaimed Draft Creates a new Draft that can be claimed and used in an * embedded iFrame. The first authenticated user to access the URL will claim the Draft and will * be shown the \"Request signature\" page with the Draft loaded. Subsequent access to * the claim URL will result in a `404`. For this embedded endpoint the @@ -212,7 +212,7 @@ public ApiResponse unclaimedDraftCreateEmbeddedWit } /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved + * Create Embedded Unclaimed Draft with Template Creates a new Draft with a previously saved * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user * to access the URL will claim the Draft and will be shown the \"Request signature\" * page with the Draft loaded. Subsequent access to the claim URL will result in a @@ -241,7 +241,7 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( } /** - * Create Embedded Unclaimed Draft with Template. Creates a new Draft with a previously saved + * Create Embedded Unclaimed Draft with Template Creates a new Draft with a previously saved * template(s) that can be claimed and used in an embedded iFrame. The first authenticated user * to access the URL will claim the Draft and will be shown the \"Request signature\" * page with the Draft loaded. Subsequent access to the claim URL will result in a @@ -304,9 +304,9 @@ public UnclaimedDraftCreateResponse unclaimedDraftCreateEmbeddedWithTemplate( } /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email + * Edit and Resend Unclaimed Draft Creates a new signature request from an embedded request that + * can be edited prior to being sent to the recipients. Parameter `test_mode` can be + * edited prior to request. Signers can be edited in embedded editor. Requester's email * address will remain unchanged if `requester_email_address` parameter is not set. * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal * drafts can be used and accessed on Dropbox Sign. @@ -333,9 +333,9 @@ public UnclaimedDraftCreateResponse unclaimedDraftEditAndResend( } /** - * Edit and Resend Unclaimed Draft. Creates a new signature request from an embedded request - * that can be edited prior to being sent to the recipients. Parameter `test_mode` can - * be edited prior to request. Signers can be edited in embedded editor. Requester's email + * Edit and Resend Unclaimed Draft Creates a new signature request from an embedded request that + * can be edited prior to being sent to the recipients. Parameter `test_mode` can be + * edited prior to request. Signers can be edited in embedded editor. Requester's email * address will remain unchanged if `requester_email_address` parameter is not set. * **NOTE:** Embedded unclaimed drafts can only be accessed in embedded iFrames whereas normal * drafts can be used and accessed on Dropbox Sign. diff --git a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java index bda2de249..c26d25b82 100644 --- a/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java +++ b/sdks/java-v1/src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java @@ -43,8 +43,10 @@ public class SubFormFieldRuleAction { /** Gets or Sets type */ public enum TypeEnum { CHANGE_FIELD_VISIBILITY(String.valueOf("change-field-visibility")), + FIELD_VISIBILITY(String.valueOf("change-field-visibility")), - CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")); + CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")), + GROUP_VISIBILITY(String.valueOf("change-group-visibility")); private String value; diff --git a/sdks/java-v1/templates/Configuration.mustache b/sdks/java-v1/templates/Configuration.mustache index a5d9368da..61b08ab67 100644 --- a/sdks/java-v1/templates/Configuration.mustache +++ b/sdks/java-v1/templates/Configuration.mustache @@ -2,51 +2,29 @@ package {{invokerPackage}}; -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - {{>generatedAnnotation}} public class Configuration { public static final String VERSION = "{{{artifactVersion}}}"; - private static final AtomicReference defaultApiClient = new AtomicReference<>(); - private static volatile Supplier apiClientFactory = ApiClient::new; + private static volatile ApiClient defaultApiClient = new ApiClient(); /** - * Get the default API client, which would be used when creating API instances without providing an API client. + * 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; + return defaultApiClient; } /** - * Set the default API client, which would be used when creating API instances without providing an API 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); + defaultApiClient = apiClient; } - - private Configuration() { - } -} \ No newline at end of file +} diff --git a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache index 67a110392..854d8a6cd 100644 --- a/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/apache-httpclient/ApiClient.mustache @@ -149,7 +149,6 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { {{#openApiNullable}} objectMapper.registerModule(new JsonNullableModule()); {{/openApiNullable}} - objectMapper.registerModule(new RFC3339JavaTimeModule()); objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); dateFormat = ApiClient.buildDefaultDateFormat(); @@ -467,7 +466,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { * @param value The header's value * @return API client */ - public final ApiClient addDefaultHeader(String key, String value) { + public ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } diff --git a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache index f51743a75..f744eec13 100644 --- a/sdks/java-v1/templates/libraries/feign/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/feign/ApiClient.mustache @@ -186,7 +186,6 @@ public class ApiClient { objectMapper.registerModule(new JodaModule()); {{/joda}} objectMapper.registerModule(new JavaTimeModule()); - objectMapper.registerModule(new RFC3339JavaTimeModule()); {{#openApiNullable}} JsonNullableModule jnm = new JsonNullableModule(); objectMapper.registerModule(jnm); diff --git a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache index 23b435728..fef695d69 100644 --- a/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/ApiClient.mustache @@ -1396,7 +1396,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if ("".equals(entity.getEntity())) { response = invocationBuilder.method("DELETE"); } else { - response = invocationBuilder.method("DELETE", entity); + response = invocationBuilder.method("DELETE", entity); } } else if ("PATCH".equals(method)) { response = invocationBuilder.method("PATCH", entity); diff --git a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache index 12b5b1326..613a4a276 100644 --- a/sdks/java-v1/templates/libraries/jersey2/JSON.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/JSON.mustache @@ -12,9 +12,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} -{{#models.0}} -import {{modelPackage}}.*; -{{/models.0}} import java.text.DateFormat; import java.util.HashMap; @@ -32,12 +29,7 @@ public class JSON implements ContextResolver { mapper = JsonMapper.builder() .serializationInclusion(JsonInclude.Include.NON_NULL) .configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false) - {{^useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, {{failOnUnknownProperties}}) - {{/useCustomTemplateCode}} - {{#useCustomTemplateCode}} - .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) - {{/useCustomTemplateCode}} .configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) @@ -50,9 +42,6 @@ public class JSON implements ContextResolver { {{#openApiNullable}} .addModule(new JsonNullableModule()) {{/openApiNullable}} - {{^useCustomTemplateCode}} - .addModule(new RFC3339JavaTimeModule()) - {{/useCustomTemplateCode}} .build(); } diff --git a/sdks/java-v1/templates/libraries/jersey2/api.mustache b/sdks/java-v1/templates/libraries/jersey2/api.mustache index 035edb3b7..1b5968121 100644 --- a/sdks/java-v1/templates/libraries/jersey2/api.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/api.mustache @@ -56,12 +56,7 @@ public class {{classname}} { {{#operation}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -102,12 +97,7 @@ public class {{classname}} { {{/useCustomTemplateCode}} {{^vendorExtensions.x-group-parameters}} /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}} {{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} @@ -325,12 +315,7 @@ public class {{classname}} { } /** -{{^useCustomTemplateCode}} * {{summary}} -{{/useCustomTemplateCode}} -{{#useCustomTemplateCode}} - * {{summary}}. -{{/useCustomTemplateCode}} * {{notes}}{{#pathParams}} * @param {{paramName}} {{description}} (required){{/pathParams}} * @return {{operationId}}Request diff --git a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache index c0716915e..5b60d0743 100644 --- a/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/oneof_model.mustache @@ -280,9 +280,9 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im * @return The actual instance of `{{{dataType}}}` * @throws ClassCastException if the instance is not `{{{dataType}}}` */ - public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { + public {{{dataType}}} get{{#sanitizeGeneric}}{{{dataType}}}{{/sanitizeGeneric}}() throws ClassCastException { return ({{{dataType}}})super.getActualInstance(); - } + } {{/vendorExtensions.x-duplicated-data-type-ignoring-erasure}} {{/oneOf}} diff --git a/sdks/java-v1/templates/libraries/jersey2/pom.mustache b/sdks/java-v1/templates/libraries/jersey2/pom.mustache index 809547352..74d3ef000 100644 --- a/sdks/java-v1/templates/libraries/jersey2/pom.mustache +++ b/sdks/java-v1/templates/libraries/jersey2/pom.mustache @@ -449,9 +449,6 @@ 1.3.5 2.0.2 {{/useJakartaEe}} - {{#useBeanValidation}} - 3.0.2 - {{/useBeanValidation}} 5.10.0 {{#hasHttpSignatureMethods}} 1.8 diff --git a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache index 9315b9c9d..7cead92c5 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumClass.mustache @@ -8,7 +8,7 @@ @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{>additionalEnumTypeAnnotations}}public enum {{datatypeWithEnum}} { {{#allowableValues}} {{#withXml}} diff --git a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache index 40a295f3f..588e52c7e 100644 --- a/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache +++ b/sdks/java-v1/templates/libraries/microprofile/enumOuterClass.mustache @@ -13,7 +13,7 @@ import java.net.URI; @JsonbTypeSerializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#gson}} {{#allowableValues}}{{#enumVars}} @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}) diff --git a/sdks/java-v1/templates/libraries/native/ApiClient.mustache b/sdks/java-v1/templates/libraries/native/ApiClient.mustache index 5c3673f23..a8bede355 100644 --- a/sdks/java-v1/templates/libraries/native/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/native/ApiClient.mustache @@ -196,7 +196,6 @@ public class ApiClient { {{#openApiNullable}} mapper.registerModule(new JsonNullableModule()); {{/openApiNullable}} - mapper.registerModule(new RFC3339JavaTimeModule()); return mapper; } diff --git a/sdks/java-v1/templates/libraries/native/api.mustache b/sdks/java-v1/templates/libraries/native/api.mustache index 874c1a406..c100f2f81 100644 --- a/sdks/java-v1/templates/libraries/native/api.mustache +++ b/sdks/java-v1/templates/libraries/native/api.mustache @@ -284,8 +284,8 @@ public class {{classname}} { {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} if (localVarResponse.body() == null) { return new ApiResponse<{{{returnType}}}>( - localVarResponse.statusCode(), - localVarResponse.headers().map(), + localVarResponse.statusCode(), + localVarResponse.headers().map(), null ); } @@ -298,12 +298,12 @@ public class {{classname}} { localVarResponse.headers().map(), responseBody.isBlank()? null: memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); - {{/returnType}} - {{^returnType}} + {{/returnType}} + {{^returnType}} return new ApiResponse<{{{returnType}}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - null + null ); {{/returnType}} {{/vendorExtensions.x-java-text-plain-string}} diff --git a/sdks/java-v1/templates/libraries/native/modelEnum.mustache b/sdks/java-v1/templates/libraries/native/modelEnum.mustache index 8072766ab..5f22f7559 100644 --- a/sdks/java-v1/templates/libraries/native/modelEnum.mustache +++ b/sdks/java-v1/templates/libraries/native/modelEnum.mustache @@ -23,7 +23,7 @@ import java.net.URI; @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache index f3c0e2d7c..b955e53f1 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/modelEnum.mustache @@ -12,7 +12,7 @@ import com.google.gson.stream.JsonWriter; * {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} */ @JsonAdapter({{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.Adapter.class) -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache b/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache index d21f03c3c..06912e9b1 100644 --- a/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/libraries/okhttp-gson/modelInnerEnum.mustache @@ -6,7 +6,7 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}} diff --git a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache index 05efcd14b..e5a4bd8fc 100644 --- a/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/restclient/ApiClient.mustache @@ -13,9 +13,6 @@ import java.util.function.Consumer; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} -{{#generateClientAsBean}} -import org.springframework.beans.factory.annotation.Autowired; -{{/generateClientAsBean}} import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -26,9 +23,6 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert {{#withXml}} import org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter; {{/withXml}} -{{#generateClientAsBean}} -import org.springframework.stereotype.Component; -{{/generateClientAsBean}} import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -67,9 +61,6 @@ import {{invokerPackage}}.auth.OAuth; {{/hasOAuthMethods}} {{>generatedAnnotation}} -{{#generateClientAsBean}} -@Component("{{invokerPackage}}.ApiClient") -{{/generateClientAsBean}} public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public enum CollectionFormat { CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); @@ -100,9 +91,6 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this(null); } - {{#generateClientAsBean}} - @Autowired - {{/generateClientAsBean}} public ApiClient(RestClient restClient) { this(restClient, createDefaultDateFormat()); } @@ -122,10 +110,6 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this(restClient, createDefaultObjectMapper(format), format); } - private ApiClient(RestClient restClient, DateFormat format) { - this(restClient, createDefaultObjectMapper(format), format); - } - public static DateFormat createDefaultDateFormat() { DateFormat dateFormat = new RFC3339DateFormat(); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); diff --git a/sdks/java-v1/templates/libraries/restclient/api.mustache b/sdks/java-v1/templates/libraries/restclient/api.mustache index ef5095514..b8a8d93e7 100644 --- a/sdks/java-v1/templates/libraries/restclient/api.mustache +++ b/sdks/java-v1/templates/libraries/restclient/api.mustache @@ -17,7 +17,8 @@ import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.FileSystemResource; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.client.RestClient.ResponseSpec; import org.springframework.web.client.RestClientResponseException; @@ -27,18 +28,8 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -{{#generateClientAsBean}} -import org.springframework.stereotype.Component; -{{/generateClientAsBean}} -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestClient.ResponseSpec; -import org.springframework.web.client.RestClientResponseException; {{>generatedAnnotation}} -{{#generateClientAsBean}} -@Component("{{package}}.{{classname}}") -{{/generateClientAsBean}} {{#operations}} public class {{classname}} { private ApiClient apiClient; diff --git a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache index 9acaf0dd8..ce696128e 100644 --- a/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache +++ b/sdks/java-v1/templates/libraries/webclient/ApiClient.mustache @@ -8,9 +8,6 @@ import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} -{{#generateClientAsBean}} -import org.springframework.beans.factory.annotation.Autowired; -{{/generateClientAsBean}} import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; @@ -25,12 +22,8 @@ import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.ClientHttpResponse; -import org.springframework.http.client.reactive.ClientHttpRequest; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.http.codec.json.Jackson2JsonEncoder; -{{#generateClientAsBean}} -import org.springframework.stereotype.Component; -{{/generateClientAsBean}} import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -83,9 +76,6 @@ import {{invokerPackage}}.auth.OAuth; {{/hasOAuthMethods}} {{>generatedAnnotation}} -{{#generateClientAsBean}} -@Component("{{invokerPackage}}.ApiClient") -{{/generateClientAsBean}} public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { public enum CollectionFormat { CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null); @@ -121,9 +111,6 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { this.init(); } - {{#generateClientAsBean}} - @Autowired - {{/generateClientAsBean}} public ApiClient(WebClient webClient) { this(Optional.ofNullable(webClient).orElseGet(() -> buildWebClient()), createDefaultDateFormat()); } diff --git a/sdks/java-v1/templates/libraries/webclient/api.mustache b/sdks/java-v1/templates/libraries/webclient/api.mustache index 79d0249bd..0a412fb37 100644 --- a/sdks/java-v1/templates/libraries/webclient/api.mustache +++ b/sdks/java-v1/templates/libraries/webclient/api.mustache @@ -17,7 +17,8 @@ import {{javaxPackage}}.validation.Valid; {{/useBeanValidation}} import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.FileSystemResource; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.core.ParameterizedTypeReference; import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; import org.springframework.web.reactive.function.client.WebClientResponseException; @@ -27,20 +28,10 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -{{#generateClientAsBean}} -import org.springframework.stereotype.Component; -{{/generateClientAsBean}} -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; -import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import reactor.core.publisher.Flux; {{>generatedAnnotation}} -{{#generateClientAsBean}} -@Component("{{package}}.{{classname}}") -{{/generateClientAsBean}} {{#operations}} public class {{classname}} { private ApiClient apiClient; diff --git a/sdks/java-v1/templates/modelEnum.mustache b/sdks/java-v1/templates/modelEnum.mustache index 90cd7f8c8..d1ba359d9 100644 --- a/sdks/java-v1/templates/modelEnum.mustache +++ b/sdks/java-v1/templates/modelEnum.mustache @@ -23,7 +23,7 @@ import java.net.URI; @JsonbTypeSerializer({{datatypeWithEnum}}.Serializer.class) @JsonbTypeDeserializer({{datatypeWithEnum}}.Deserializer.class) {{/jsonb}} -{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { +{{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}}{{#enumVars}} {{#enumDescription}} /** diff --git a/sdks/java-v1/templates/modelInnerEnum.mustache b/sdks/java-v1/templates/modelInnerEnum.mustache index 401002a69..f87524099 100644 --- a/sdks/java-v1/templates/modelInnerEnum.mustache +++ b/sdks/java-v1/templates/modelInnerEnum.mustache @@ -12,7 +12,7 @@ @XmlType(name="{{datatypeWithEnum}}") @XmlEnum({{dataType}}.class) {{/withXml}} - {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-implements}}{{#-first}} implements {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { + {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} { {{#allowableValues}} {{#enumVars}} {{#enumDescription}}

Response Details
Status Code Description Response Headers
{{code}} {{message}} {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}}